# Ask Immiscible from an n8n workflow

> Import a ready workflow that asks Immiscible before acting, waits for a person with n8n's Wait node when it has to, then acts and records what happened.

Source: https://immiscible.fly.dev/docs/guides/n8n

n8n can pause a workflow until a URL is called, which is exactly what waiting for a person needs. The workflow below asks, waits only when a person has to decide, and settles afterwards.

> **Note**
> n8n does not endorse or partner with Immiscible. This page describes how its documented nodes work with our API.

## Import it

1. Download `https://immiscible.fly.dev/downloads/n8n-ask-immiscible.json`. The file holds no key.
2. In n8n, open **Workflows**, then **Import from file**, and choose it.
3. Make one credential of type **Header Auth**: name `x-api-key`, value an agent key (**Agents**, **Add an agent**, then **Collect the agent's key** on its setup page). Select it on each HTTP Request node.
4. Edit **Ask Immiscible**'s body to describe the real action, and replace **Your action** with the step being guarded.

## What it does

| Node | Type | What it sends |
|---|---|---|
| Ask Immiscible | HTTP Request | `POST /v1/actions/authorize` with the action |
| Decision | Switch | One output each for `allow`, `approval_required` and `deny` |
| Call me back | HTTP Request | `POST /v1/actions/{id}/callback` with the Wait node's resume URL, `$execution.resumeUrl` |
| Wait for a person | Wait, resume on webhook call | Nothing: it waits until Immiscible calls its resume URL |
| Check decision | HTTP Request | `GET /v1/actions/{id}`, the authoritative answer |
| Approved? | If | Carries on only on `allow` |
| Your action | (your step) | The payment, email or update |
| Record outcome | HTTP Request | `POST /v1/actions/{id}/settle` with `{ "status": "completed" }` |
| Stopped | Stop and Error | Ends the run with Immiscible's reasons |

The resume call says only which action and what was decided; the workflow reads the decision itself with its key, so a forged call cannot approve anything.

## Things to know

- The resume URL must be reachable from Immiscible over https on a public address (n8n Cloud, or a self-hosted n8n behind https). Outside production, Immiscible will also call http on loopback, for trying it on one machine.
- Set a time limit on the Wait node if you like; Immiscible calls back when the request expires as well, with `deny`.
- n8n's own AI Agent node can also reach Immiscible as an MCP client: add the **MCP Client Tool** with `https://immiscible.fly.dev/mcp` and the agent key as a bearer token.
