{
  "name": "Log failed WooCommerce orders to Airtable and send OpenAI-powered Slack alerts",
  "nodes": [
    {
      "id": "0a9264be-bff1-46a8-969a-c18b2530a947",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -3504
      ],
      "parameters": {
        "width": 400,
        "height": 944,
        "content": "## How It Works\nThe workflow automatically monitors WooCommerce for failed payments, processes each failed order, and instantly notifies your team in Slack. It begins on a fixed schedule and retrieves"
      }
    },
    {
      "id": "4286a4ff-1ba2-436c-a442-6a513c7e6a46",
      "name": "Format Order Data1",
      "type": "n8n-nodes-base.code",
      "position": [
        1632,
        -2416
      ]
    },
    {
      "id": "e6f3b034-77d5-4a7b-bad6-4fe38ac61601",
      "name": "Save Failed Order to Airtable1",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1824,
        -2416
      ]
    },
    {
      "id": "a34e289e-1d4a-4d71-ad0e-63b361b98dad",
      "name": "Generate Slack Summary Message 1",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2160,
        -2432
      ]
    },
    {
      "id": "bd426bce-a45a-4cad-b750-06097ea2af91",
      "name": "Send Failed Order Alert to Slack1",
      "type": "n8n-nodes-base.slack",
      "position": [
        2480,
        -2432
      ]
    },
    {
      "id": "23c78a95-3933-4907-8d81-ebe64044b10c",
      "name": "Search records",
      "type": "n8n-nodes-base.airtable",
      "position": [
        800,
        -2432
      ]
    },
    {
      "id": "00ce6b80-a7b5-4678-aa84-9d1e9392a10b",
      "name": "Check Failed Orders (Scheduler)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -272,
        -2528
      ]
    },
    {
      "id": "beaeed54-b5c2-44dc-be64-297ad27addb5",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1616,
        -2784
      ]
    },
    {
      "id": "673d19ea-3c0c-4bac-8d55-48ed370d677d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        -2720
      ],
      "parameters": {
        "width": 416,
        "height": 384,
        "content": "## Workflow Start & Domain Setup\nThis section starts the workflow on a schedule and defines the WooCommerce domain dynamically. It ensures the automation runs consistently and allows easy switching be"
      }
    },
    {
      "id": "6fe9b56a-a0cc-4f1a-8458-3ea4533e735d",
      "name": "Set WooCommerce Domain2",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        -2528
      ]
    },
    {
      "id": "312c6e2e-b3c3-4884-ba8c-62ad53ca8550",
      "name": "Fetch Failed Orders From WooCommerce2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        -2528
      ]
    },
    {
      "id": "67026269-08d3-4988-b3f0-9fede8df3006",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        -2576
      ],
      "parameters": {
        "width": 608,
        "height": 320,
        "content": "## Create Summary & Send Team Notification\nThis section uses AI to create a concise summary of the failed order and sends it to Slack. It ensures your team receives a clear, actionable alert so they c"
      }
    },
    {
      "id": "c677ac86-ac73-4a64-859e-bdf507f1bb77",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -2576
      ],
      "parameters": {
        "width": 512,
        "height": 320,
        "content": "## Prepare & Save Failed Orders\nThis section formats the raw data into a clean finance-friendly structure, and stores the final result in Airtable. It ensures every failed order is captured, standardi"
      }
    },
    {
      "id": "2b1027da-7ef2-4293-ad1b-51b3b8fdf7c8",
      "name": "Process Each Failed Order",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        480,
        -2528
      ]
    },
    {
      "id": "b4249d93-b08c-4003-bd5c-fc3b6885c4ad",
      "name": "Attach Search Result to Order",
      "type": "n8n-nodes-base.merge",
      "position": [
        1072,
        -2496
      ]
    },
    {
      "id": "ca1544f7-de19-4a71-8319-b2e258f2e184",
      "name": "Is Order Already Logged?",
      "type": "n8n-nodes-base.if",
      "position": [
        1264,
        -2496
      ]
    },
    {
      "id": "9ffdf6ce-d0c9-4858-a937-937a1f498b24",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -2848
      ],
      "parameters": {
        "width": 256,
        "height": 224,
        "content": "This odres are already log in table"
      }
    },
    {
      "id": "3d14681e-c0fc-4f3a-bdbc-7adf4c5d0e40",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -2720
      ],
      "parameters": {
        "width": 1392,
        "height": 432,
        "content": "## Failed Order Handling & Duplicate Check\nThis block gets all FAILED orders from WooCommerce and handles them one by one. For each order, it checks Airtable using the order_id to see if the order is "
      }
    }
  ],
  "connections": {
    "Search records": {
      "main": [
        [
          {
            "node": "Attach Search Result to Order",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Format Order Data1": {
      "main": [
        [
          {
            "node": "Save Failed Order to Airtable1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set WooCommerce Domain2": {
      "main": [
        [
          {
            "node": "Fetch Failed Orders From WooCommerce2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Order Already Logged?": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Order Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Failed Order": {
      "main": [
        [],
        [
          {
            "node": "Search records",
            "type": "main",
            "index": 0
          },
          {
            "node": "Attach Search Result to Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attach Search Result to Order": {
      "main": [
        [
          {
            "node": "Is Order Already Logged?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Failed Order to Airtable1": {
      "main": [
        [
          {
            "node": "Generate Slack Summary Message 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Failed Orders (Scheduler)": {
      "main": [
        [
          {
            "node": "Set WooCommerce Domain2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Slack Summary Message 1": {
      "main": [
        [
          {
            "node": "Send Failed Order Alert to Slack1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Failed Orders From WooCommerce2": {
      "main": [
        [
          {
            "node": "Process Each Failed Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}