{
  "name": "Shopify invoice",
  "nodes": [
    {
      "parameters": {
        "authentication": "accessToken",
        "topic": "orders/paid"
      },
      "id": "5f0c6a0e-2f4e-4a63-9f8e-0b6f2a4c1d01",
      "name": "Shopify Trigger",
      "type": "n8n-nodes-base.shopifyTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "webhookId": "0b9c0f1e-6a1d-4f5b-8f3a-6c2d9e7b4a10"
    },
    {
      "parameters": {
        "operation": "renderReport",
        "template": {
          "__rl": true,
          "mode": "name",
          "value": "Shopify invoice"
        },
        "format": "pdf",
        "data": "={{ $json }}",
        "options": {
          "fileName": "=invoice-{{ $json.order_number }}"
        }
      },
      "id": "5f0c6a0e-2f4e-4a63-9f8e-0b6f2a4c1d02",
      "name": "Typefold",
      "type": "@typefold/n8n-nodes-typefold.typefold",
      "typeVersion": 1,
      "position": [240, 0]
    },
    {
      "parameters": {
        "fromEmail": "shop@example.com",
        "toEmail": "={{ $('Shopify Trigger').item.json.email }}",
        "subject": "=Your invoice for order {{ $('Shopify Trigger').item.json.name }}",
        "emailFormat": "text",
        "text": "=Thank you for your order. Your invoice is attached.",
        "options": {
          "attachments": "data"
        }
      },
      "id": "5f0c6a0e-2f4e-4a63-9f8e-0b6f2a4c1d03",
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [480, 0]
    }
  ],
  "connections": {
    "Shopify Trigger": {
      "main": [[{ "node": "Typefold", "type": "main", "index": 0 }]]
    },
    "Typefold": {
      "main": [[{ "node": "Send Email", "type": "main", "index": 0 }]]
    }
  },
  "settings": {}
}
