# n8n > Manage n8n automation workflows via REST API. List/create/update/delete workflows, trigger executions, check execution status, manage tags, variables, credentials, and trigger webhooks. Use for workflow automation, orchestration, and n8n instance management. - Author: gabrieljablonski - Repository: fazer-ai/moltbot-skill-n8n - Version: 20260127121258 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/fazer-ai/moltbot-skill-n8n - Web: https://mule.run/skillshub/@@fazer-ai/moltbot-skill-n8n~n8n:20260127121258 --- --- name: n8n description: "Manage n8n automation workflows via REST API. List/create/update/delete workflows, trigger executions, check execution status, manage tags, variables, credentials, and trigger webhooks. Use for workflow automation, orchestration, and n8n instance management." metadata: {"moltbot":{"emoji":"🔄","requires":{"bins":["bun"],"env":["N8N_API_KEY","N8N_BASE_URL"]}}} --- # n8n Skill Manage n8n automation workflows via the REST API. ## Setup 1. Install Bun (if not already installed): ```bash # Linux/macOS curl -fsSL https://bun.sh/install | bash # Windows (PowerShell) powershell -c "irm bun.sh/install.ps1 | iex" ``` 2. Get your API key: Settings → API → Create API Key 3. Set environment variables: ```bash export N8N_BASE_URL="https://your-instance.app.n8n.cloud/api/v1" # or http://localhost:5678/api/v1 export N8N_API_KEY="your-api-key" ``` ## Quick Reference Use the TypeScript script with Bun (cross-platform): | Task | Command | |------|---------| | List workflows | `bun scripts/n8n.ts workflows list` | | Get workflow | `bun scripts/n8n.ts workflows get ` | | Activate workflow | `bun scripts/n8n.ts workflows activate ` | | Deactivate workflow | `bun scripts/n8n.ts workflows deactivate ` | | List executions | `bun scripts/n8n.ts executions list [--workflow ] [--status ]` | | Get execution | `bun scripts/n8n.ts executions get ` | | Retry execution | `bun scripts/n8n.ts executions retry ` | | Trigger webhook | `bun scripts/n8n.ts webhook ''` | | List tags | `bun scripts/n8n.ts tags list` | | List variables | `bun scripts/n8n.ts variables list` | ## API Endpoints ### Workflows - `GET /workflows` — List all workflows - `POST /workflows` — Create workflow - `GET /workflows/{id}` — Get workflow details - `PUT /workflows/{id}` — Update workflow - `DELETE /workflows/{id}` — Delete workflow - `POST /workflows/{id}/activate` — Activate workflow - `POST /workflows/{id}/deactivate` — Deactivate workflow ### Executions - `GET /executions` — List executions (supports `?workflowId=`, `?status=`) - `GET /executions/{id}` — Get execution details - `DELETE /executions/{id}` — Delete execution - `POST /executions/{id}/retry` — Retry failed execution ### Tags - `GET /tags` — List tags - `POST /tags` — Create tag - `PUT /tags/{id}` — Update tag - `DELETE /tags/{id}` — Delete tag ### Variables - `GET /variables` — List variables - `POST /variables` — Create variable - `PUT /variables/{id}` — Update variable - `DELETE /variables/{id}` — Delete variable ### Credentials - `POST /credentials` — Create credential - `PATCH /credentials/{id}` — Update credential - `DELETE /credentials/{id}` — Delete credential - `GET /credentials/schema/{typeName}` — Get credential schema ### Source Control - `POST /source-control/pull` — Pull from source control ## Webhooks Webhooks don't use API key auth — they have their own URL path: ```bash curl -X POST "https://your-instance.app.n8n.cloud/webhook/" \ -H "Content-Type: application/json" \ -d '{"key": "value"}' ``` ## Notes - Pagination: Use `?limit=` and `?cursor=` for large result sets - Rate limits: n8n Cloud has request limits; self-hosted has none by default - Execution statuses: `success`, `error`, `waiting`, `running` - API docs: https://docs.n8n.io/api/api-reference/