# AI use cases for n8n (n8n-io/n8n)

Repo: [n8n-io/n8n](https://github.com/n8n-io/n8n) | Use cases: 3 | Page: https://dedupedai.com/use-cases/n8n-io-n8n/

n8n is a fair-code workflow automation platform for building AI agents and workflows. You combine a visual canvas with JavaScript or Python code, connect to 1500+ integrations, use OpenAI, Anthropic, Google or open-source models, add human approvals, and run it self-hosted with Docker or in n8n's cloud. There are 9,000+ workflow templates to start from.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Self-host n8n with Docker in 5 minutes: https://dedupedai.com/use-cases/n8n-io-n8n/self-host-n8n-with-docker/
- Build an AI agent workflow with a human approval step: https://dedupedai.com/use-cases/n8n-io-n8n/build-an-ai-agent-workflow-with-human-approval/
- Add JavaScript or Python code where the visual nodes stop: https://dedupedai.com/use-cases/n8n-io-n8n/add-custom-code-to-an-automation/

## How to self-host n8n with Docker in 5 minutes with n8n

Repo: [n8n-io/n8n](https://github.com/n8n-io/n8n) | Difficulty: Beginner | Time: 10 minutes | Basis: From the README

Run n8n in one Docker container with a persistent volume and open the editor in your browser.

**Who it is for:** Anyone who wants workflow automation without per-task cloud pricing or sending data to a third party.

**The problem:** Hosted automation tools charge per run and keep your credentials on their servers.

**The outcome:** The n8n editor running at localhost:5678 with your workflows saved in a Docker volume.

### Steps

1. Install Docker
2. Create a volume: `docker volume create n8n_data`
3. Start n8n: `docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n`
4. Open the editor at http://localhost:5678 and create the owner account
5. Or use the install script `curl -fsSL https://get.n8n.io | sh`

### Prompt to paste into your agent

```text
Self-host n8n-io/n8n with Docker on this machine using a named volume, confirm the editor loads on port 5678, and tell me how to back up the n8n_data volume.
```

### Caveat



Risk, remote script: The get.n8n.io install script runs code fetched from the internet; the docker run command is the transparent alternative.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/n8n-io-n8n/self-host-n8n-with-docker/

## How to build an AI agent workflow with a human approval step with n8n

Repo: [n8n-io/n8n](https://github.com/n8n-io/n8n) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Chain a trigger, a model step, tools and an approval so the agent drafts and a person signs off before anything goes out.

**Who it is for:** A team that wants AI to do the busywork on emails, tickets or leads but never act without a check.

**The problem:** Fully automatic AI flows are risky and fully manual work is slow.

**The outcome:** A multi-step workflow where the AI step proposes an action and waits for approval before the final step runs.

### Steps

1. Start from a template in the 9,000+ workflow library or a blank canvas
2. Add a trigger, then an AI step using OpenAI, Anthropic, Google or an open-source model
3. Give the agent tools from your integrations
4. Insert a human approval step before any step that sends or changes data
5. Run it on test data and read the execution log before turning it on

### Prompt to paste into your agent

```text
In my n8n-io/n8n instance, build a workflow that triggers on <event>, uses <model> to draft <output>, waits for my approval, then <final action>. Explain each node and where credentials are stored.
```

### Caveat



Risk, credentials: Each connected app stores its credentials in n8n; restrict who can open the instance.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/n8n-io-n8n/build-an-ai-agent-workflow-with-human-approval/

## How to add JavaScript or Python code where the visual nodes stop with n8n

Repo: [n8n-io/n8n](https://github.com/n8n-io/n8n) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Drop a code step into a workflow to reshape data or call a library the integrations do not cover.

**Who it is for:** A developer who likes visual workflows but needs real code for the tricky step.

**The problem:** No-code tools hit a wall on custom logic, and full code projects are slow to wire up.

**The outcome:** One workflow that mixes visual nodes with a JavaScript or Python step and npm packages.

### Steps

1. Open a workflow in the editor
2. Add a code step and pick JavaScript or Python
3. Transform the incoming items and return them to the next node
4. Pull in npm packages for advanced AI workflows if your setup allows it

### Prompt to paste into your agent

```text
Add a code step to my n8n-io/n8n workflow <name> that <transformation> on each item, in <JavaScript or Python>, and test it on the last execution's data.
```

### Caveat



Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/n8n-io-n8n/add-custom-code-to-an-automation/
