---
title: "n8n integration"
description: "Run code and shell commands in E2B sandboxes from n8n workflows with the verified E2B node: sandboxes, files, git, snapshots and volumes."
url: "https://e2b.dev/integrations/n8n"
---

# n8n

> Add a sandboxed code step to any n8n workflow. The E2B node runs commands, moves files and works with git in an isolated sandbox, not on your n8n instance.

Workflows & automation · [All integrations](https://e2b.dev/integrations.md)

## About this integration

- **Maintained by:** E2B
- **How it works:** Verified n8n node
- **Package:** @e2b/n8n-nodes-e2b
- **Language:** No code
- **Upstream:** [n8n-io/n8n · ★ 211k](https://github.com/n8n-io/n8n)
- **Example:** [n8n-nodes-e2b/docs/examples](https://github.com/e2b-dev/n8n-nodes-e2b/tree/main/docs/examples)

## Get started

Paste the prompt into your coding agent, or follow the steps yourself.

### Paste this into your coding agent

```text
Add an E2B code step to this n8n workflow.

1. Make sure the E2B node (@e2b/n8n-nodes-e2b) is installed on the n8n instance.
2. The node needs an E2B API credential. If there isn't one, ask me for my API key from https://console.e2b.dev/?tab=keys. Never hardcode it in the workflow.
3. Follow the examples at https://github.com/e2b-dev/n8n-nodes-e2b/tree/main/docs/examples and add a Code > Run Command step with Kill After Run enabled.
4. Run the workflow once and show me the stdout that came from the sandbox.
```

## Or set it up yourself

### 1. Install the E2B node

```text
@e2b/n8n-nodes-e2b
```

### 2. Add your API key

```text
Credential: E2B API
API Key: e2b_...
```

### 3. Run a command in a sandbox

```json
{
  "type": "@e2b/n8n-nodes-e2b.e2b",
  "parameters": {
    "resource": "code",
    "operation": "runCommand",
    "sandboxId": "",
    "command": "python3 -c \"print('Hello from an E2B sandbox!')\"",
    "allowInternetAccess": true,
    "killAfterRun": true
  }
}
```

## What runs in the sandbox

Commands from your workflow run in an isolated sandbox, away from the machine running n8n.

- **Code:** Shell commands from the Run Command operation, plus file and git operations on the sandbox.
- **Lifetime:** Leave Sandbox ID empty and enable Kill After Run for a throwaway sandbox per step.
- **State:** Create, pause and reuse a sandbox across steps, or keep data in snapshots and volumes.
- **Network:** Internet access is a per-step option. Turn it off for locked-down runs.

## More workflow tools

Other automation platforms with an E2B step.

- [Dify](https://marketplace.dify.ai/plugin/langgenius/e2b): Add the E2B plugin from the Dify Marketplace to run code in Dify workflows.
- [Pipedream](https://pipedream.com/apps/e2b/actions/run-code): Run code in E2B from Pipedream workflows with the prebuilt action.
- [Make](https://www.make.com/integrations/e2b): Run code in E2B as a step in Make scenarios.

## Links

- [Get API key](https://console.e2b.dev/?tab=keys)
- [Open the guide](https://n8n.io/integrations/e2b)
- [E2B documentation](https://docs.e2b.dev)
