{
  "name": "Automate Shopify orders from Airtable with Gmail confirmations",
  "nodes": [
    {
      "id": "c07b2f4e-f9c6-40a9-88a3-cd3d905b1ab4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -416
      ],
      "parameters": {
        "width": 384,
        "height": 560,
        "content": "##  The Trigger\n\n### This node acts as the workflow's entry point. It waits for a signal from an external service\n\n### It's designed to be triggered by an Airtable Automation whenever you mark an orde"
      }
    },
    {
      "id": "aa293e3f-80ae-4d7d-822d-99060117f9d8",
      "name": "Trigger from Airtable",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1520,
        -16
      ]
    },
    {
      "id": "5446b168-c78c-438f-9670-1a5e050a978f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -416
      ],
      "parameters": {
        "width": 368,
        "height": 560,
        "content": "##  Fetch Order & Customer Details\n\n### This node receives the recordId from the Webhook and uses it to look up the complete order record in your Airtable Orders table.\n\n### It gathers all the essenti"
      }
    },
    {
      "id": "2f2c60e4-ffab-475a-9b09-5cd5bfa5e723",
      "name": "Fetch Order & Customer Details",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -1056,
        -16
      ]
    },
    {
      "id": "d2faa646-73ed-4945-973c-9519a5ef172b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -416
      ],
      "parameters": {
        "width": 368,
        "height": 560,
        "content": "##   Fetch Product Line Items \n\n### After getting the main order details, this node looks up the associated Order Line Items record.\n\n###  It retrieves the specific products for the order, including t"
      }
    },
    {
      "id": "f95ca4c0-d248-45d7-b6f1-e232b625dc09",
      "name": "Fetch Product Line Items",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -640,
        -16
      ]
    },
    {
      "id": "d26b1db9-f190-4ff5-9f9a-f8e24cb15fe0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -416
      ],
      "parameters": {
        "width": 368,
        "height": 576,
        "content": "##  Create the Order in Shopify\n\n### This is the core action of the workflow. It takes all the customer and product information gathered from Airtable and uses it to create a new order directly in you"
      }
    },
    {
      "id": "5f84993b-5a4b-4afb-b9b5-4afe10c5e86e",
      "name": "Create the Order in Shopify",
      "type": "n8n-nodes-base.shopify",
      "position": [
        -208,
        -16
      ]
    },
    {
      "id": "1a679ecb-190e-47b7-b8cc-e7a552ef265b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -416
      ],
      "parameters": {
        "width": 368,
        "height": 576,
        "content": "##  Send Order Confirmation Email\n\n### Once the Shopify order is created successfully, this node sends a confirmation email to the customer.\n\n\n###  It uses data from the new Shopify order (like order_"
      }
    },
    {
      "id": "faaae486-32c7-4cf8-8c1b-15b2bb84ede0",
      "name": "Send Order Confirmation Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        176,
        -16
      ]
    },
    {
      "id": "b8ce7156-635b-4294-b7dd-429aa4995401",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -416
      ],
      "parameters": {
        "width": 368,
        "height": 576,
        "content": "##  Close the Loop - Update Airtable Status\n\n### This is the final step. It takes the original recordId from the very beginning of the workflow and uses it to find the order record in your Airtable Or"
      }
    },
    {
      "id": "38c5e7da-e7ec-4dd5-8d52-4684b600483f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        256
      ],
      "parameters": {
        "width": 432,
        "height": 560,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n##  Confirm Email Sent?\n\n### This is a simple but important checkpoint. It checks the output from the Gmail node to confirm that the confirmation email was successfully sent.\n\n\n###  If t"
      }
    },
    {
      "id": "0899512f-4f91-4e92-91aa-4df4b3861d3c",
      "name": "Confirm Email Sent?",
      "type": "n8n-nodes-base.if",
      "position": [
        560,
        304
      ]
    },
    {
      "id": "18b32ce7-74e4-42a0-ad1a-0e21502f3981",
      "name": "Close the Loop - Update Airtable Status",
      "type": "n8n-nodes-base.airtable",
      "position": [
        752,
        -32
      ]
    }
  ],
  "connections": {
    "Confirm Email Sent?": {
      "main": [
        [
          {
            "node": "Close the Loop - Update Airtable Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger from Airtable": {
      "main": [
        [
          {
            "node": "Fetch Order & Customer Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Product Line Items": {
      "main": [
        [
          {
            "node": "Create the Order in Shopify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create the Order in Shopify": {
      "main": [
        [
          {
            "node": "Send Order Confirmation Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Order Confirmation Email": {
      "main": [
        [
          {
            "node": "Confirm Email Sent?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Order & Customer Details": {
      "main": [
        [
          {
            "node": "Fetch Product Line Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}