{
  "name": "Automate e-commerce return guides with email verification & QR codes",
  "nodes": [
    {
      "id": "464b2f78-5628-4e89-bc6c-9f7042ee365c",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "ce00c4ea-2c67-4bbc-95a8-16fc5b7a1619",
      "name": "Verifi Email",
      "type": "n8n-nodes-verifiemail.verifiEmail",
      "position": [
        176,
        -224
      ]
    },
    {
      "id": "3fe3e398-a883-418e-b492-2e3c6b2a0f3b",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        352,
        -144
      ]
    },
    {
      "id": "0228f0be-9e93-4183-be31-f2bf0ade679e",
      "name": "Stop and Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        544,
        -336
      ]
    },
    {
      "id": "1291babb-4454-467c-b7f9-ccbc4a40a66d",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        736,
        112
      ]
    },
    {
      "id": "5e2840f5-e714-49e2-bb7b-220461b0d286",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        1232,
        -16
      ]
    },
    {
      "id": "21b85c24-5bd7-47dd-b0d3-ee3ab96c3224",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        544,
        112
      ]
    },
    {
      "id": "baa731ae-cf48-41f8-869b-cc6b5c1971b9",
      "name": "Remove Duplicates",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        928,
        112
      ]
    },
    {
      "id": "e438ee05-1d2b-4f3b-8834-120d743f7c84",
      "name": "HTML to PDF",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        1712,
        -176
      ]
    },
    {
      "id": "c360666e-5bad-4fc1-969e-e9da7ccc135a",
      "name": "HTML/CSS to Image",
      "type": "n8n-nodes-htmlcsstoimage.htmlCssToImage",
      "position": [
        1712,
        128
      ]
    },
    {
      "id": "8d26ce37-8064-4396-aa91-39aaaffe5c2d",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1456,
        -16
      ]
    },
    {
      "id": "3d5970f2-981f-4cd9-8dd0-691a9b9a91c9",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        2112,
        0
      ]
    },
    {
      "id": "58f8f743-e22b-4c41-a47a-d29dddfee4f0",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2448,
        0
      ]
    },
    {
      "id": "0b1dfe14-47de-43c7-aff9-0a61ec2213ad",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -16
      ],
      "parameters": {
        "width": 384,
        "height": 432,
        "content": "## WEBHOOK TRIGGER\n\nPath: **/return-guide**\nMethod: **POST**\n\nExpected JSON:\n```\n{\n  \"customer_name\": \"Jane Doe\",\n  \"customer_email\": \"test@gmail.com\", \n  \"order_id\": \"ORD123456\",\n  \"return_reason\": \""
      }
    },
    {
      "id": "ef6eb130-73ed-4ccd-8d5d-a96f75d003ac",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -304
      ],
      "parameters": {
        "width": 368,
        "height": 224,
        "content": "## EMAIL VERIFICATION\n**Purpose**: Prevent **fraud** with disposable/fake emails\n\n**Valid email** → Continue workflow\n**Invalid email** → Stop and Error\n\nCredentials needed:\n- **VerifiEmail** API acco"
      }
    },
    {
      "id": "cec3e76f-7a41-4f53-a134-7e43848655e2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        96
      ],
      "parameters": {
        "width": 576,
        "height": 416,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## DATA PREPARATION\n\n1. **Merge**: Combines email verification + webhook data\n2. **Set**: Adds calculated fields:\n   - QR code URL (api.qrserver.com)\n   - Return deadline (+7 days)\n   - T"
      }
    },
    {
      "id": "96bc0a8c-2680-4839-90bd-5641b294afe1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        -368
      ],
      "parameters": {
        "width": 272,
        "height": 480,
        "content": "## HTML TEMPLATE GENERATOR\n\nInputs: **Customer data** + **calculated fields**\n\nOutputs:\n- Professional **HTML return guide**\n- Includes **QR code**, instructions, customer details\n- Modern CSS styling"
      }
    },
    {
      "id": "0b5e9a8e-3009-45d5-8642-dba4b1a33101",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        -416
      ],
      "parameters": {
        "width": 320,
        "height": 704,
        "content": "## PARALLEL CONVERSION\n**HTML to PDF**: For printing/official use\n**HTML to Image**: For email previews\n\n- Both run simultaneously from **Loop Over Items**\n\n- Output: S3 hosted files with **download U"
      }
    },
    {
      "id": "7800fed4-5072-4810-bd75-71e2851b02cb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2368,
        -352
      ],
      "parameters": {
        "width": 304,
        "height": 496,
        "content": "## AUTOMATED EMAIL DELIVERY\n\nTo: **Customer email**(verified)\nSubject: Return Guide for Order {order_id}\n\nContains:\n- Plain text message\n- PDF download link\n- Image preview link\n- Return instructions\n"
      }
    },
    {
      "id": "bd681c09-d39d-4fa2-91fd-5b063baebefc",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -304
      ],
      "parameters": {
        "width": 480,
        "height": 224,
        "content": "## VERIFIED RETURN GUIDE GENERATOR\n\nPurpose: **Fraud-proof return guide automation**\n\nFlow: \n- **Webhook → Verify → Process → Generate → Convert → Email**\n- **Features**: Email validation, QR codes, d"
      }
    },
    {
      "id": "0ca8bdde-6679-4cc7-983a-873b75a7fac0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -608
      ],
      "parameters": {
        "width": 304,
        "height": 400,
        "content": "## FRAUD PREVENTION\nInvalid emails are blocked:\n\n- Disposable emails (10minutemail.com)\n- Non-existent domains\n- Malformed addresses\n\nFailed validations:\n- Logged for review\n- No return guide generate"
      }
    },
    {
      "id": "ca0aed99-24a7-4197-820b-7308cc3c7e17",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2368,
        304
      ],
      "parameters": {
        "width": 336,
        "height": 336,
        "content": "## CUSTOMIZATION OPTIONS\n\nEasy changes:\n- Email template text\n- HTML styling/colors\n- QR code size/format\n- Return deadline (currently 7 days)\n- Company branding\n\nAdvanced:\n- Multiple product support\n"
      }
    },
    {
      "id": "setup-credentials-note",
      "name": "Credential Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        304
      ],
      "parameters": {
        "width": 368,
        "height": 480,
        "content": "## CREDENTIAL SETUP REQUIRED\n\nBefore using this template, set up these credentials:\n\n1. **VerifiEmail API**: Sign up at verifi.email\n 2. **Gmail OAuth2**: Google Cloud Console required\n   - Create OAu"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Verifi Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML to PDF": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verifi Email": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "HTML/CSS to Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTML to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML/CSS to Image": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}