{
  "name": "New orders into a sheet (hellonikhil.com sample)",
  "nodes": [
    {
      "parameters": {
        "authentication": "accessToken",
        "topic": "orders/create"
      },
      "id": "c334ae6c-925f-4b12-99ac-b046e7b893e0",
      "name": "New order in Shopify",
      "type": "n8n-nodes-base.shopifyTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "webhookId": "8f6ce0b5-50df-4d8d-b976-d650c5711a4a",
      "notes": "Fires once for every new order in your shop.",
      "notesInFlow": true
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit",
          "mode": "url"
        },
        "sheetName": {
          "__rl": true,
          "value": "Orders",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Order": "={{ $json.name }}",
            "Date": "={{ $json.created_at }}",
            "Customer": "={{ $json.customer.first_name }} {{ $json.customer.last_name }}",
            "Email": "={{ $json.email }}",
            "Items": "={{ $json.line_items.map(item => item.quantity + ' x ' + item.title).join(', ') }}",
            "Total": "={{ $json.total_price }} {{ $json.currency }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Order",
              "displayName": "Order",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Customer",
              "displayName": "Customer",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Items",
              "displayName": "Items",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Total",
              "displayName": "Total",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "2eb7cbc1-61f9-4c48-bd3b-b0b1f956054e",
      "name": "Add a row to the Orders sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        260,
        0
      ],
      "notes": "One row per order: number, date, customer, email, items, total.",
      "notesInFlow": true
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#orders",
          "mode": "name"
        },
        "text": "=New order {{ $('New order in Shopify').item.json.name }} from {{ $('New order in Shopify').item.json.customer.first_name }}, {{ $('New order in Shopify').item.json.total_price }} {{ $('New order in Shopify').item.json.currency }}. It's in the sheet.",
        "otherOptions": {}
      },
      "id": "b6ad5862-28b0-4416-84bc-f99eec9bb81e",
      "name": "Tell the team in Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.4,
      "position": [
        520,
        0
      ],
      "webhookId": "780d2203-4ff5-41fd-8ccc-4aeed5d06784",
      "notes": "Posts to #orders so nobody has to check the sheet.",
      "notesInFlow": true
    }
  ],
  "connections": {
    "New order in Shopify": {
      "main": [
        [
          {
            "node": "Add a row to the Orders sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add a row to the Orders sheet": {
      "main": [
        [
          {
            "node": "Tell the team in Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}