This workflow follows the Execute Workflow Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "org-ai Task Execute",
"nodes": [
{
"parameters": {},
"id": "execute-workflow-trigger",
"name": "Execute Workflow Trigger",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"url": "={{ $json.runData.logUrl }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "x-webhook-token",
"value": "org-ai-n8n-secret-token"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "taskId",
"value": "={{ $json.runData.taskId }}"
},
{
"name": "message",
"value": "=n8n \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u958b\u59cb [{{ $json.runData.department }}]"
},
{
"name": "level",
"value": "INFO"
}
]
},
"options": {}
},
"id": "log-start",
"name": "Log Start",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
460,
300
]
},
{
"parameters": {
"jsCode": "// \u90e8\u7f72 + \u30ad\u30fc\u30ef\u30fc\u30c9\u304b\u3089taskMode\u3092\u5224\u5b9a\nconst rd = $('Execute Workflow Trigger').item.json.runData;\nconst input = (rd.input ?? '').toLowerCase();\nconst dept = rd.department ?? 'GENERAL';\nconst hint = (rd.taskType ?? '').toLowerCase();\n\nconst kw = (words) => words.some(w => input.includes(w.toLowerCase()) || hint.includes(w.toLowerCase()));\n\nlet taskMode = 'general';\n\nif (kw(['\u30e1\u30fc\u30eb','email','mail','\u9001\u4fe1','\u9001\u3063\u3066'])) taskMode = 'email';\nelse if (kw(['\u8b70\u4e8b\u9332','\u5546\u8ac7\u30e1\u30e2','\u30df\u30fc\u30c6\u30a3\u30f3\u30b0','\u4f1a\u8b70\u30e1\u30e2'])) taskMode = 'meeting_notes';\nelse if (kw(['\u63d0\u6848\u66f8','\u4f01\u753b\u66f8','\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8','\u8cc7\u6599','\u5831\u544a\u66f8','\u30ec\u30dd\u30fc\u30c8'])) taskMode = 'proposal';\nelse if (kw(['\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb','\u7a7a\u304d','\u65e5\u7a0b','\u30ab\u30ec\u30f3\u30c0\u30fc','\u4e88\u5b9a'])) taskMode = 'schedule';\nelse if (kw(['SNS','\u6295\u7a3f','\u30c4\u30a4\u30fc\u30c8','twitter','instagram','linkedin','\u30dd\u30b9\u30c8'])) taskMode = 'sns';\nelse if (kw(['\u30b3\u30f3\u30c6\u30f3\u30c4\u30ab\u30ec\u30f3\u30c0\u30fc','\u6295\u7a3f\u8a08\u753b','\u6295\u7a3f\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb'])) taskMode = 'content_calendar';\nelse if (kw(['\u9818\u53ce\u66f8','\u30ec\u30b7\u30fc\u30c8','\u7d4c\u8cbb'])) taskMode = 'receipt_summary';\nelse if (kw(['\u7d4c\u8cbb\u30ec\u30dd\u30fc\u30c8','\u6708\u6b21','\u4e88\u7b97'])) taskMode = 'expense_report';\nelse if (kw(['\u8acb\u6c42\u66f8','\u30a4\u30f3\u30dc\u30a4\u30b9'])) taskMode = 'invoice_check';\nelse if (kw(['\u5e02\u5834\u5206\u6790','\u7af6\u5408\u5206\u6790','\u30de\u30fc\u30b1\u30c3\u30c8','\u5e02\u5834\u8abf\u67fb','SWOT'])) taskMode = 'market_analysis';\nelse if (kw(['\u30b0\u30e9\u30d5','\u30c1\u30e3\u30fc\u30c8','\u53ef\u8996\u5316','KPI','\u7d71\u8a08','\u30c8\u30ec\u30f3\u30c9'])) taskMode = 'data_visualization';\nelse if (dept === 'SALES') taskMode = 'proposal';\nelse if (dept === 'MARKETING') taskMode = 'sns';\nelse if (dept === 'ACCOUNTING') taskMode = 'expense_report';\nelse if (dept === 'ANALYTICS') taskMode = 'market_analysis';\n\nreturn [{ json: { taskMode, department: dept, input: rd.input, plan: rd.plan ?? 'STARTER', org_id: rd.orgId, aiEngineUrl: rd.aiEngineUrl ?? 'http://ai-engine:8000' } }];"
},
"id": "detect-task-type",
"name": "Detect Task Type",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
680,
300
]
},
{
"parameters": {
"jsCode": "// taskMode \u306b\u5fdc\u3058\u305f\u69cb\u9020\u5316 JSON \u751f\u6210\u7528\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u69cb\u7bc9\nconst { taskMode, department, input, plan, org_id, aiEngineUrl } = $json;\n\nconst prompts = {\n email: `\u3042\u306a\u305f\u306f\u55b6\u696d\u90e8\u306e\u30e1\u30fc\u30eb\u4f5c\u6210AI\u3067\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u306e\u6307\u793a\u306b\u57fa\u3065\u304d\u30d3\u30b8\u30cd\u30b9\u30e1\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8aac\u660e\u6587\u306f\u4e0d\u8981\u3067\u3059\u3002\n{\"taskType\":\"email\",\"to\":\"\u5b9b\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\",\"cc\":\"\",\"subject\":\"\u4ef6\u540d\",\"body\":\"\u672c\u6587\uff08\u6539\u884c\u306f\\\\n\u3067\u8868\u73fe\uff09\"}`,\n\n meeting_notes: `\u3042\u306a\u305f\u306f\u8b70\u4e8b\u9332\u4f5c\u6210AI\u3067\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u3092\u3082\u3068\u306b\u8b70\u4e8b\u9332\u3092\u69cb\u9020\u5316\u3057\u3066\u307e\u3068\u3081\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"meeting_notes\",\"title\":\"\u4f1a\u8b70\u540d\",\"date\":\"YYYY-MM-DD\",\"attendees\":[\"\u53c2\u52a0\u8005\u540d\"],\"agenda\":[\"\u8b70\u984c\"],\"decisions\":[\"\u6c7a\u5b9a\u4e8b\u9805\"],\"actionItems\":[{\"assignee\":\"\u62c5\u5f53\u8005\",\"task\":\"\u30bf\u30b9\u30af\",\"deadline\":\"\u671f\u9650\"}],\"summary\":\"\u6982\u8981\"}`,\n\n proposal: `\u3042\u306a\u305f\u306f\u63d0\u6848\u66f8\u30fb\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4f5c\u6210AI\u3067\u3059\u3002\u30d7\u30ed\u30d5\u30a7\u30c3\u30b7\u30e7\u30ca\u30eb\u306a\u63d0\u6848\u66f8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"proposal\",\"title\":\"\u30bf\u30a4\u30c8\u30eb\",\"summary\":\"\u6982\u8981\",\"content\":\"\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u5f62\u5f0f\u306e\u672c\u6587\"}`,\n\n schedule: `\u3042\u306a\u305f\u306f\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u8abf\u6574AI\u3067\u3059\u3002\u65e5\u7a0b\u5019\u88dc\u3092\u63d0\u6848\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"schedule\",\"title\":\"\u4e88\u5b9a\u540d\",\"preferredDates\":[\"YYYY-MM-DD\"],\"duration\":60,\"participants\":[\"\u53c2\u52a0\u8005\"],\"notes\":\"\u5099\u8003\"}`,\n\n sns: `\u3042\u306a\u305f\u306fSNS\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0AI\u3067\u3059\u3002\u52b9\u679c\u7684\u306aSNS\u6295\u7a3f\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"sns\",\"platform\":\"twitter\",\"content\":\"\u6295\u7a3f\u672c\u6587\uff08280\u6587\u5b57\u4ee5\u5185\uff09\",\"hashtags\":[\"\u30bf\u30b01\",\"\u30bf\u30b02\"],\"tone\":\"professional\",\"targetAudience\":\"\u30bf\u30fc\u30b2\u30c3\u30c8\u5c64\"}`,\n\n content_calendar: `\u3042\u306a\u305f\u306f\u30b3\u30f3\u30c6\u30f3\u30c4\u4f01\u753bAI\u3067\u3059\u3002SNS\u6295\u7a3f\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"content_calendar\",\"title\":\"\u30ab\u30ec\u30f3\u30c0\u30fc\u540d\",\"summary\":\"\u6982\u8981\",\"content\":[{\"date\":\"YYYY-MM-DD\",\"platform\":\"twitter\",\"content\":\"\u6295\u7a3f\u5185\u5bb9\"}]}`,\n\n receipt_summary: `\u3042\u306a\u305f\u306f\u7d4c\u7406AI\u3067\u3059\u3002\u9818\u53ce\u66f8\u30fb\u7d4c\u8cbb\u30c7\u30fc\u30bf\u3092\u6574\u7406\u3057\u3066\u307e\u3068\u3081\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"receipt_summary\",\"receipts\":[{\"date\":\"YYYY-MM-DD\",\"vendor\":\"\u53d6\u5f15\u5148\",\"amount\":0,\"category\":\"\u5206\u985e\"}],\"totalAmount\":0,\"summary\":\"\u6982\u8981\"}`,\n\n expense_report: `\u3042\u306a\u305f\u306f\u7d4c\u7406AI\u3067\u3059\u3002\u7d4c\u8cbb\u30ec\u30dd\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"expense_report\",\"title\":\"\u30ec\u30dd\u30fc\u30c8\u540d\",\"receipts\":[{\"date\":\"YYYY-MM-DD\",\"vendor\":\"\u53d6\u5f15\u5148\",\"amount\":0,\"category\":\"\u5206\u985e\"}],\"totalAmount\":0,\"summary\":\"\u6982\u8981\"}`,\n\n invoice_check: `\u3042\u306a\u305f\u306f\u7d4c\u7406AI\u3067\u3059\u3002\u8acb\u6c42\u66f8\u3092\u30c1\u30a7\u30c3\u30af\u30fb\u6574\u7406\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"invoice_check\",\"title\":\"\u30c1\u30a7\u30c3\u30af\u7d50\u679c\",\"receipts\":[{\"date\":\"YYYY-MM-DD\",\"vendor\":\"\u53d6\u5f15\u5148\",\"amount\":0,\"category\":\"\u9805\u76ee\"}],\"totalAmount\":0,\"summary\":\"\u6982\u8981\"}`,\n\n market_analysis: `\u3042\u306a\u305f\u306f\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u3067\u3059\u3002\u5e02\u5834\u5206\u6790\u30ec\u30dd\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"market_analysis\",\"title\":\"\u5206\u6790\u30bf\u30a4\u30c8\u30eb\",\"summary\":\"\u6982\u8981\",\"sections\":[{\"heading\":\"\u30bb\u30af\u30b7\u30e7\u30f3\u540d\",\"content\":\"\u5206\u6790\u5185\u5bb9\"}],\"conclusion\":\"\u7d50\u8ad6\",\"risks\":[\"\u30ea\u30b9\u30af1\"]}`,\n\n data_visualization: `\u3042\u306a\u305f\u306f\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u3067\u3059\u3002\u30c7\u30fc\u30bf\u5206\u6790\u7d50\u679c\u3092\u30b0\u30e9\u30d5\u7528\u30c7\u30fc\u30bf\u3068\u3057\u3066\u6574\u7406\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u5fc5\u305a\u4ee5\u4e0b\u306eJSON\u5f62\u5f0f\u306e\u307f\u3092\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n{\"taskType\":\"data_visualization\",\"title\":\"\u30c1\u30e3\u30fc\u30c8\u30bf\u30a4\u30c8\u30eb\",\"chartType\":\"bar\",\"data\":[{\"label\":\"\u9805\u76ee\u540d\",\"value\":0}],\"summary\":\"\u5206\u6790\u6982\u8981\"}`,\n\n general: `\u3042\u306a\u305f\u306f\u512a\u79c0\u306a\u30d3\u30b8\u30cd\u30b9\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3067\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u306e\u8cea\u554f\u306b\u5b9f\u7528\u7684\u306b\u56de\u7b54\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u56de\u7b54\u306f\u30d7\u30ec\u30fc\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002`\n};\n\nconst systemPrompt = prompts[taskMode] ?? prompts.general;\nconst useJsonMode = taskMode !== 'general';\n\nconst messages = [\n { role: 'system', content: systemPrompt },\n { role: 'user', content: input }\n];\n\nreturn [{ json: { messages, taskMode, useJsonMode, department, org_id, plan, aiEngineUrl } }];"
},
"id": "build-prompt",
"name": "Build Structured Prompt",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
900,
300
]
},
{
"parameters": {
"url": "={{ $('Execute Workflow Trigger').item.json.runData.logUrl }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "x-webhook-token",
"value": "org-ai-n8n-secret-token"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "taskId",
"value": "={{ $('Execute Workflow Trigger').item.json.runData.taskId }}"
},
{
"name": "message",
"value": "=\u30bf\u30b9\u30af\u30e2\u30fc\u30c9: {{ $json.taskMode }} \u2014 Claude (plan={{ $json.plan }}) \u547c\u3073\u51fa\u3057\u4e2d..."
},
{
"name": "level",
"value": "INFO"
}
]
},
"options": {}
},
"id": "log-mode",
"name": "Log Task Mode",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1120,
300
]
},
{
"parameters": {
"method": "POST",
"url": "={{ $('Build Structured Prompt').item.json.aiEngineUrl }}/llm/chat",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={{ JSON.stringify({ messages: $('Build Structured Prompt').item.json.messages, department: $('Build Structured Prompt').item.json.department, org_id: $('Build Structured Prompt').item.json.org_id, plan: $('Build Structured Prompt').item.json.plan, json_mode: $('Build Structured Prompt').item.json.useJsonMode }) }}",
"options": {}
},
"id": "ai-engine-chat",
"name": "AI Engine Chat",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1340,
300
]
},
{
"parameters": {
"url": "={{ $('Execute Workflow Trigger').item.json.runData.logUrl }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "x-webhook-token",
"value": "org-ai-n8n-secret-token"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "taskId",
"value": "={{ $('Execute Workflow Trigger').item.json.runData.taskId }}"
},
{
"name": "message",
"value": "=Claude \u30e2\u30c7\u30eb: {{ $('AI Engine Chat').item.json.model }} ({{ $('AI Engine Chat').item.json.tokens_used }} tokens)"
},
{
"name": "level",
"value": "INFO"
}
]
},
"options": {}
},
"id": "log-done",
"name": "Log Done",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1560,
300
]
},
{
"parameters": {
"url": "={{ $('Execute Workflow Trigger').item.json.runData.callbackUrl }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "x-webhook-token",
"value": "org-ai-n8n-secret-token"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "taskId",
"value": "={{ $('Execute Workflow Trigger').item.json.runData.taskId }}"
},
{
"name": "status",
"value": "DONE"
},
{
"name": "output",
"value": "={{ $('AI Engine Chat').item.json.content }}"
},
{
"name": "workflowId",
"value": "={{ $workflow.id }}"
}
]
},
"options": {}
},
"id": "complete-task",
"name": "Complete Task",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1780,
300
]
}
],
"connections": {
"Execute Workflow Trigger": {
"main": [
[
{
"node": "Log Start",
"type": "main",
"index": 0
}
]
]
},
"Log Start": {
"main": [
[
{
"node": "Detect Task Type",
"type": "main",
"index": 0
}
]
]
},
"Detect Task Type": {
"main": [
[
{
"node": "Build Structured Prompt",
"type": "main",
"index": 0
}
]
]
},
"Build Structured Prompt": {
"main": [
[
{
"node": "Log Task Mode",
"type": "main",
"index": 0
}
]
]
},
"Log Task Mode": {
"main": [
[
{
"node": "AI Engine Chat",
"type": "main",
"index": 0
}
]
]
},
"AI Engine Chat": {
"main": [
[
{
"node": "Log Done",
"type": "main",
"index": 0
}
]
]
},
"Log Done": {
"main": [
[
{
"node": "Complete Task",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true
},
"staticData": null
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
org-ai Task Execute. Uses executeWorkflowTrigger, httpRequest. Event-driven trigger; 11 nodes.
Source: https://github.com/hamahiro1668/org-ai-platform/blob/6f67052f1e1a34af45ddc7c6645c089285669a46/apps/n8n-workflows/task-execute.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
02_LLM_Pipeline v1.0. Uses executeWorkflowTrigger, httpRequest, seaTable. Event-driven trigger; 65 nodes.
This template is a powerful, reusable utility for managing stateful, long-running processes. It allows a main workflow to be paused indefinitely at "checkpoints" and then be resumed by external, async
Upload files from any source to your account Kommo or AmoCRM with a simple and reusable workflow. It can split a large file into small ones and upload chunks. Works for Kommo and amoCRM There are 3 re
Remixed Backup your workflows to GitHub from Solomon's work. Check out his templates.
Remixed Backup your workflows to GitHub from Solomon's work. Check out his templates.