{
  "nodes": [
    {
      "parameters": {},
      "id": "bea2d50c-09b6-4b4d-bcc9-e824b37a8939",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        120,
        420
      ]
    },
    {
      "parameters": {
        "workflowId": "=odsVnHQYQYMalWvL",
        "options": {}
      },
      "id": "1cefa37b-b190-4cec-a11c-5d6d10676792",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1,
      "position": [
        560,
        320
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9b0d5475-ea8e-4732-bcb4-9659a6bc1445",
              "name": "execution.url",
              "value": "={{ $('Error Trigger').item.json.execution.url }}",
              "type": "string"
            },
            {
              "id": "d6f641e6-c957-4008-ab04-21a503f78cf2",
              "name": "Workflow ID",
              "value": "={{ $('Error Trigger').item.json.workflow.id }}",
              "type": "string"
            },
            {
              "id": "7a96bbac-0df9-4055-8b9b-12a6fa801979",
              "name": "Last Node Executed",
              "value": "={{ $('Error Trigger').item.json.execution.lastNodeExecuted }}",
              "type": "string"
            },
            {
              "id": "6aa97632-d509-4e3a-b481-632776866313",
              "name": "execution.mode",
              "value": "={{ $('Error Trigger').item.json.execution.mode }}",
              "type": "string"
            },
            {
              "id": "4f212860-67a4-4c15-93c0-a6b77c311bfc",
              "name": "workflow.name",
              "value": "={{ $('Error Trigger').item.json.workflow.name }}",
              "type": "string"
            },
            {
              "id": "cd09f3e0-10bf-4f15-9782-3f805043f6c2",
              "name": "error message",
              "value": "={{ $('Error Trigger').item.json.execution.error.message }} ",
              "type": "string"
            },
            {
              "id": "315ce145-5941-4eea-9002-4400ef386361",
              "name": "execution.id",
              "value": "={{ $json.execution.id }}",
              "type": "number"
            },
            {
              "id": "d14e8b8e-da47-4169-a6c1-cbd10aa1f5de",
              "name": "stack",
              "value": "={{ $json.execution.error.stack }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "36f1ca94-22e5-4958-bb07-cfffeb89db82",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        340,
        320
      ]
    },
    {
      "parameters": {
        "url": "=https://automation.prod.gosharpei.com/api/v1/executions/{{ $json.execution.id }} ",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "includeData",
              "value": "true"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "X-N8N-API-KEY",
              "value": "n8n_api_af5f5f83a6fc38791c2f76626099e6ad08f55a316db2c371fc1830256eb0f132efb5efd1138b2415"
            }
          ]
        },
        "options": {}
      },
      "id": "306ccc4b-2388-41e3-bf7c-b8cdd9f97382",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        340,
        540
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9b0d5475-ea8e-4732-bcb4-9659a6bc1445",
              "name": "execution.url",
              "value": "={{ $('Error Trigger').item.json.execution.url }}",
              "type": "string"
            },
            {
              "id": "d6f641e6-c957-4008-ab04-21a503f78cf2",
              "name": "Workflow ID",
              "value": "={{ $('Error Trigger').item.json.workflow.id }}",
              "type": "string"
            },
            {
              "id": "7a96bbac-0df9-4055-8b9b-12a6fa801979",
              "name": "Last Node Executed",
              "value": "={{ $('Error Trigger').item.json.execution.lastNodeExecuted }}",
              "type": "string"
            },
            {
              "id": "6aa97632-d509-4e3a-b481-632776866313",
              "name": "execution.mode",
              "value": "={{ $('Error Trigger').item.json.execution.mode }}",
              "type": "string"
            },
            {
              "id": "4f212860-67a4-4c15-93c0-a6b77c311bfc",
              "name": "workflow.name",
              "value": "={{ $('Error Trigger').item.json.workflow.name }}",
              "type": "string"
            },
            {
              "id": "cd09f3e0-10bf-4f15-9782-3f805043f6c2",
              "name": "error message",
              "value": "={{ $('Error Trigger').item.json.execution.error.message }} ",
              "type": "string"
            },
            {
              "id": "315ce145-5941-4eea-9002-4400ef386361",
              "name": "execution.id",
              "value": "={{ $json.id }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "cd01596b-1a73-4606-b6e7-180ea28d3109",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        780,
        540
      ]
    },
    {
      "parameters": {
        "workflowId": "OEzi72ULG29H6UsZ",
        "options": {}
      },
      "id": "32958993-b0db-4890-a030-028da5f5a814",
      "name": "Execute Workflow1",
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1,
      "position": [
        1020,
        540
      ]
    },
    {
      "parameters": {
        "content": "## all zone ",
        "height": 80,
        "width": 150
      },
      "id": "706acb0e-b5b2-4469-8dd8-0ab20a0b2178",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        100,
        600
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "76d66fe2-7c19-45d4-885c-e6e2e7714f93",
              "leftValue": "={{ $json.data.resultData.runData.PrestaShop[0].data.main[0][0].json.headers.authorization }}",
              "rightValue": "=2y$10$uIYEY6Q.Hk10YmSc68sKN..0nho1gc9tpzAgePdz/GbsIHA5oQn1.",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "815de0ed-9bcd-4648-aea3-2fc9fd7512cb",
      "name": "If allzone key",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        560,
        540
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://sharpei.webhook.office.com/webhookb2/af4ea118-4f86-48cb-b3d1-62239526aead@de457da9-8950-40d6-82f2-cb5ad8d8ba2e/IncomingWebhook/d8b451e836f24d7e8bfcd8c098513c23/5549a3a2-a457-4119-a042-db32a82a98a9/V2ln_nos19vtL1O7mFwpGp3eESVeqMnT7t7h2rIyHmhV01",
        "sendHeaders": true,
        "specifyHeaders": "json",
        "jsonHeaders": "{\"Content-Type\":\"application/json\"}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"text\":  \"Workflow name: {{ $('Edit Fields').item.json.workflow.name }} ______Execution_id: {{ $('Edit Fields').item.json.execution.id }}_____Stack error: {{$('Edit Fields').item.json.stack.replace(/\"/g, '\\\\\"').replace(/\\n/g, '\\\\n') }}\"\n}         ",
        "options": {}
      },
      "id": "666d08b0-aff3-49b7-97fe-56d3c9997b08",
      "name": "Teams",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        780,
        320
      ]
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow": {
      "main": [
        [
          {
            "node": "Teams",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "If allzone key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Execute Workflow1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If allzone key": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}