AutomationFlowsAI & RAG › Report Workflow Errors to Asana Tasks with Google Chat and Grok 4.5 Analysis

Report Workflow Errors to Asana Tasks with Google Chat and Grok 4.5 Analysis

ByAironauts AI @aironauts on n8n.io

When a monitored workflow fails, this reads its Description field to find the owning client and assignee, looks them up in Asana, analyses the error with Grok 4.5, and creates an assigned task with a severity-based due date. Repeat failures comment on the existing task. Any…

Event trigger★★★★☆ complexityAI-powered29 nodesError TriggerHTTP RequestAsanaAgentOpenRouter ChatOutput Parser Structured
AI & RAG Trigger: Event Nodes: 29 Complexity: ★★★★☆ AI nodes: yes Added:
Report Workflow Errors to Asana Tasks with Google Chat and Grok 4.5 Analysis — n8n workflow card showing Error Trigger, HTTP Request, Asana integration

This workflow corresponds to n8n.io template #17183 — we link there as the canonical source.

This workflow follows the Agent → Error Trigger 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 →

Download .json
{
  "id": "BofLnP9soCmShCgZ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Report n8n workflow errors to Google Chat and create AI-analysed tasks in Asana",
  "tags": [],
  "nodes": [
    {
      "id": "58cc225e-af7a-424f-b898-07dbd5bf36d5",
      "name": "When Workflow Errors",
      "type": "n8n-nodes-base.errorTrigger",
      "notes": "Fires when a monitored workflow fails",
      "position": [
        1984,
        1776
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "914006c6-6b8b-4473-97d4-aaca4dfd8255",
      "name": "Prepare Config Data",
      "type": "n8n-nodes-base.set",
      "notes": "Fill in all four values before running",
      "position": [
        2208,
        1776
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "asanaWorkspaceId",
              "value": "YOUR_ASANA_WORKSPACE_ID"
            },
            {
              "name": "googleChatWebhookUrl",
              "value": "https://chat.googleapis.com/v1/spaces/YOUR_SPACE_ID/messages?key=YOUR_TOKEN_HERE&token=YOUR_TOKEN_HERE"
            },
            {
              "name": "n8nApiBaseUrl",
              "value": "https://your-n8n-instance.com"
            },
            {
              "name": "timezoneOffsetHours",
              "value": "0"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "id": "4171e8bc-4f1f-4489-8894-c85b4d07fbc8",
      "name": "Fetch Workflow Metadata",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Reads the failed workflow's Description field",
      "position": [
        2432,
        1776
      ],
      "parameters": {
        "url": "={{ $('Configuration').first().json.n8nApiBaseUrl + '/api/v1/workflows/' + $('On Error Trigger').first().json.workflow.id }}",
        "options": {
          "timeout": 10000
        },
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "n8nApi"
      },
      "executeOnce": true,
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "65f30c91-d79c-4854-a175-6f5a2f0b3940",
      "name": "Extract Error Details",
      "type": "n8n-nodes-base.set",
      "notes": "Flattens payload + parses Description JSON",
      "position": [
        2656,
        1776
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "workflowName",
              "value": "={{ $('On Error Trigger').first().json.workflow.name }}"
            },
            {
              "name": "workflowId",
              "value": "={{ String($('On Error Trigger').first().json.workflow.id) }}"
            },
            {
              "name": "executionId",
              "value": "={{ String($('On Error Trigger').first().json.execution.id) }}"
            },
            {
              "name": "executionMode",
              "value": "={{ $('On Error Trigger').first().json.execution.mode }}"
            },
            {
              "name": "lastNode",
              "value": "={{ $('On Error Trigger').first().json.execution.lastNodeExecuted }}"
            },
            {
              "name": "errorMessage",
              "value": "={{ $('On Error Trigger').first().json.execution.error.message }}"
            },
            {
              "name": "executionUrl",
              "value": "={{ $('On Error Trigger').first().json.execution.url }}"
            },
            {
              "name": "asanaClient",
              "value": "={{ (() => { try { return JSON.parse($json.description || '{}').client || '' } catch(e) { return '' } })() }}"
            },
            {
              "name": "asanaAssignee",
              "value": "={{ (() => { try { return JSON.parse($json.description || '{}').assignee || '' } catch(e) { return '' } })() }}"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "id": "9acfa74d-b65c-40c9-b237-2db582814062",
      "name": "Fetch Asana Projects",
      "type": "n8n-nodes-base.asana",
      "notes": "Live lookup, no hardcoded GIDs",
      "position": [
        2896,
        1632
      ],
      "parameters": {
        "resource": "project",
        "operation": "getAll",
        "returnAll": true,
        "workspace": "={{ $('Configuration').first().json.asanaWorkspaceId }}",
        "additionalFields": {}
      },
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "cb85ed71-ac9d-4961-b87a-6279b8246754",
      "name": "Fetch Asana Users",
      "type": "n8n-nodes-base.asana",
      "notes": "Live lookup, no hardcoded GIDs",
      "position": [
        2896,
        1920
      ],
      "parameters": {
        "resource": "user",
        "operation": "getAll",
        "workspace": "={{ $('Configuration').first().json.asanaWorkspaceId }}"
      },
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "8c9f9db9-c05e-44ba-a5ff-dba90569a197",
      "name": "Merge Asana Projects and Users",
      "type": "n8n-nodes-base.merge",
      "position": [
        3168,
        1776
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "f62f62cb-8125-4ed8-8202-c0c2ca957e3c",
      "name": "Link Asana Project and User",
      "type": "n8n-nodes-base.code",
      "position": [
        3392,
        1776
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nconst ctx = $('Extract error context').first().json;\nconst client = (ctx.asanaClient || '').trim().toLowerCase();\nconst assignee = (ctx.asanaAssignee || '').trim().toLowerCase();\n\nconst projects = items.filter(i => i.json.resource_type === 'project');\nconst users = items.filter(i => i.json.resource_type === 'user');\n\nconst matchedProject = client\n  ? projects.find(i => (i.json.name || '').trim().toLowerCase() === client)\n  : null;\n\nconst matchedUser = assignee\n  ? users.find(i => {\n      const fullName = (i.json.name || '').trim().toLowerCase();\n      const words = assignee.split(' ').filter(w => w.length > 0);\n      return words.every(w => fullName.includes(w));\n    })\n  : null;\n\nconst missing = [];\nif (!matchedProject) missing.push('project');\nif (!matchedUser) missing.push('user');\n\nreturn [{\n  json: {\n    projectGid: matchedProject ? matchedProject.json.gid : null,\n    projectName: matchedProject ? matchedProject.json.name : null,\n    userGid: matchedUser ? matchedUser.json.gid : null,\n    userName: matchedUser ? matchedUser.json.name : null,\n    workflowName: ctx.workflowName,\n    workflowId: ctx.workflowId,\n    executionId: ctx.executionId,\n    executionMode: ctx.executionMode,\n    lastNode: ctx.lastNode,\n    errorMessage: ctx.errorMessage,\n    executionUrl: ctx.executionUrl,\n    asanaClient: ctx.asanaClient,\n    asanaAssignee: ctx.asanaAssignee,\n    resolveError: missing.length ? 'Missing: ' + missing.join(', ') : null\n  }\n}];"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "b4434058-ebc5-4822-8078-bdde5aa1b13e",
      "name": "Find Existing Error Task",
      "type": "n8n-nodes-base.asana",
      "notes": "Empty result is expected, alwaysOutputData is on",
      "position": [
        3632,
        1776
      ],
      "parameters": {
        "operation": "search",
        "workspace": "={{ $('Configuration').first().json.asanaWorkspaceId }}",
        "searchTaskProperties": {
          "text": "={{ '[ERROR] ' + $json.workflowName + ' - ' + $json.lastNode }}",
          "completed": false
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "b5abbf0d-bcff-4f7c-9c48-3254a795d715",
      "name": "Identify Duplicate Task",
      "type": "n8n-nodes-base.code",
      "position": [
        3856,
        1776
      ],
      "parameters": {
        "jsCode": "const searchResults = $input.all();\nconst rg = $('Match Asana project and user').first().json;\n\nconst matchedTask = searchResults.find(i => i.json.gid);\nconst isDuplicate = !!matchedTask;\n\nreturn [{\n  json: {\n    isDuplicate,\n    existingTaskGid: isDuplicate ? matchedTask.json.gid : null,\n    projectGid: rg.projectGid,\n    projectName: rg.projectName,\n    userGid: rg.userGid,\n    userName: rg.userName,\n    workflowName: rg.workflowName,\n    workflowId: rg.workflowId,\n    executionId: rg.executionId,\n    executionMode: rg.executionMode,\n    lastNode: rg.lastNode,\n    errorMessage: rg.errorMessage,\n    executionUrl: rg.executionUrl,\n    asanaClient: rg.asanaClient,\n    asanaAssignee: rg.asanaAssignee,\n    resolveError: rg.resolveError\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "84d0a78c-b464-4b5d-bded-21f26f315fc9",
      "name": "If Task Exists Already",
      "type": "n8n-nodes-base.if",
      "position": [
        4080,
        1776
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1307425e-e5bf-4715-8def-7b9330c97efe",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.isDuplicate }}",
              "rightValue": false
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "9868c669-4596-40a3-aee6-68798d12a782",
      "name": "Comment on Existing Task",
      "type": "n8n-nodes-base.asana",
      "position": [
        4304,
        1600
      ],
      "parameters": {
        "id": "={{ $json.existingTaskGid }}",
        "text": "={{ 'Recurring error - Execution #' + $json.executionId + '\\nMode: ' + $json.executionMode + '\\nNode: ' + $json.lastNode + '\\nError: ' + $json.errorMessage + '\\n\\nExecution URL: ' + $json.executionUrl }}",
        "resource": "taskComment",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "b1c09aac-a77e-411c-8bb9-64ce6597804a",
      "name": "Combine Context and Comment",
      "type": "n8n-nodes-base.merge",
      "position": [
        4576,
        1744
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "aa179bd0-f105-45ae-a0e3-22c51c769c9a",
      "name": "Notify Recurring Error on Chat",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4864,
        1744
      ],
      "parameters": {
        "url": "={{ $('Configuration').first().json.googleChatWebhookUrl }}",
        "body": "={{ JSON.stringify({\n  cardsV2: [{\n    cardId: 'error-alert',\n    card: {\n      header: {\n        title: '[Recurring] ' + $json.errorMessage,\n        subtitle: $json.workflowName,\n        imageUrl: 'https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/warning/default/48px.svg',\n        imageType: 'CIRCLE'\n      },\n      sections: [\n        ...($json.resolveError ? [{\n          header: 'Configuration warning',\n          widgets: [\n            { textParagraph: { text: '<b>' + $json.resolveError + '</b>' } },\n            { textParagraph: { text: 'The Description JSON in ' + $json.workflowName + ' has client \"' + $json.asanaClient + '\" and assignee \"' + $json.asanaAssignee + '\". One of these does not match Asana.' } }\n          ]\n        }] : []),\n        {\n          header: 'This error has occurred before',\n          widgets: [\n            { textParagraph: { text: '<b>Workflow:</b> ' + $json.workflowName + ' (' + $json.workflowId + ')' } },\n            { textParagraph: { text: '<b>Failed node:</b> ' + $json.lastNode } },\n            { textParagraph: { text: '<b>Error:</b> ' + $json.errorMessage } },\n            { textParagraph: { text: '<b>Execution ID:</b> ' + $json.executionId } },\n            { textParagraph: { text: '<b>Project:</b> ' + ($json.projectName || 'Not set') } },\n            { textParagraph: { text: '<b>Assigned to:</b> ' + ($json.userName || 'Not assigned') } }\n          ]\n        },\n        {\n          widgets: [{\n            buttonList: {\n              buttons: [\n                { text: 'Open execution', onClick: { openLink: { url: $json.executionUrl } } },\n                { text: 'View Asana task', onClick: { openLink: { url: 'https://app.asana.com/0/' + $json.projectGid + '/' + $json.target.gid } } }\n              ]\n            }\n          }]\n        }\n      ]\n    }\n  }]\n}) }}",
        "method": "POST",
        "options": {
          "timeout": 15000
        },
        "sendBody": true,
        "contentType": "raw",
        "sendHeaders": true,
        "rawContentType": "application/json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json; charset=UTF-8"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "502284a2-6b8f-45bd-8e3e-27a75af8e6be",
      "name": "AI Error Analysis Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4336,
        2048
      ],
      "parameters": {
        "text": "=Workflow: {{ $json.workflowName }}\nFailed node: {{ $json.lastNode }}\nError message: {{ $json.errorMessage }}\nExecution mode: {{ $json.executionMode }}\nExecution URL: {{ $json.executionUrl }}",
        "options": {
          "systemMessage": "You are a senior n8n automation engineer specializing in debugging workflow failures. Your job is to analyze error reports and produce structured debug output.\n\nCONTEXT: n8n is a workflow automation platform. Workflows consist of nodes (triggers, integrations, code). Errors occur at a specific node and halt execution.\n\nRULES:\n- Return raw JSON only. No markdown. No code fences. No preamble.\n- \"root_cause\" must explain WHY the error happened, not just restate the message.\n- \"solution\" must name the exact node, field, or setting to fix.\n- \"steps\" must be 2-4 concrete actions, each starting with an action verb.\n- \"severity\" must follow the scale below exactly.\n- \"error_category\" must be exactly one of the allowed values.\n\nSEVERITY SCALE:\n- Critical: data loss risk or complete workflow failure affecting end users\n- High: core function broken, no workaround, needs fix today\n- Medium: partial failure, workaround exists, fix within 3 days\n- Low: cosmetic or edge case, fix when convenient\n\nERROR CATEGORIES:\n- unicode: character encoding or special character issues\n- credential: authentication, API key, or permission errors\n- network: timeout, connection refused, DNS, or HTTP errors\n- logic: wrong expression, wrong node reference, or bad data mapping\n- configuration: missing or invalid node parameter\n- parsing: JSON, XML, or data format errors\n\nOUTPUT FORMAT (return this exact structure, values only in English):\n{\"root_cause\":\"...\",\"solution\":\"...\",\"steps\":[\"...\",\"...\"],\"severity\":\"...\",\"error_category\":\"...\"}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 3.1
    },
    {
      "id": "d2351751-43e0-49cb-92cf-ca640d852dea",
      "name": "OpenRouter Chat Interface",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        4304,
        2304
      ],
      "parameters": {
        "model": "x-ai/grok-4.5",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "8de80115-6737-46ab-a519-2b2d9322d423",
      "name": "Error Analysis Structure",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        4544,
        2304
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"root_cause\": {\n      \"type\": \"string\",\n      \"description\": \"One sentence explaining WHY the error happened, not just restating the message\"\n    },\n    \"solution\": {\n      \"type\": \"string\",\n      \"description\": \"Specific actionable fix naming the exact node, field, or setting to change\"\n    },\n    \"steps\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"minItems\": 2,\n      \"maxItems\": 4,\n      \"description\": \"2-4 concrete actions each starting with an action verb\"\n    },\n    \"severity\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"Critical\",\n        \"High\",\n        \"Medium\",\n        \"Low\"\n      ]\n    },\n    \"error_category\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"unicode\",\n        \"credential\",\n        \"network\",\n        \"logic\",\n        \"configuration\",\n        \"parsing\"\n      ]\n    }\n  },\n  \"required\": [\n    \"root_cause\",\n    \"solution\",\n    \"steps\",\n    \"severity\",\n    \"error_category\"\n  ]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "492d9552-3fad-4111-bee7-417eec443364",
      "name": "Assign Due Date by Severity",
      "type": "n8n-nodes-base.code",
      "position": [
        4656,
        2048
      ],
      "parameters": {
        "jsCode": "const output = $json.output;\nconst cd = $('Check Duplicate?').first().json;\nconst cfg = $('Configuration').first().json;\n\nconst daysMap = { 'Critical': 0, 'High': 1, 'Medium': 3, 'Low': 7 };\nconst days = daysMap[output.severity] ?? 3;\n\nconst offsetHours = Number(cfg.timezoneOffsetHours) || 0;\nconst dueDate = new Date(Date.now() + offsetHours * 60 * 60 * 1000);\ndueDate.setDate(dueDate.getDate() + days);\nconst due_on = dueDate.toISOString().split('T')[0];\n\nreturn [{\n  json: {\n    root_cause: output.root_cause,\n    solution: output.solution,\n    steps: output.steps,\n    severity: output.severity,\n    error_category: output.error_category,\n    due_on,\n    projectGid: cd.projectGid,\n    projectName: cd.projectName,\n    userGid: cd.userGid,\n    userName: cd.userName,\n    workflowName: cd.workflowName,\n    workflowId: cd.workflowId,\n    executionId: cd.executionId,\n    executionMode: cd.executionMode,\n    lastNode: cd.lastNode,\n    errorMessage: cd.errorMessage,\n    executionUrl: cd.executionUrl,\n    asanaClient: cd.asanaClient,\n    asanaAssignee: cd.asanaAssignee,\n    resolveError: cd.resolveError\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "0ce1fac1-9399-4e78-a836-da86670853d8",
      "name": "Add New Task in Asana",
      "type": "n8n-nodes-base.asana",
      "position": [
        4896,
        2144
      ],
      "parameters": {
        "name": "={{ '[ERROR] ' + $json.workflowName + ' - ' + $json.lastNode }}",
        "workspace": "={{ $('Configuration').first().json.asanaWorkspaceId }}",
        "otherProperties": {
          "notes": "={{ '[' + $json.severity + '] ' + $json.error_category.toUpperCase() + ($json.resolveError ? '\\n\\nCONFIG WARNING: ' + $json.resolveError : '') + '\\n\\nROOT CAUSE:\\n' + $json.root_cause + '\\n\\nSOLUTION:\\n' + $json.solution + '\\n\\nSTEPS:\\n' + $json.steps.map((s, i) => (i+1) + '. ' + s).join('\\n') + '\\n\\nEXECUTION DETAILS:\\nWorkflow: ' + $json.workflowName + ' (' + $json.workflowId + ')\\nExecution ID: ' + $json.executionId + '\\nMode: ' + $json.executionMode + '\\nFailed node: ' + $json.lastNode + '\\nError: ' + $json.errorMessage + '\\n\\nExecution URL:\\n' + $json.executionUrl }}",
          "due_on": "={{ $json.due_on }}",
          "assignee": "={{ $json.userGid || '' }}",
          "projects": "={{ $json.projectGid ? [$json.projectGid] : [] }}"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d4f2a73b-93c8-4da7-8ecf-dfaa7d9a4958",
      "name": "Combine Analysis and Task",
      "type": "n8n-nodes-base.merge",
      "position": [
        5120,
        1936
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "1a9f54c6-bf0f-4d98-bfa0-94b55ea0ccba",
      "name": "Notify New Error on Chat",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5376,
        1936
      ],
      "parameters": {
        "url": "={{ $('Configuration').first().json.googleChatWebhookUrl }}",
        "body": "={{ JSON.stringify({\n  cardsV2: [{\n    cardId: 'error-alert',\n    card: {\n      header: {\n        title: '[' + $json.severity + '] Workflow error: ' + $json.error_category.toUpperCase(),\n        subtitle: $json.workflowName,\n        imageUrl: 'https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/error/default/48px.svg',\n        imageType: 'CIRCLE'\n      },\n      sections: [\n        ...($json.resolveError ? [{\n          header: 'Configuration warning',\n          widgets: [\n            { textParagraph: { text: '<b>' + $json.resolveError + '</b>' } },\n            { textParagraph: { text: 'The Description JSON in ' + $json.workflowName + ' has client \"' + $json.asanaClient + '\" and assignee \"' + $json.asanaAssignee + '\". One of these does not match Asana.' } }\n          ]\n        }] : []),\n        {\n          header: 'AI analysis',\n          widgets: [\n            { textParagraph: { text: '<b>Root cause:</b> ' + $json.root_cause } },\n            { textParagraph: { text: '<b>Solution:</b> ' + $json.solution } },\n            { textParagraph: { text: '<b>Steps:</b>\\n' + $json.steps.map((s, i) => (i+1) + '. ' + s).join('\\n') } }\n          ]\n        },\n        {\n          header: 'Execution',\n          widgets: [\n            { textParagraph: { text: '<b>Workflow:</b> ' + $json.workflowName + ' (' + $json.workflowId + ')' } },\n            { textParagraph: { text: '<b>Failed node:</b> ' + $json.lastNode } },\n            { textParagraph: { text: '<b>Execution ID:</b> ' + $json.executionId } },\n            { textParagraph: { text: '<b>Project:</b> ' + ($json.projectName || 'Not set') } },\n            { textParagraph: { text: '<b>Assigned to:</b> ' + ($json.userName || 'Not assigned') } },\n            { textParagraph: { text: '<b>Due:</b> ' + $json.due_on } }\n          ]\n        },\n        {\n          widgets: [{\n            buttonList: {\n              buttons: [\n                { text: 'Open execution', onClick: { openLink: { url: $json.executionUrl } } },\n                { text: 'View Asana task', onClick: { openLink: { url: $json.permalink_url } } }\n              ]\n            }\n          }]\n        }\n      ]\n    }\n  }]\n}) }}",
        "method": "POST",
        "options": {
          "timeout": 15000
        },
        "sendBody": true,
        "contentType": "raw",
        "sendHeaders": true,
        "rawContentType": "application/json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json; charset=UTF-8"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "79631e62-3727-4178-bbc6-af3c62a0dcee",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        816
      ],
      "parameters": {
        "width": 540,
        "height": 1520,
        "content": "## Report n8n workflow errors to Google Chat and create AI-analysed tasks in Asana\n\nWhen a monitored workflow fails, this reads its Description field to find the owning client and assignee, looks them up in Asana, analyses the error with Grok 4.5, and creates an assigned task with a severity based due date. Repeat failures comment on the existing task instead of creating a duplicate.\n\nThere is no production trigger by design. This workflow only runs when another workflow names it as its error workflow.\n\n## Who it is for\n\nn8n teams or solo builders running several production workflows who need real time error visibility, an owned Asana task per failure, and a Google Chat alert, without checking execution logs by hand.\n\n## How it works\n\n1. Any workflow that names this one as its error workflow triggers it on failure.\n2. The error payload only carries a workflow ID, so an HTTP request calls the n8n API to read that workflow's own Description field, which holds a small JSON object naming the client and the assignee.\n3. Asana projects and users are fetched live and matched by name, so no GID is ever hardcoded. A failed match raises a warning that travels downstream instead of failing silently.\n4. Asana is searched for an open task covering the same workflow and node. If one exists, a comment carrying the new execution ID is added rather than a duplicate task.\n5. For a new error, Grok 4.5 via OpenRouter returns a root cause, a solution, concrete steps, a severity, and a category, held to a fixed shape by a structured output parser. Severity sets the due date: Critical today, High tomorrow, Medium in three days, Low in seven.\n6. A Google Chat card carries the analysis and links to both the execution and the Asana task.\n\n## How to set up\n\n1. Open the Prepare Config Data node and fill in your Asana workspace ID, your Google Chat webhook URL, your n8n base URL, and your timezone offset in hours.\n2. Attach credentials to the five Asana nodes, the Fetch Workflow Metadata node, and the OpenRouter Chat Interface node.\n3. In every workflow you want monitored, open Settings then Description and paste {\"client\": \"Your Asana project name\", \"assignee\": \"Person name\"}. The client must match an Asana project name exactly, case insensitive. The assignee can be a first name or a full name.\n4. In the same workflow, open Settings then Error Workflow and select this workflow. Repeat steps 3 and 4 for every workflow you want covered.\n\n## Requirements\n\n- n8n API key with read access to workflows\n- Asana account holding the target projects and users, plus your workspace ID from the Asana URL app.asana.com/0/{WORKSPACE_ID}\n- Google Chat space with an incoming webhook\n- OpenRouter API key with access to Grok 4.5, or any other model you prefer\n\n## How to customize\n\n- Change the severity to due date map in Assign Due Date by Severity\n- Swap the model in OpenRouter Chat Interface for anything OpenRouter offers\n- Add fields to Error Analysis Structure, then surface them in the task notes or the chat card\n- Replace the two Google Chat HTTP nodes to route alerts to Slack, Teams, or email, keeping everything upstream unchanged"
      },
      "typeVersion": 1
    },
    {
      "id": "eebeb426-2bc5-4f14-a11e-40ffc92ec387",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        1664
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "height": 272,
        "content": "## Error triggering and initiation\n\nBegins workflow on error condition, sets initial configuration and metadata."
      },
      "typeVersion": 1
    },
    {
      "id": "be39b47e-d295-4491-b041-a9b26761337d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2848,
        1472
      ],
      "parameters": {
        "color": 7,
        "height": 608,
        "content": "## Fetch Asana data\n\nFetches projects and user data from Asana for error context extraction."
      },
      "typeVersion": 1
    },
    {
      "id": "0639922f-1dab-47c0-82c9-92ae253d8937",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3120,
        1648
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 304,
        "content": "## Merge and match Asana entities\n\nMerges Asana projects and users data, matches them for task association."
      },
      "typeVersion": 1
    },
    {
      "id": "5a0c263b-96a5-49cf-b9ab-cd31a48c6ba0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3584,
        1664
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 272,
        "content": "## Check duplicates in Asana\n\nSearches for existing error tasks and checks for duplicates."
      },
      "typeVersion": 1
    },
    {
      "id": "6345209e-88bd-4e16-9946-bfe823eabda8",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4256,
        1488
      ],
      "parameters": {
        "color": 7,
        "width": 752,
        "height": 416,
        "content": "## Update Asana and notify Chat\n\nAdds comments to existing tasks or sends updates to Google Chat."
      },
      "typeVersion": 1
    },
    {
      "id": "bdfe4e82-ae91-446f-9f1a-3743b65365a4",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4256,
        1936
      ],
      "parameters": {
        "color": 7,
        "width": 784,
        "height": 512,
        "content": "## AI analysis and task creation\n\nAI analyzes error severity for Asana task creation based on severity-level."
      },
      "typeVersion": 1
    },
    {
      "id": "56ed467b-fe19-4bc6-84c7-1821b129a623",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5072,
        1824
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 272,
        "content": "## New task notification\n\nNotifies Google Chat with new Asana task data."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "c36931f3-1df1-4f3f-afbe-cf963aa51684",
  "nodeGroups": [],
  "connections": {
    "Fetch Asana Users": {
      "main": [
        [
          {
            "node": "Merge Asana Projects and Users",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Prepare Config Data": {
      "main": [
        [
          {
            "node": "Fetch Workflow Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Asana Projects": {
      "main": [
        [
          {
            "node": "Merge Asana Projects and Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Workflow Errors": {
      "main": [
        [
          {
            "node": "Prepare Config Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add New Task in Asana": {
      "main": [
        [
          {
            "node": "Combine Analysis and Task",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Extract Error Details": {
      "main": [
        [
          {
            "node": "Fetch Asana Projects",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Asana Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Task Exists Already": {
      "main": [
        [
          {
            "node": "Comment on Existing Task",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine Context and Comment",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "AI Error Analysis Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Error Analysis Agent": {
      "main": [
        [
          {
            "node": "Assign Due Date by Severity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Workflow Metadata": {
      "main": [
        [
          {
            "node": "Extract Error Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Identify Duplicate Task": {
      "main": [
        [
          {
            "node": "If Task Exists Already",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Comment on Existing Task": {
      "main": [
        [
          {
            "node": "Combine Context and Comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Analysis Structure": {
      "ai_outputParser": [
        [
          {
            "node": "AI Error Analysis Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Find Existing Error Task": {
      "main": [
        [
          {
            "node": "Identify Duplicate Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Analysis and Task": {
      "main": [
        [
          {
            "node": "Notify New Error on Chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Interface": {
      "ai_languageModel": [
        [
          {
            "node": "AI Error Analysis Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Assign Due Date by Severity": {
      "main": [
        [
          {
            "node": "Add New Task in Asana",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine Analysis and Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Context and Comment": {
      "main": [
        [
          {
            "node": "Notify Recurring Error on Chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Asana Project and User": {
      "main": [
        [
          {
            "node": "Find Existing Error Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Asana Projects and Users": {
      "main": [
        [
          {
            "node": "Link Asana Project and User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

When a monitored workflow fails, this reads its Description field to find the owning client and assignee, looks them up in Asana, analyses the error with Grok 4.5, and creates an assigned task with a severity-based due date. Repeat failures comment on the existing task. Any…

Source: https://n8n.io/workflows/17183/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow is designed for e-commerce, marketing teams, or creators who want to automate the production of high-quality, AI-generated product visuals and ad creatives.

HTTP Request, Error Trigger, Discord +7
AI & RAG

The Shopify AI Product Description Factory is a production-grade n8n workflow that converts product images and metadata into refined, SEO-aware descriptions—fully automated and region-agnostic. It ble

Memory Buffer Window, Output Parser Structured, OpenAI +7
AI & RAG

The AI-Powered Shopify SEO Content Automation is an enterprise-grade workflow that transforms product content creation for e-commerce stores. This sophisticated multi-agent system integrates GPT-4o, C

Perplexity Tool, Memory Buffer Window, Agent +15
AI & RAG

RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.

Telegram, Telegram Trigger, OpenAI Chat +8
AI & RAG

Deep Research new (fr). Uses outputParserStructured, formTrigger, chainLlm, form. Event-driven trigger; 82 nodes.

Output Parser Structured, Form Trigger, Chain Llm +8