n8n-nodes-e2b
v0.1.1
Published
n8n community node for E2B Code Interpreter - Run code in cloud sandboxes
Maintainers
Keywords
Readme
n8n-nodes-e2b
Unofficial n8n community node for E2B Code Interpreter. Run Python and JavaScript code in secure cloud sandboxes directly from your n8n workflows.
This node wraps the @e2b/code-interpreter SDK and exposes sandbox lifecycle operations as individual n8n actions, allowing you to freely compose them within your workflows.
Installation
- Open your n8n instance
- Go to Settings > Community Nodes
- Click Install a community node
- Enter
n8n-nodes-e2b - Click Install
Prerequisites
You need an E2B API key. Sign up at e2b.dev and get your API key from the dashboard.
Credential Setup
- In n8n, go to Credentials > Add Credential
- Search for E2B API
- Enter your API key
- Click Save
Operations
The node provides a single Sandbox resource with 7 operations:
Create Sandbox
Create a new sandbox and return its ID for subsequent operations.
| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Template | string | (empty) | Custom sandbox template ID | | Timeout (Seconds) | number | 300 | Auto-kill timeout (max 86400; requires Pro plan for >3600) | | Environment Variables | key-value | (empty) | Environment variables passed to the sandbox |
Output:
{ "sandboxId": "sandbox-xxxx" }Execute Code
Execute Python or JavaScript code inside a sandbox.
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| Sandbox ID | string | (required) | Target sandbox ID |
| Code | string | (required) | Code to execute (multiline) |
| Language | options | python | python or javascript |
Output:
{
"sandboxId": "sandbox-xxxx",
"stdout": "...",
"stderr": "...",
"results": [],
"error": ""
}resultscontains structured data from code execution (charts, images, etc.)errorcontains the error message if execution failed
Run Command
Run a shell command inside a sandbox.
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| Sandbox ID | string | (required) | Target sandbox ID |
| Command | string | (required) | Shell command to run |
| Working Directory | string | / | Working directory for the command |
Output:
{
"sandboxId": "sandbox-xxxx",
"stdout": "...",
"stderr": "...",
"exitCode": 0
}Upload File
Upload a file to a sandbox. Supports both text content and binary data from previous n8n nodes.
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| Sandbox ID | string | (required) | Target sandbox ID |
| Remote Path | string | (required) | Destination path inside the sandbox |
| Content | string | (empty) | File content as text (ignored when binary input is used) |
| Binary Property | string | data | Name of the input binary property. Binary data takes priority over Content. |
Output:
{
"sandboxId": "sandbox-xxxx",
"remotePath": "/home/user/data.csv",
"success": true
}Download File
Download a file from a sandbox as text or binary data.
| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Sandbox ID | string | (required) | Target sandbox ID | | Remote Path | string | (required) | File path inside the sandbox | | Binary Output | boolean | false | Output as n8n binary data instead of text |
Output (text):
{
"sandboxId": "sandbox-xxxx",
"remotePath": "/home/user/result.txt",
"content": "..."
}Output (binary): Returns n8n binary data that can be used by downstream nodes (e.g., Write Binary File).
List Files
List files and directories in a sandbox.
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| Sandbox ID | string | (required) | Target sandbox ID |
| Path | string | / | Directory path to list |
Output:
{
"sandboxId": "sandbox-xxxx",
"path": "/home/user",
"files": [
{ "name": "data.csv", "type": "file" },
{ "name": "output", "type": "dir" }
]
}Kill Sandbox
Terminate a sandbox and release its resources.
| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Sandbox ID | string | (required) | Target sandbox ID |
Output:
{
"sandboxId": "sandbox-xxxx",
"killed": true
}Workflow Examples
Simple Code Execution
Create Sandbox -> Execute Code -> Kill SandboxData Analysis Pipeline
Create Sandbox -> Upload File -> Execute Code -> Execute Code -> Download File -> Kill SandboxEnvironment Setup + Multiple Tasks
Create Sandbox -> Run Command (pip install) -> Execute Code -> Execute Code -> List Files -> Download File -> Kill SandboxCompatibility
- n8n version: 1.0+
- Node.js version: 18+
