# Nodaro with n8n

> Start a Nodaro workflow from n8n with one HTTP Request node, and get the finished image or video back on an n8n Webhook node. No API key is needed.

Source: https://nodaro.ai/docs/guides/n8n-integration

**n8n** can start any Nodaro workflow with one HTTP request and receive the finished image, video or audio on an n8n Webhook node. Nodaro does the generation. n8n decides when it runs and where the result goes next. Neither direction needs a Nodaro API key, because the workflow's own webhook address starts the run.

## How the two connect

1. An n8n **HTTP Request** node posts a JSON body, for example a prompt, to the webhook address of a Nodaro workflow.
2. The Nodaro workflow starts with a [Webhook Trigger](https://nodaro.ai/docs/nodes/automate/webhook-trigger), runs its nodes, and ends with a [Webhook Output](https://nodaro.ai/docs/nodes/publish/webhook-output).
3. The Webhook Output posts the result to an n8n **Webhook** node, and the rest of your n8n workflow continues from there.

Workflow: The Nodaro side: n8n starts the Webhook Trigger, and the Webhook Output sends the image's address back to n8n.

- Webhook Trigger → Generate Image (prompt)
- Generate Image → Webhook Output (image_url)

## Step 1: Receive the result in n8n

Create the receiving end first, because the Nodaro workflow needs its address.

1. In n8n, add a **Webhook** node.
2. Set **HTTP Method** to **POST**, and give the node a **Path**, for example `nodaro-result`.
3. Keep **Respond** on **Immediately**, so n8n answers Nodaro at once.
4. Copy the **Production URL**.

n8n registers the Production URL when you publish the n8n workflow. The **Test URL** listens for only 120 seconds after you select **Listen for test event**, so use it only while you build.

## Step 2: Build the Nodaro workflow

1. Add a **Webhook Trigger** node. Under **Output Parameters**, add a parameter named `prompt` of type **Text**.
2. Connect the `prompt` output to the prompt input of a [Generate Image](https://nodaro.ai/docs/nodes/image/generate-image) node, or any other node that makes a result.
3. Add a **Webhook Output** node. Paste the n8n Production URL into **Webhook URL**. Under **Input Parameters**, add `image_url` of type **Image URL**, and connect the image to it.
4. Save the workflow. Select the Webhook Trigger and copy its address under **Webhook URL**.

The address has the form `https://app.nodaro.ai/v1/webhooks/<token>`. The token works like a password: anyone who has the address can start the workflow.

## Step 3: Start the run from n8n

1. In n8n, add an **HTTP Request** node where the run should start.
2. Set **Method** to **POST** and paste the Nodaro address into **URL**.
3. Turn on **Send Body**, set **Body Content Type** to **JSON**, and choose **Using JSON** under **Specify Body**.
4. Type the body. The keys are the names of your Output Parameters:

```json
{ "prompt": "{{ $json.prompt }}" }
```

A faster way: select **Import cURL** in the HTTP Request node and paste this command with your token:

```bash
curl -X POST "https://app.nodaro.ai/v1/webhooks/<token>" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A red kite over a green hill, morning light"}'
```

## What comes back

Nodaro answers the HTTP Request node at once, before anything is generated. The answer is `202` with the id of the run:

```json
{ "executionId": "3f9e2b1a-7c6d-4e5f-8a9b-0c1d2e3f4a5b", "status": "pending" }
```

When the run finishes, the Webhook Output posts the result to your n8n Webhook node. The body has one key per Input Parameter, and media values are addresses of files on Nodaro:

```json
{ "image_url": "https://cdn.nodaro.ai/images/2538b658-d2e1-42ee-890a-72ce06089feb.png" }
```

In n8n, the incoming body sits under `body`, so the next node reads the address as `{{ $json.body.image_url }}`.

## Poll instead of a webhook

When n8n cannot receive a request from the internet, poll for the result with a [personal API token](https://nodaro.ai/docs/developers/api/authentication). Polling works for workflows in your personal projects.

1. Keep the HTTP Request node from step 3. It returns the `executionId`.
2. Add a **Wait** node with **Resume** set to **After Time Interval**, for example 10 seconds.
3. Add an **HTTP Request** node with **Method** **GET** and the URL `https://app.nodaro.ai/v1/api/status/{{ $json.executionId }}`. Send the header `Authorization` with the value `Bearer <your API token>`, stored as an n8n credential.
4. Add an **If** node. While `status` is `pending` or `running`, connect its branch back to the Wait node.
5. When the status is `completed`, call `https://app.nodaro.ai/v1/api/result/<executionId>` the same way. The answer lists the run's outputs with their addresses.

[Run a workflow with new input values](https://nodaro.ai/docs/developers/api/workflows#run-a-workflow-with-new-input-values) describes the status and result answers.

## Limits to plan for

| Limit | What happens | What to do |
| --- | --- | --- |
| One run at a time per workflow | A request during a run answers `409`, with the `executionId` of the run in progress. | Send the next request after the previous result arrives, or copy the workflow. |
| 10 requests per minute per address | More answer `429`. | Space the requests out. |
| One delivery attempt | Webhook Output waits 30 seconds for an answer and does not retry. A failed delivery fails the node. | Keep **Respond** on **Immediately** and publish the n8n workflow. |
| Public https:// addresses only | Webhook Output does not send to localhost or private addresses. | Use n8n Cloud, or give a self-hosted n8n a public address. |

## What it costs

The Webhook Trigger and the Webhook Output cost nothing. You pay the credits of the nodes between them, at the same prices as in the editor. In the example above, each run costs the price of one Nano Banana 2 image, 22 credits. Credits reserved for a node that fails come back automatically.

The same pattern works in [Make](https://nodaro.ai/docs/guides/make-integration) and [Zapier](https://nodaro.ai/docs/guides/zapier-integration). [Automations](https://nodaro.ai/docs/guides/automations) covers schedules and the other ways to start a workflow.

## Frequently asked questions

### Do I need a Nodaro API key to use Nodaro from n8n?

No. The n8n HTTP Request node starts the run through the Nodaro workflow's webhook address, and the Webhook Output node sends the result back to n8n. You need an API key only if you poll for the result instead.

### How does n8n get the finished image or video?

Put a Webhook Output node at the end of the Nodaro workflow and paste the Production URL of an n8n Webhook node into it. When the run finishes, Nodaro sends a JSON body with the result's address to n8n.

### Why does Nodaro answer 409?

The Nodaro workflow already has a run in progress, and a workflow runs one request at a time. Send the next request after the previous result arrives, or make a copy of the workflow for parallel runs.

### Can a self-hosted n8n receive the result?

Yes, when Nodaro can reach it. The Webhook Output node sends to a public https:// address, so an n8n that runs only on localhost needs a public address first, for example a tunnel.

### What does it cost?

The Webhook Trigger and the Webhook Output are free. You pay the credits of the nodes between them, at the same prices as in the editor.
