Automate task processing with n8n integration
This guide covers how to integrate Workflow with n8n for automated task processing.
For long-running requests and recommended designs (Option A vs Option B), see docs/N8N_ASYNC_PATTERNS.md.
The n8n integration allows you to create automated workflows that:
graph TD
A[ClickUp Task Created] -->|Assigned to bot| B[Trigger Planning Flow]
B --> C[Fetch Task Info<br/>+ optional sourceBranch]
C --> D[Send Prompt to Claude Code<br/>via Planner Template]
D --> E[Claude Planner Agent<br/>Analyzes Codebase]
E --> F[Refined Task Output:<br/>Title, Steps, Files, DoD]
F --> G[Update Task in ClickUp]
G --> H[Task Assigned to Dev-Test Agent]
H --> I[Dev Agent Pulls Code<br/>Implements Task<br/>Runs Tests<br/>Creates PR]
The planner flow automates task refinement before development begins.
| Setting | Description |
|---|---|
| Workspace ID | Define in n8n global variables |
| Bug Labels | Configure label detection for bug tasks |
| API Endpoint | Your Workflow instance URL |
Set up a ClickUp trigger node that watches for assignee changes on tasks.
Configure an HTTP request to your Workflow API:
POST /api/ask Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Example JSON body:
{
"workspaceId": "your-workspace-id",
"question": "Your prompt text here",
"context": "Optional extra context"
}
Notes:
sourceBranch is optional. If omitted, the server defaults to the workspace targetBranch.POST /api/edit (and optionally set createMR: true). For large requests, expect queued: true frequently.callback object and handle completion in a separate workflow. See docs/N8N_ASYNC_PATTERNS.md.Use a Set node to extract the Claude response and format it for ClickUp.
Use the ClickUp node to update the task with the refined information.
docs/N8N_ASYNC_PATTERNS.md for robust async patterns and modular processing flows