> For the complete documentation index, see [llms.txt](https://docs.ipdunar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipdunar.com/integrations/ai-and-workflow/n8n.md).

# n8n

n8n is a workflow automation tool whose HTTP Request node accepts a proxy per request. Useful for low-code pipelines that scrape, monitor, or post to web services through ipdunar.

## HTTP Request node

1. Drop an **HTTP Request** node.
2. **Settings → Proxy** (under the gear icon).
3. Fill in:

### Residential / Mobile (gateway)

| Field     | Value                                                                          |
| --------- | ------------------------------------------------------------------------------ |
| Proxy URL | `http://ipdunar_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.ipdunar.com:7777` |

### ISP

| Field     | Value                                                    |
| --------- | -------------------------------------------------------- |
| Proxy URL | `http://ipdunar_s1a2b3c4d5e:PASSWORD@198.51.100.42:8000` |

4. **Save → Execute Node** to test.

\[screenshot: n8n HTTP Request node with Proxy URL field]

## Workflow-wide proxy via env vars

For the n8n process itself (so every HTTP node inherits), set environment variables before launch:

```bash
export HTTP_PROXY="http://ipdunar_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.ipdunar.com:7777"
export HTTPS_PROXY="$HTTP_PROXY"
n8n start
```

n8n's underlying axios/HTTP layer honors these.

## Rotating IPs across runs

Use n8n's **Function** node to generate a fresh session per execution:

```js
const sid = Math.random().toString(36).slice(2, 10);
const user = `ipdunar_s1a2b3c4d5e-type-res-region-us-session-${sid}-sesstime-10`;
return [{
  json: {
    proxy_url: `http://${user}:PASSWORD@gate.ipdunar.com:7777`,
  },
}];
```

Pass `{{ $json.proxy_url }}` into the HTTP Request node's Proxy field.

## ISP IP pool

Store your ISP list in a **Set** node (or fetch from a sheet/DB), pick a row via a **Function** node, and feed it into HTTP Request:

```js
const ips = $input.first().json.lines;       // array of "ip:port:user:pass"
const line = ips[Math.floor(Math.random() * ips.length)];
const [ip, port, user, pass] = line.split(":");
return [{ json: { proxy_url: `http://${user}:${pass}@${ip}:${port}` } }];
```

## Verify

Point the HTTP Request at `https://ipv4.icanhazip.com` and inspect the response.

## Common pitfalls

* **Self-hosted n8n behind a corporate proxy** — n8n's HTTP node doesn't chain proxies. Only the last-set proxy wins.
* **Special characters in password** — URL-encode (`@` → `%40`).
* **Webhook trigger nodes** don't go through proxies — they receive inbound traffic. Only outbound HTTP Request nodes do.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ipdunar.com/integrations/ai-and-workflow/n8n.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
