N8N
Workflow automation platform integration.
Provider: N8N
Authentication: API Key required (for workflow management), Optional for webhooks
Category: Workflow Automation
Credit Cost: 1 credit per operation
Overview
N8N tools enable AI agents to interact with your N8N workflow automation platform. List workflows, retrieve workflow details, and trigger workflows via webhooks to integrate AI capabilities into your automation pipelines.
Key Features
- Workflow Discovery: List and search workflows in your instance
- Workflow Details: Get complete workflow configuration
- Webhook Triggers: Execute workflows with custom data
- Flexible Integration: Works with self-hosted or cloud N8N
Setup
For Workflow Management (List/Get)
Get N8N API Key
- Open your N8N instance
- Click your avatar → Settings
- Navigate to API section
- Generate a new API key
- Copy the key and note your instance URL
Add to Reeva
- Dashboard → Accounts → Add Account
- Select N8N
- Fill in:
- Base URL: Your N8N instance URL (e.g.,
https://your-instance.n8n.cloud) - API Key: Your N8N API key
- Base URL: Your N8N instance URL (e.g.,
- Click Save
For Webhook Triggers
Webhook triggers don't require API credentials - they use the public webhook URL configured in your workflow.
- Create a workflow in N8N with a Webhook trigger node
- Copy the webhook URL from the node
- Use the URL directly in the tool
Available Tools
List Workflows
Retrieve all workflows from your N8N instance with optional filtering.
Tool ID: N8N_List_Workflows
Credit Cost: 1 credit
Parameters:
active(boolean, optional): Filter by active statustruefor active workflowsfalsefor inactive workflows
tags(string, optional): Comma-separated list of tags to filter by- Example:
"production,email"
- Example:
name(string, optional): Filter workflows by nameproject_id(string, optional): Filter workflows by project IDexclude_pinned_data(boolean, optional): Exclude pinned data from results- Default:
false
- Default:
limit(integer, optional): Maximum workflows to return- Default: 100
- Range: 1-250
cursor(string, optional): Pagination cursor from previous response
Response:
{
"data": [
{
"id": "wf_abc123",
"name": "Email Notification Workflow",
"active": true,
"createdAt": "2025-11-22T10:30:00.000Z",
"updatedAt": "2025-11-22T15:45:00.000Z",
"tags": [
{"id": "1", "name": "production"},
{"id": "2", "name": "email"}
]
},
{
"id": "wf_def456",
"name": "Data Sync Workflow",
"active": false,
"createdAt": "2025-11-20T08:00:00.000Z",
"updatedAt": "2025-11-21T12:00:00.000Z",
"tags": []
}
],
"nextCursor": "cursor_xyz789"
}
Example Usage:
# Python - List active workflows
response = client.call_tool(
name="N8N_List_Workflows",
arguments={
"active": True,
"limit": 50
}
)
for workflow in response["data"]:
print(f"{workflow['name']} (ID: {workflow['id']})")
// TypeScript - Filter by tags
const response = await client.callTool({
name: "N8N_List_Workflows",
arguments: {
tags: "production,critical",
active: true
}
});
response.data.forEach(wf => {
console.log(`${wf.name}: ${wf.active ? 'Active' : 'Inactive'}`);
});
# cURL - List all workflows
curl -X POST https://api.joinreeva.com/mcp/server_YOUR_ID \
-H "Authorization: Bearer mcpk_your_key" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "N8N_List_Workflows",
"arguments": {
"limit": 100
}
},
"id": 1
}'
Use Cases:
- Discover available workflows
- Find workflows by tag or name
- Monitor active workflows
- Build workflow selectors
Get Workflow
Retrieve detailed information about a specific workflow.
Tool ID: N8N_Get_Workflow
Credit Cost: 1 credit
Parameters:
workflow_id(string, required): The ID of the workflow to retrieveexclude_pinned_data(boolean, optional): Exclude pinned data- Default:
false
- Default:
Response:
{
"id": "wf_abc123",
"name": "Email Notification Workflow",
"active": true,
"nodes": [
{
"id": "node_1",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"parameters": {
"path": "email-trigger",
"httpMethod": "POST"
}
},
{
"id": "node_2",
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"parameters": {}
}
],
"connections": {
"Webhook": {
"main": [[{"node": "Send Email", "type": "main", "index": 0}]]
}
},
"settings": {
"executionOrder": "v1"
},
"tags": [
{"id": "1", "name": "production"}
],
"createdAt": "2025-11-22T10:30:00.000Z",
"updatedAt": "2025-11-22T15:45:00.000Z"
}
Example Usage:
# Python - Get workflow details
response = client.call_tool(
name="N8N_Get_Workflow",
arguments={
"workflow_id": "wf_abc123"
}
)
print(f"Workflow: {response['name']}")
print(f"Active: {response['active']}")
print(f"Nodes: {len(response['nodes'])}")
for node in response["nodes"]:
print(f" - {node['name']} ({node['type']})")
// TypeScript - Get workflow configuration
const response = await client.callTool({
name: "N8N_Get_Workflow",
arguments: {
workflow_id: "wf_abc123",
exclude_pinned_data: true
}
});
console.log(`Workflow: ${response.name}`);
console.log(`Nodes: ${response.nodes.map(n => n.name).join(', ')}`);
Use Cases:
- Inspect workflow configuration
- Understand workflow structure
- Check workflow status
- Get webhook paths
Trigger Workflow via Webhook
Execute an N8N workflow by calling its webhook URL.
Tool ID: N8N_Trigger_Workflow_Webhook
Credit Cost: 1 credit
Parameters:
webhook_url(string, required): Full webhook URL or path- Full URL:
https://your-instance.n8n.cloud/webhook/my-path - Relative path:
/webhook/my-path(requiresbase_url)
- Full URL:
base_url(string, optional): N8N instance base URL- Only needed if
webhook_urlis a relative path
- Only needed if
method(string, optional): HTTP method- Default:
"POST" - Options:
"GET","POST","PUT","PATCH","DELETE"
- Default:
body(object, optional): JSON body for POST/PUT/PATCH requestsquery_params(object, optional): Query parameters to append to URLheaders(object, optional): Additional HTTP headerstimeout(number, optional): Request timeout in seconds- Default: 30
- Range: 1-300
Response:
{
"status_code": 200,
"headers": {
"content-type": "application/json"
},
"body": {
"success": true,
"message": "Workflow triggered successfully",
"data": {
"processedItems": 5
}
}
}
Example Usage:
# Python - Trigger workflow with data
response = client.call_tool(
name="N8N_Trigger_Workflow_Webhook",
arguments={
"webhook_url": "https://your-instance.n8n.cloud/webhook/process-order",
"method": "POST",
"body": {
"order_id": "12345",
"customer_email": "customer@example.com",
"items": ["item1", "item2"]
}
}
)
if response["status_code"] == 200:
print("Workflow triggered successfully!")
print(f"Response: {response['body']}")
// TypeScript - Trigger with query params
const response = await client.callTool({
name: "N8N_Trigger_Workflow_Webhook",
arguments: {
webhook_url: "https://your-instance.n8n.cloud/webhook/sync-data",
method: "POST",
body: {
action: "full_sync",
source: "api"
},
query_params: {
priority: "high",
notify: "true"
}
}
});
# cURL - Simple trigger
curl -X POST https://api.joinreeva.com/mcp/server_YOUR_ID \
-H "Authorization: Bearer mcpk_your_key" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "N8N_Trigger_Workflow_Webhook",
"arguments": {
"webhook_url": "https://your-instance.n8n.cloud/webhook/my-workflow",
"body": {"trigger": "api"}
}
},
"id": 1
}'
Use Cases:
- Trigger automation workflows
- Pass data to N8N for processing
- Integrate AI decisions with automation
- Execute scheduled or conditional workflows
Common Patterns
Workflow Discovery and Trigger
# Find and trigger a workflow by name
def trigger_workflow_by_name(workflow_name, data):
# List workflows
workflows = client.call_tool(
name="N8N_List_Workflows",
arguments={"name": workflow_name, "active": True}
)
if not workflows["data"]:
raise Exception(f"Workflow '{workflow_name}' not found")
# Get workflow details to find webhook
workflow = client.call_tool(
name="N8N_Get_Workflow",
arguments={"workflow_id": workflows["data"][0]["id"]}
)
# Find webhook node
webhook_node = next(
(n for n in workflow["nodes"] if n["type"] == "n8n-nodes-base.webhook"),
None
)
if not webhook_node:
raise Exception("Workflow has no webhook trigger")
webhook_path = webhook_node["parameters"]["path"]
base_url = "https://your-instance.n8n.cloud"
# Trigger the workflow
return client.call_tool(
name="N8N_Trigger_Workflow_Webhook",
arguments={
"webhook_url": f"{base_url}/webhook/{webhook_path}",
"body": data
}
)
AI-Triggered Automation
# AI agent decides when to trigger workflows
def process_customer_request(request):
# AI analyzes the request
analysis = analyze_request(request)
if analysis["needs_human_review"]:
# Trigger review workflow
client.call_tool(
name="N8N_Trigger_Workflow_Webhook",
arguments={
"webhook_url": REVIEW_WORKFLOW_URL,
"body": {
"request": request,
"analysis": analysis,
"priority": analysis["urgency"]
}
}
)
elif analysis["can_auto_resolve"]:
# Trigger resolution workflow
client.call_tool(
name="N8N_Trigger_Workflow_Webhook",
arguments={
"webhook_url": RESOLUTION_WORKFLOW_URL,
"body": {
"request": request,
"resolution": analysis["suggested_resolution"]
}
}
)
Workflow Monitoring
# Monitor workflow status
def get_workflow_summary():
workflows = client.call_tool(
name="N8N_List_Workflows",
arguments={"limit": 250}
)
summary = {
"total": len(workflows["data"]),
"active": len([w for w in workflows["data"] if w["active"]]),
"inactive": len([w for w in workflows["data"] if not w["active"]]),
"by_tag": {}
}
for workflow in workflows["data"]:
for tag in workflow.get("tags", []):
tag_name = tag["name"]
if tag_name not in summary["by_tag"]:
summary["by_tag"][tag_name] = 0
summary["by_tag"][tag_name] += 1
return summary
Data Pipeline Integration
# Integrate AI processing with N8N workflows
def process_and_trigger(data):
# AI processes the data
processed_data = ai_process(data)
# Store results
client.call_tool(
name="supabase_create_records",
arguments={
"table": "processed_data",
"records": processed_data
}
)
# Trigger N8N workflow for next steps
client.call_tool(
name="N8N_Trigger_Workflow_Webhook",
arguments={
"webhook_url": NEXT_STEPS_WEBHOOK,
"body": {
"batch_id": processed_data["id"],
"status": "ready",
"record_count": len(processed_data["items"])
}
}
)
Setting Up N8N Webhooks
Create a Webhook Trigger
- In N8N, create a new workflow
- Add a Webhook node as the trigger
- Configure:
- HTTP Method: POST (or your preference)
- Path: Custom path (e.g.,
my-workflow)
- Add your processing nodes
- Activate the workflow
- Copy the webhook URL from the Webhook node
Webhook URL Structure
https://your-instance.n8n.cloud/webhook/[your-path]
For test webhooks (workflow not active):
https://your-instance.n8n.cloud/webhook-test/[your-path]
Security Best Practices
- Use HTTPS for all webhook URLs
- Add authentication in your webhook node:
- Basic Auth
- Header Auth
- Query Parameter Auth
- Validate input in your workflow
- Use test webhooks during development
Best Practices
Workflow Design
- Use clear, descriptive workflow names
- Tag workflows for organization
- Keep webhook paths meaningful
- Document expected input format
API Usage
- Cache workflow lists when possible
- Use pagination for large result sets
- Handle webhook timeouts gracefully
- Validate responses before processing
Security
- Rotate API keys periodically
- Use HTTPS for all connections
- Add authentication to webhooks
- Limit API key permissions
Error Handling
- Check response status codes
- Handle timeout errors
- Log failed triggers
- Implement retry logic
Troubleshooting
"Workflow not found" Error
Cause: Invalid workflow ID or no access
Solutions:
- Verify workflow ID is correct
- Check API key has access to workflow
- Ensure workflow hasn't been deleted
Webhook Timeout
Cause: Workflow takes too long to respond
Solutions:
- Increase
timeoutparameter - Configure workflow to respond immediately
- Use async workflow execution
- Check workflow for bottlenecks
"Unauthorized" Error
Cause: Invalid or missing API key
Solutions:
- Verify API key is correct
- Check key has required permissions
- Ensure key hasn't expired
- For webhooks, check authentication config
Empty Response from Webhook
Cause: Workflow not returning data
Solutions:
- Add a "Respond to Webhook" node
- Check workflow execution logs
- Ensure workflow is active
- Verify webhook path is correct
Related Tools
- Jira - Create issues from workflows
- Supabase - Store workflow data
- Notion - Log workflow results
- HTTPS Tool - Generic HTTP requests
See Also
- Creating Custom Tools - Pre-configure webhook URLs
- Managing Credentials - Store N8N credentials
- All Tools - Complete tool catalog