{
  "name": "Flowforge · Error Reporter",
  "nodes": [
    {
      "parameters": {
        "content": "## Error Reporter\nShared error workflow. In every other Flowforge workflow open Settings → Error workflow and select this one. Failed executions are posted to #automation-alerts and logged in a sheet; fix the cause, then open the execution and Retry.\n\nCredentials: Slack, Google Sheets.",
        "height": 240,
        "width": 460,
        "color": 5
      },
      "id": "00000079-f10f-4f0e-9a1b-000000001121",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -40
      ]
    },
    {
      "parameters": {},
      "id": "00000076-f10f-4f0e-9a1b-000000001118",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        240,
        400
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#automation-alerts",
          "mode": "name"
        },
        "text": "=:x: *{{ $json.workflow.name }}* failed at *{{ $json.execution.lastNodeExecuted }}*\n>{{ $json.execution.error.message }}\n<{{ $json.execution.url }}|Open the failed execution> and use Retry after fixing the cause.",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "unfurl_links": false
        }
      },
      "id": "00000077-f10f-4f0e-9a1b-000000001119",
      "name": "Slack: #automation-alerts",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        480,
        400
      ],
      "credentials": {
        "slackApi": {
          "id": "cr03",
          "name": "Slack – Flowforge Bot"
        }
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "REPLACE_WITH_ERROR_LOG_SHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Errors",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Time": "={{ $now.toISO() }}",
            "Workflow": "={{ $json.workflow.name }}",
            "Node": "={{ $json.execution.lastNodeExecuted }}",
            "Error": "={{ $json.execution.error.message }}",
            "Execution": "={{ $json.execution.url }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Time",
              "displayName": "Time",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Workflow",
              "displayName": "Workflow",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Node",
              "displayName": "Node",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Error",
              "displayName": "Error",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Execution",
              "displayName": "Execution",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ]
        },
        "options": {
          "cellFormat": "RAW"
        }
      },
      "id": "00000078-f10f-4f0e-9a1b-000000001120",
      "name": "Sheets: Error Log",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        720,
        400
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cr02",
          "name": "Google Sheets – Ops"
        }
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Slack: #automation-alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack: #automation-alerts": {
      "main": [
        [
          {
            "node": "Sheets: Error Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false,
    "instanceId": "flowforge-concept-demo"
  },
  "tags": [
    {
      "id": "ff-tag-ops",
      "name": "ops"
    },
    {
      "id": "ff-tag-monitoring",
      "name": "monitoring"
    }
  ]
}