8
n8n 中文网amn8n.com

已验证用户的个性化促销码卡片

高级

这是一个Social Media领域的自动化工作流,包含 19 个节点。主要使用 If, Set, Gmail, Webhook, GoogleSheets 等节点。 通过邮件验证、Gmail和Google Sheets生成个性化促销卡片

前置要求
  • Google 账号和 Gmail API 凭证
  • HTTP Webhook 端点(n8n 会自动生成)
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "已验证用户的个性化促销码卡片",
  "tags": [],
  "nodes": [
    {
      "id": "b0df3843-bc98-4a04-b9c5-587df865c8d3",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        576,
        816
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bf99a77f-9879-45b3-b466-1ec73565d9bd",
              "name": "name",
              "type": "string",
              "value": "={{$json.body.name || 'Valued Customer'}}"
            },
            {
              "id": "d5746616-ae00-4394-8c45-b1b2f996b1b0",
              "name": "email",
              "type": "string",
              "value": "={{ $json.body.email }}"
            },
            {
              "id": "78bac585-fbff-4a10-9953-85dbac79b18f",
              "name": "promo_code",
              "type": "string",
              "value": "={{ $json.body.promo_code || 'WELCOME10'}}"
            },
            {
              "id": "f3aae8d3-4d1d-4e3f-8bfc-506321852264",
              "name": "discount_value",
              "type": "string",
              "value": "={{ $json.body.discount_value || '10%' }}"
            },
            {
              "id": "05f0ff79-d917-479d-b7bb-fb9a439fb26c",
              "name": "discount_type",
              "type": "string",
              "value": "={{ $json.body.discount_type || 'percentage' }}"
            },
            {
              "id": "d02a9d89-1474-462c-a9d6-052c9b8aa1fc",
              "name": "timestamp",
              "type": "string",
              "value": "={{new Date().toISOString()}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "af6b8362-eea0-47fa-a524-d8053150504f",
      "name": "生成促销卡图片",
      "type": "n8n-nodes-htmlcsstoimage.htmlCssToImage",
      "position": [
        1504,
        688
      ],
      "parameters": {
        "html_content": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Promo Card</title>\n    <style>\n        * {\n            margin: 0;\n            padding: 0;\n            box-sizing: border-box;\n        }\n\n        body {\n            font-family: 'Arial', sans-serif;\n            background: #f5f5f5;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            min-height: 100vh;\n            padding: 20px;\n        }\n\n        .promo-card {\n            width: 400px;\n            height: 550px;\n            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n            border-radius: 20px;\n            padding: 25px;\n            color: white;\n            text-align: center;\n            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);\n            display: flex;\n            flex-direction: column;\n            justify-content: space-between;\n            overflow: visible;\n        }\n\n        .header {\n            text-align: center;\n        }\n\n        .logo {\n            width: 50px;\n            height: 50px;\n            background: white;\n            border-radius: 50%;\n            margin: 0 auto 15px;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            color: #667eea;\n            font-weight: bold;\n            font-size: 18px;\n        }\n\n        .title {\n            font-size: 24px;\n            font-weight: bold;\n            margin-bottom: 10px;\n            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n        }\n\n        .content {\n            flex: 1;\n            display: flex;\n            flex-direction: column;\n            justify-content: center;\n            align-items: center;\n            gap: 8px;\n        }\n\n        .greeting {\n            font-size: 18px;\n            margin-bottom: 5px;\n        }\n\n        .discount-circle {\n            width: 90px;\n            height: 90px;\n            background: rgba(255, 255, 255, 0.2);\n            border: 3px solid rgba(255, 255, 255, 0.4);\n            border-radius: 50%;\n            display: flex;\n            flex-direction: column;\n            justify-content: center;\n            align-items: center;\n            margin: 5px 0;\n            backdrop-filter: blur(10px);\n        }\n\n        .discount-value {\n            font-size: 24px;\n            font-weight: bold;\n            line-height: 1;\n        }\n\n        .discount-text {\n            font-size: 10px;\n            opacity: 0.9;\n        }\n\n        .promo-code {\n            background: rgba(255, 255, 255, 0.2);\n            border: 2px solid rgba(255, 255, 255, 0.3);\n            border-radius: 10px;\n            padding: 8px 16px;\n            font-size: 14px;\n            font-weight: bold;\n            letter-spacing: 2px;\n            margin: 8px 0;\n            backdrop-filter: blur(10px);\n        }\n\n        .qr-section {\n            margin: 8px 0;\n        }\n\n        .qr-container {\n            background: white;\n            border-radius: 8px;\n            padding: 8px;\n            display: inline-block;\n            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);\n        }\n\n        .qr-code {\n            width: 70px;\n            height: 70px;\n            background: white;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n        }\n\n        .qr-code img {\n            width: 100%;\n            height: 100%;\n            display: block;\n        }\n\n        .qr-label {\n            font-size: 10px;\n            margin-top: 8px;\n            opacity: 0.8;\n        }\n\n        .footer {\n            text-align: center;\n            background: rgba(0, 0, 0, 0.2);\n            padding: 10px;\n            border-radius: 10px;\n            margin-top: 5px;\n        }\n\n        .expiry {\n            font-size: 13px;\n            font-weight: bold;\n            color: #ffd700;\n            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);\n        }\n    </style>\n</head>\n<body>\n    <div class=\"promo-card\">\n        <div class=\"header\">\n            <div class=\"logo\">🎁</div>\n            <h1 class=\"title\">SPECIAL OFFER</h1>\n        </div>\n        \n        <div class=\"content\">\n            <h2 class=\"greeting\">Hi {{ $('Edit Fields').item.json.name }}!</h2>\n            \n            <div class=\"discount-circle\">\n                <span class=\"discount-value\">{{ $('Edit Fields').item.json.discount_value }}</span>\n                <span class=\"discount-text\">OFF</span>\n            </div>\n            \n            <div class=\"promo-code\">{{ $('Edit Fields').item.json.promo_code }}</div>\n            \n            <div class=\"qr-section\">\n                <div class=\"qr-container\">\n                    <div class=\"qr-code\">\n                        <img src=\"https://api.qrserver.com/v1/create-qr-code/?size=70x70&data=https://YOURSTORE.com/checkout?code={{ $('Edit Fields').item.json.promo_code }}&format=png&margin=0\" alt=\"QR Code\">\n                    </div>\n                </div>\n                <p class=\"qr-label\">Scan to Apply</p>\n            </div>\n        </div>\n        \n        <div class=\"footer\">\n            <p class=\"expiry\">Valid until Dec 31, 2024</p>\n        </div>\n    </div>\n</body>\n</html>",
        "response_format_html": "png"
      },
      "credentials": {
        "htmlcsstoimgApi": {
          "id": "YOUR_HTMLCSSTOIMG_API_KEY",
          "name": "Htmlcsstoimg API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9e1bca1c-4f75-47ad-8a7c-9e42b5b7f776",
      "name": "记录促销分发",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2272,
        688
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "={{ $('Edit Fields').item.json.name }}",
            "Email": "={{ $('Edit Fields').item.json.email }}",
            "Status": "Sent Successfully",
            "Timestamp": "={{new Date().toISOString()}}",
            "Promo Code": "={{ $('Edit Fields').item.json.promo_code }}",
            "Discount Value": "={{ $('Edit Fields').item.json.discount_value }}"
          },
          "schema": [
            {
              "id": "Timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Promo Code",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Promo Code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Discount Value",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Discount Value",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEETS_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_ID/edit?usp=drivesdk",
          "cachedResultName": "Log Promo Distribution"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_GOOGLE_SHEETS_OAUTH2_API_KEY",
          "name": "Google Sheets OAuth2"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "bcea2cef-11a1-4b63-a09f-8726ed5a0aa8",
      "name": "设置错误数据",
      "type": "n8n-nodes-base.set",
      "position": [
        1488,
        1008
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8c20bbf9-4758-499e-938c-d4a2efc7ca01",
              "name": "error_type",
              "type": "string",
              "value": "Invalid Email"
            },
            {
              "id": "ac6e79cc-a747-4a86-bdb5-f214e94dacfe",
              "name": "timestamp",
              "type": "string",
              "value": "={{new Date().toISOString()}}"
            },
            {
              "id": "b1ccacdf-c151-4107-adc0-eb3f21a5d927",
              "name": "email",
              "type": "string",
              "value": "={{ $('Edit Fields').item.json.email }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7135f609-3571-46c0-ba3d-79d9095109d8",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 480,
        "content": "## 促销注册触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "5c7ce862-2a12-4348-9d59-2c4aa3463cb4",
      "name": "WEBHOOK",
      "type": "n8n-nodes-base.webhook",
      "position": [
        352,
        816
      ],
      "webhookId": "",
      "parameters": {
        "path": "promo-signup",
        "options": {
          "responseData": "={\"status\": \"success\", \"message\": \"Promo card being generated!\"}"
        },
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "d5bc4d1a-727d-4a2c-b038-f8f68c8b5573",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 480,
        "content": "## 数据清理"
      },
      "typeVersion": 1
    },
    {
      "id": "32e56db6-94ef-4d63-ba29-c58024a643d3",
      "name": "验证邮箱",
      "type": "n8n-nodes-verifiemail.verifiEmail",
      "position": [
        880,
        816
      ],
      "parameters": {
        "email": "={{ $json.email }}"
      },
      "credentials": {
        "verifiEmailApi": {
          "id": "YOUR_VERIFI_EMAIL_API_KEY",
          "name": "VerifiEmail API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4e0776eb-8e47-4d6b-bfc4-48495480514a",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 496,
        "content": "## 邮箱验证"
      },
      "typeVersion": 1
    },
    {
      "id": "f6a6612d-7e62-45de-8b02-2b06a848a7f3",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        528
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 416,
        "content": "## 验证网关"
      },
      "typeVersion": 1
    },
    {
      "id": "25536778-aefe-45e5-81f1-01006ca85aa7",
      "name": "验证网关",
      "type": "n8n-nodes-base.if",
      "position": [
        1152,
        816
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f7f7e28c-6bf9-4443-8c94-2431a93c354d",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.valid }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "75b3e1f0-1a0c-452c-ae8b-24e22d5d0cda",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        384
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 480,
        "content": "## 促销卡生成"
      },
      "typeVersion": 1
    },
    {
      "id": "29103362-5f8e-48a8-bcfc-3809cbd69d29",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1776,
        384
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 480,
        "content": "## 客户邮件发送"
      },
      "typeVersion": 1
    },
    {
      "id": "51f09284-6a75-4f29-9fbc-b98778d7f47f",
      "name": "成功路径",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1904,
        688
      ],
      "webhookId": "",
      "parameters": {
        "sendTo": "={{ $('Edit Fields').item.json.email }}",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Your Exclusive Offer</title>\n</head>\n<body style=\"margin: 0; padding: 0; font-family: 'Arial', 'Helvetica', sans-serif; background-color: #f4f4f4;\">\n    <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color: #f4f4f4; padding: 20px 0;\">\n        <tr>\n            <td align=\"center\">\n                <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color: #ffffff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1);\">\n                    \n                    <!-- Header with gradient -->\n                    <tr>\n                        <td style=\"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 40px 30px; text-align: center;\">\n                            <h1 style=\"margin: 0; color: #ffffff; font-size: 32px; font-weight: bold; text-shadow: 0 2px 4px rgba(0,0,0,0.2);\">\n                                🎉 Welcome, {{ $('Edit Fields').item.json.name }}!\n                            </h1>\n                            <p style=\"margin: 10px 0 0 0; color: #ffffff; font-size: 16px; opacity: 0.95;\">\n                                Your exclusive offer is ready!\n                            </p>\n                        </td>\n                    </tr>\n                    \n                    <!-- Main Content -->\n                    <tr>\n                        <td style=\"padding: 40px 30px;\">\n                            <p style=\"margin: 0 0 20px 0; color: #333333; font-size: 16px; line-height: 1.6;\">\n                                Thank you for signing up! We're thrilled to have you join our community. \n                                As a warm welcome, we've prepared something special just for you.\n                            </p>\n                            \n                            <!-- Promo Code Box -->\n                            <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"margin: 30px 0;\">\n                                <tr>\n                                    <td style=\"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 30px; text-align: center;\">\n                                        <p style=\"margin: 0 0 10px 0; color: #ffffff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9;\">\n                                            Your Exclusive Promo Code\n                                        </p>\n                                        <div style=\"background-color: rgba(255,255,255,0.2); border: 2px dashed rgba(255,255,255,0.5); border-radius: 8px; padding: 15px 25px; display: inline-block; margin: 10px 0;\">\n                                            <p style=\"margin: 0; color: #ffffff; font-size: 28px; font-weight: bold; letter-spacing: 3px;\">\n                                                {{ $('Edit Fields').item.json.promo_code }}\n                                            </p>\n                                        </div>\n                                        <p style=\"margin: 15px 0 0 0; color: #ffd700; font-size: 20px; font-weight: bold;\">\n                                            Save {{ $('Edit Fields').item.json.discount_value }}!\n                                        </p>\n                                    </td>\n                                </tr>\n                            </table>\n                            \n                            <!-- Features -->\n                            <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"margin: 30px 0;\">\n                                <tr>\n                                    <td width=\"33%\" style=\"padding: 15px; text-align: center; vertical-align: top;\">\n                                        <div style=\"font-size: 32px; margin-bottom: 10px;\">✨</div>\n                                        <p style=\"margin: 0; color: #667eea; font-weight: bold; font-size: 14px;\">Easy to Use</p>\n                                        <p style=\"margin: 5px 0 0 0; color: #666666; font-size: 12px;\">Apply at checkout</p>\n                                    </td>\n                                    <td width=\"33%\" style=\"padding: 15px; text-align: center; vertical-align: top;\">\n                                        <div style=\"font-size: 32px; margin-bottom: 10px;\">🎁</div>\n                                        <p style=\"margin: 0; color: #667eea; font-weight: bold; font-size: 14px;\">Exclusive Deal</p>\n                                        <p style=\"margin: 5px 0 0 0; color: #666666; font-size: 12px;\">Just for you</p>\n                                    </td>\n                                    <td width=\"33%\" style=\"padding: 15px; text-align: center; vertical-align: top;\">\n                                        <div style=\"font-size: 32px; margin-bottom: 10px;\">⏰</div>\n                                        <p style=\"margin: 0; color: #667eea; font-weight: bold; font-size: 14px;\">Limited Time</p>\n                                        <p style=\"margin: 5px 0 0 0; color: #666666; font-size: 12px;\">Don't miss out</p>\n                                    </td>\n                                </tr>\n                            </table>\n                            \n                            <p style=\"margin: 25px 0; color: #333333; font-size: 16px; line-height: 1.6;\">\n                                We've also created a beautiful promo card for you (see attachment). \n                                Save it or share it with friends!\n                            </p>\n                            \n                            <!-- CTA Button -->\n                            <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"margin: 30px 0;\">\n                                <tr>\n                                    <td align=\"center\">\n                                        <a href=\"#\" style=\"display: inline-block; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #ffffff; text-decoration: none; padding: 15px 40px; border-radius: 25px; font-size: 16px; font-weight: bold; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);\">\n                                            Start Shopping Now\n                                        </a>\n                                    </td>\n                                </tr>\n                            </table>\n                            \n                            <p style=\"margin: 25px 0 0 0; color: #333333; font-size: 16px; line-height: 1.6;\">\n                                Happy shopping! 🛍️\n                            </p>\n                            <p style=\"margin: 5px 0 0 0; color: #666666; font-size: 14px; font-style: italic;\">\n                                We can't wait to see what you choose!\n                            </p>\n                            \n                            <!-- Promo Card Image -->\n                            <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"margin: 30px 0;\">\n                                <tr>\n                                    <td align=\"center\">\n                                        <p style=\"margin: 0 0 15px 0; color: #333333; font-size: 16px; font-weight: bold;\">\n                                            Your Personalized Promo Card\n                                        </p>\n                                        <img src=\"{{ $json.image_url }}\" alt=\"Your Promo Card\" style=\"max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);\" />\n                                    </td>\n                                </tr>\n                            </table>\n                        </td>\n                    </tr>\n                    \n                    <!-- Footer -->\n                    <tr>\n                        <td style=\"background-color: #f8f8f8; padding: 25px 30px; text-align: center; border-top: 1px solid #eeeeee;\">\n                            <p style=\"margin: 0 0 10px 0; color: #999999; font-size: 12px;\">\n                                This offer is valid until Dec 31, 2024\n                            </p>\n                            <p style=\"margin: 0; color: #999999; font-size: 12px;\">\n                                Questions? Contact us at support@yourstore.com\n                            </p>\n                        </td>\n                    </tr>\n                    \n                </table>\n            </td>\n        </tr>\n    </table>\n</body>\n</html>",
        "options": {},
        "subject": "=🎉 Your Exclusive {{ $('Edit Fields').item.json.discount_value }} Discount is Ready!"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "YOUR_GMAIL_OAUTH2_API_KEY",
          "name": "Gmail OAuth2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "f7a274d9-a415-457c-8948-756bd04fead3",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2144,
        352
      ],
      "parameters": {
        "color": 7,
        "width": 352,
        "height": 496,
        "content": "## 分析跟踪"
      },
      "typeVersion": 1
    },
    {
      "id": "07c54abb-da63-4e5f-9707-ff9193b9a169",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        992
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 464,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9fb1926d-d407-4272-811c-a116658f482b",
      "name": "错误路径",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1824,
        1008
      ],
      "webhookId": "",
      "parameters": {
        "sendTo": "YOUR_ADMIN_EMAIL_HERE",
        "message": "=Failed to generate promo card for {{ $('Edit Fields').item.json.email }} - Invalid email address",
        "options": {},
        "subject": "⚠️ Failed Promo Card Generation  ",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "YOUR_GMAIL_OAUTH2_API_KEY",
          "name": "Gmail OAuth2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c61c8af0-85bd-41d7-a310-d56056d2b4d1",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        992
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 416,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "80c29be0-1ebe-431b-8c78-3c6c46019418",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        384
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 784,
        "content": "## 自动化促销卡生成器"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "WEBHOOK": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Validate Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Path": {
      "main": [
        [
          {
            "node": "Log Promo Distribution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Error Data": {
      "main": [
        [
          {
            "node": "Error Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Email": {
      "main": [
        [
          {
            "node": "Validation Gateway",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validation Gateway": {
      "main": [
        [
          {
            "node": "Generate Promo Card Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Error Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Promo Card Image": {
      "main": [
        [
          {
            "node": "Success Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 社交媒体

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量19
分类1
节点类型8
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Jitesh Dugar

Jitesh Dugar

@jiteshdugar

AI Automation Specialist - OpenAI, CRM & Automation Expert with a solid understanding of various tools that include Zapier, Make, Zoho CRM, Hubspot, Google Sheets, Airtable, Pipedrive, Google Analytics, and more.

外部链接
在 n8n.io 查看

分享此工作流