{
  "name": "Match WooCommerce orders to new Zendesk tickets and send confirmation emails",
  "nodes": [
    {
      "id": "123b86ac-2b5c-49e0-af22-82d0632c7bc0",
      "name": "Zendesk – New Ticket Trigger",
      "type": "n8n-nodes-base.zendeskTrigger",
      "position": [
        -400,
        128
      ]
    },
    {
      "id": "814dff7d-0ca9-42d6-bb7e-b2c515a63f61",
      "name": "Zendesk – Fetch Ticket Requester",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        -192,
        128
      ]
    },
    {
      "id": "edb1cf48-b747-4c55-b1fd-a9b185f48a77",
      "name": "WooCommerce – Fetch Recent Orders",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        208,
        128
      ]
    },
    {
      "id": "14cc1f95-44b4-46b8-9548-a643b72a48aa",
      "name": "Match Customer Email (Zendesk vs Woo)",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        128
      ]
    },
    {
      "id": "82f416f0-4ae2-48a3-9022-c90678ec8056",
      "name": "Generate Zendesk Tags from Order Status",
      "type": "n8n-nodes-base.code",
      "position": [
        1152,
        112
      ]
    },
    {
      "id": "8c129c74-b1f7-4ab7-bc77-6a4554e7481e",
      "name": "Prepare Ticket Update Payload",
      "type": "n8n-nodes-base.set",
      "position": [
        1664,
        112
      ]
    },
    {
      "id": "de1536b9-aeaf-4083-a758-20c111131ae8",
      "name": "Zendesk – Update Ticket with Order Details",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        1872,
        112
      ]
    },
    {
      "id": "7df57b88-3a93-4015-84c9-9ef7a6baff97",
      "name": "Check Order Status = Completed",
      "type": "n8n-nodes-base.if",
      "position": [
        2224,
        112
      ]
    },
    {
      "id": "8220f82d-29ea-4f1a-bfd5-89475714d488",
      "name": "Send Order Confirmation Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2496,
        96
      ]
    },
    {
      "id": "c21cb400-7cbb-4dfe-8e02-eebc52e3ff6c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -48
      ],
      "parameters": {
        "width": 496,
        "height": 368,
        "content": "## Receive New Support Ticket\nThis section starts the workflow whenever a new support ticket is created in Zendesk. It also fetches the customer’s basic details, such as their email address, which is "
      }
    },
    {
      "id": "8e950979-b2c4-4d1d-b704-39e1bfd593c5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -48
      ],
      "parameters": {
        "width": 480,
        "height": 368,
        "content": "## Get Orders from WooCommerce\nThis section retrieves recent orders from WooCommerce. These orders are used to look for a match with the customer’s email address so the correct order can be linked to "
      }
    },
    {
      "id": "d469fb8e-6623-4912-bb33-ca381f834d8a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -48
      ],
      "parameters": {
        "width": 400,
        "height": 368,
        "content": "## Match Customer Email\nThis section compares the customer’s email from the Zendesk ticket with the billing email on WooCommerce orders. Only orders with a matching email are allowed to continue in th"
      }
    },
    {
      "id": "cb4f46ee-31e9-448a-8a89-d58362abd326",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -48
      ],
      "parameters": {
        "width": 448,
        "height": 368,
        "content": "## Identify Order Status and Create Tags\nThis section checks the order status, such as completed, processing or cancelled. Based on the status, it creates clear Zendesk tags that help support agents q"
      }
    },
    {
      "id": "1211d686-247b-46d8-b650-e2bb675f0ccb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        -48
      ],
      "parameters": {
        "width": 512,
        "height": 368,
        "content": "## Add Order Details to Ticket\nThis section adds important order details to the Zendesk ticket as an internal note. It also applies order-related tags, giving support agents all necessary information "
      }
    },
    {
      "id": "bec921ae-1f1d-4f2e-89d6-4a2758dcb908",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        -48
      ],
      "parameters": {
        "width": 640,
        "height": 368,
        "content": "## Send Email for Completed Orders\nThis section checks whether the customer’s order is marked as completed. If the condition is met, the workflow automatically sends a confirmation email with order de"
      }
    },
    {
      "id": "a8746bec-6f76-49f6-9fa1-71e76b1dd6d3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        -640
      ],
      "parameters": {
        "width": 592,
        "height": 752,
        "content": "##  How Workflow Works\nThis workflow links Zendesk support tickets with WooCommerce orders to help support teams respond quickly and accurately. When a new Zendesk ticket is created, the workflow iden"
      }
    }
  ],
  "connections": {
    "Prepare Ticket Update Payload": {
      "main": [
        [
          {
            "node": "Zendesk – Update Ticket with Order Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Order Status = Completed": {
      "main": [
        [
          {
            "node": "Send Order Confirmation Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zendesk – New Ticket Trigger": {
      "main": [
        [
          {
            "node": "Zendesk – Fetch Ticket Requester",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zendesk – Fetch Ticket Requester": {
      "main": [
        [
          {
            "node": "WooCommerce – Fetch Recent Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WooCommerce – Fetch Recent Orders": {
      "main": [
        [
          {
            "node": "Match Customer Email (Zendesk vs Woo)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Match Customer Email (Zendesk vs Woo)": {
      "main": [
        [
          {
            "node": "Generate Zendesk Tags from Order Status",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Generate Zendesk Tags from Order Status": {
      "main": [
        [
          {
            "node": "Prepare Ticket Update Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zendesk – Update Ticket with Order Details": {
      "main": [
        [
          {
            "node": "Check Order Status = Completed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}