# 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 helodata.

## 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://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io:7777` |

### ISP

| Field     | Value                                                 |
| --------- | ----------------------------------------------------- |
| Proxy URL | `http://helo_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://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io: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 = `helo_s1a2b3c4d5e-type-res-region-us-session-${sid}-sesstime-10`;
return [{
  json: {
    proxy_url: `http://${user}:PASSWORD@gate.helodata.io: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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
