OpenClaw + n8n Workflow Orchestration
Set up OpenClaw to delegate all external API interactions to n8n workflows via webhooks, so the agent never touches credentials and every integration is visually inspectable and lockable.
Requirements
n8nAPI access, for creating and triggering workflows.fetchorcurlfor webhook calls.- Docker, if using the pre-configured stack.
- n8n credential management, a manual one-time setup per integration.
- OpenClaw on port 3456.
- n8n on port 5678.
- A shared Docker network so OpenClaw can call
http://n8n:5678/webhook/...directly.
How to use
API keys live in n8n's credential store; the agent only knows the webhook URL, so it never sees credentials.
Lock each workflow once it is built and tested, so the agent can't modify how it interacts with the API.
You can add validation, rate limiting, and approval gates in n8n before any external call executes.
Credential management in n8n is a manual, one-time setup per integration.
Lock after testing: the build → test → lock cycle is critical — without locking, the agent can silently modify workflows.
Letting your AI agent directly manage API keys and call external services is a recipe for security incidents: every new integration means another credential in .env.local and another surface for the agent to accidentally leak or misuse.
How it works:
Tell OpenClaw what you need (e.g., create a workflow that sends a Slack message when a new GitHub issue is labeled urgent), and the agent designs the workflow.
Open n8n's UI and manually add your Slack token / GitHub token.
Lock the workflow to prevent further modifications by the agent.
┌──────────────┐ webhook call ┌─────────────────┐ API call ┌──────────────┐
│ OpenClaw │ ───────────────────→ │ n8n Workflow │ ─────────────→ │ External │
│ (agent) │ (no credentials) │ (locked, with │ (credentials │ Service │
│ │ │ API keys) │ stay here) │ (Slack, etc)│
└──────────────┘ └─────────────────┘ └──────────────┘
Option 1: Pre-configured Docker Stack
A community-maintained Docker Compose setup, openclaw-n8n-stack, pre-wires everything on a shared Docker network.
git clone https://github.com/caprihan/openclaw-n8n-stack.git
cd openclaw-n8n-stack
cp .env.template .env
# Add your Anthropic API key to .env
docker-compose up -d
- Install n8n (
npm install n8n -gor run via Docker). - Configure OpenClaw to know the n8n base URL.
- Add the n8n Integration Pattern to your AGENTS.md.
## n8n Integration Pattern
When I need to interact with external APIs:
1. NEVER store API keys in my environment or skill files
2. Check if an n8n workflow already exists for this integration
3. If not, create one via n8n API with a webhook trigger
4. Notify the user to add credentials and lock the workflow
5. For all future calls, use the webhook URL with a JSON payload
Workflow naming: openclaw-{service}-{action}
Example: openclaw-slack-send-message
Webhook call format:
curl -X POST http://n8n:5678/webhook/{workflow-name} \
-H "Content-Type: application/json" \
-d '{"channel": "#general", "message": "Hello from OpenClaw"}'
Links
Source: hesamsheikh/awesome-openclaw-usecases and its contributors. License: MIT.
Copyright (c) 2026
Translation and editorial adaptation by ClawCases.
>Resources
>Related Use Cases
AI-Powered Earnings Tracker
Stay on top of earnings season across dozens of tech companies without manually checking multiple sources and remembering report dates for every AI/tech earnings report.
AI Video Editing via Chat
Describe your edit to an agent to trim videos, add music, subtitles, or crops — no timeline or GUI. Install two skills, then editing is done by conversation.
Using Chroma, an open-source embedding database for RAG and semantic search
Chroma is an AI-native embedding database for building LLM applications with memory, such as RAG pipelines and semantic search.