8
n8n 中文网amn8n.com

通过SMTP自动化KlickTipp:发送交易邮件

中级

这是一个Social Media领域的自动化工作流,包含 10 个节点。主要使用 Html, EmailSend, Klicktipp, KlicktippTrigger 等节点。 通过SMTP从KlickTipp发送个性化交易邮件

前置要求
  • 无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "UGHwqOYsZDRbTldL",
  "meta": {
    "instanceId": "95b3ab5a70ab1c8c1906357a367f1b236ef12a1409406fd992f60255f0f95f85",
    "templateCredsSetupCompleted": true
  },
  "name": "Automated KlickTipp via SMTP: Send Transactional Emails",
  "tags": [
    {
      "id": "15wrq9sti6wyqr6J",
      "name": "TEMPLATE",
      "createdAt": "2025-01-08T16:34:30.163Z",
      "updatedAt": "2025-01-08T16:34:30.163Z"
    }
  ],
  "nodes": [
    {
      "id": "a164b91a-d749-4ad7-a561-8a3179958227",
      "name": "Email delivery status: Sent",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        800,
        -96
      ],
      "parameters": {
        "fields": {
          "dataFields": [
            {
              "fieldId": "field222442",
              "fieldValue": "Sent"
            },
            {
              "fieldId": "field222482",
              "fieldValue": "={{ $('Generate HTML template').item.json.html }}"
            }
          ]
        },
        "resource": "subscriber",
        "operation": "update",
        "lookupEmail": "={{ $('Recieve the data from KlickTipp').item.json.email }}"
      },
      "credentials": {
        "klickTippApi": {
          "id": "K9JyBdCM4SZc1cXl",
          "name": "DEMO KlickTipp account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "bb626ee8-cb45-45f7-8867-7d0aaf8ddb5c",
      "name": "Email delivery status: Failed",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        800,
        80
      ],
      "parameters": {
        "fields": {
          "dataFields": [
            {
              "fieldId": "field222442",
              "fieldValue": "Failed"
            },
            {
              "fieldId": "field222482",
              "fieldValue": "={{ $('Generate HTML template').item.json.html }}"
            }
          ]
        },
        "resource": "subscriber",
        "operation": "update",
        "lookupEmail": "={{ $('Recieve the data from KlickTipp').item.json.email }}"
      },
      "credentials": {
        "klickTippApi": {
          "id": "K9JyBdCM4SZc1cXl",
          "name": "DEMO KlickTipp account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "22e87455-dd17-4416-8e21-bf4cfc3a452c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -96
      ],
      "parameters": {
        "color": 7,
        "height": 288,
        "content": "## 1. Get data."
      },
      "typeVersion": 1
    },
    {
      "id": "6f29cec7-c5da-4a34-a3b9-aedf9e7271b7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 288,
        "content": "## 2. Create an email body."
      },
      "typeVersion": 1
    },
    {
      "id": "e0c2b35d-d1c0-415d-84e5-bafec8084d3f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -96
      ],
      "parameters": {
        "color": 7,
        "height": 288,
        "content": "## 3. Send an email."
      },
      "typeVersion": 1
    },
    {
      "id": "172a8152-3b93-463e-a1de-191675e10969",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 384,
        "height": 432,
        "content": "## 4. Update email delivery status."
      },
      "typeVersion": 1
    },
    {
      "id": "aa0fa18b-3956-4463-b7fb-2d3de99c6cbb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -160
      ],
      "parameters": {
        "width": 580,
        "height": 1720,
        "content": "Community Node Disclaimer: This workflow uses KlickTipp community nodes.\n\n\n### How It Works\n\n**Automate transactional emails from KlickTipp via SMTP**  \nThis workflow receives contact data from a KlickTipp Outbound rule, generates a personalized HTML email, and sends it via any SMTP-compatible service (e.g., Gmail SMTP, Outlook, SendGrid, your own mail server). Key fields (e.g., first name, company, website, phone, or other custom fields) can be dynamically mapped into the body. After sending, the workflow saves the email’s HTML content and writes back an Email delivery status (“Sent” or “Failed”) to the contact in KlickTipp for clear visibility.\n\n### Key Features\n\n**KlickTipp Outbound Trigger**\n- Starts when a KlickTipp Outbound rule calls the webhook (e.g., after a tag is applied).\n- Accepts payload with recipient email and optional custom fields (first name, company, website, phone, etc.).\n- Easy to adapt for confirmations, updates, welcomes, and announcements.\n\n**HTML Email Composer**\n- Builds a clean, brandable HTML template with safe fallbacks.\n- Supports per-contact personalization via mapped fields.\n\n**SMTP Delivery**\n- Sends emails using the n8n **Send Email** node (SMTP).\n- Works with Gmail, Outlook, or any SMTP-compatible service.\n- Supports From/Reply-To, Subject, HTML body, CC/BCC, and attachments.\n\n**Delivery Status Write-Back**\n- On success: updates a KlickTipp custom field (e.g., **Email delivery status = Sent**).\n- On error: updates the same field to **Failed** (error details available in execution logs).\n\n### Setup Instructions\n\n**Install and Configure Nodes**\n- Add/enable KlickTipp community nodes and authenticate with valid API credentials.\n- Configure an **SMTP credential** in n8n:\n  - Host (e.g., smtp.gmail.com)\n  - Port (465 or 587)\n  - Authentication (username, password, or app password)\n  - SSL/TLS settings as required by your provider\n- Select this credential in the **Send Email** node.\n- Paste/import your HTML into the **Generate HTML template** node.\n- Activate the workflow.\n\n### Workflow Logic\n1. **Trigger from KlickTipp:** Outbound sends contact data to the workflow.\n2. **Generate HTML:** Build personalized HTML (and optional plain-text).\n3. **Send via SMTP:** Deliver the message with the **Send Email** node.\n4. **On Success:** Update KlickTipp contact → **Email delivery status: Sent**.\n5. **On Error:** Update KlickTipp contact → **Email delivery status: Failed** (see logs for details).\n\n### Benefits\n- **Immediate, personalized communication** without manual steps.\n- **Consistent branding** with reusable HTML templates.\n- **Clear observability** by writing back delivery status to KlickTipp.\n- **Flexible & extensible** for many message types beyond payments.\n\n### Testing and Deployment\n- Tag a test contact in KlickTipp to trigger the Outbound rule.\n- Verify the email arrives with correct personalization.\n- Confirm the **Email delivery status** field updates to **Sent** (or **Failed** for negative tests).\n- Review execution logs and adjust field mappings if necessary.\n\n### Notes\n- **Customization:** Swap templates, add CC/BCC, attachments, or a plain-text part for deliverability.\n- **SMTP Provider Settings:** Refer to your email provider’s SMTP configuration (e.g., Gmail, Outlook, or custom server)."
      },
      "typeVersion": 1
    },
    {
      "id": "6a2ea9d1-0df7-4f5b-9a30-53dee27e6e87",
      "name": "Generate HTML template",
      "type": "n8n-nodes-base.html",
      "position": [
        192,
        0
      ],
      "parameters": {
        "html": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Thank You</title>\n  <style>\n    body {\n      margin: 0;\n      padding: 16px;\n      font-family: Arial, Helvetica, sans-serif;\n      font-size: 14px;\n      color: #111111;\n      background: #f5f5f5;\n    }\n\n    /* Layout */\n    .wrapper {\n      max-width: 600px;\n      margin: 0 auto;\n      background: #ffffff;\n      padding: 20px;\n      border-radius: 6px;\n      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);\n    }\n\n    /* Typography */\n    h2.title {\n      margin: 0 0 12px 0;\n      font-size: 20px;\n      font-weight: bold;\n      color: #2c3e50;\n    }\n\n    p {\n      margin: 0 0 10px 0;\n    }\n\n    /* Links */\n    a {\n      color: #1155cc;\n      text-decoration: underline;\n    }\n\n    /* Contact block */\n    .contact-info {\n      margin: 15px 0;\n    }\n\n    .footer {\n      margin-top: 20px;\n    }\n  </style>\n</head>\n<body>\n  <div class=\"wrapper\">\n    <h2 class=\"title\">Thank you for using KlickTipp!</h2>\n\n    <p>Hello {{ $json.CustomFieldFirstName || 'there' }},</p>\n    <p>We appreciate your trust in KlickTipp. Your account details have been updated successfully.</p>\n\n    <div class=\"contact-info\">\n      <p><strong>Website:</strong> <a href=\"{{ $json.fieldWebsite }}\">{{ $json.CustomFieldWebsite }}</a></p>\n      <p><strong>Phone:</strong> {{ $json.CustomFieldPhone }}</p>\n    </div>\n\n    <p>If you have any questions, feel free to reply to this email — we’re here to help!</p>\n\n    <p class=\"footer\">Best regards,<br>The KlickTipp Team</p>\n  </div>\n</body>\n</html>"
      },
      "typeVersion": 1.2
    },
    {
      "id": "69b59021-fb88-4a44-96e0-30b9a33edd03",
      "name": "Recieve the data from KlickTipp",
      "type": "n8n-nodes-klicktipp.klicktippTrigger",
      "position": [
        -64,
        0
      ],
      "webhookId": "1b858bc4-1760-43ca-a07a-5b71d7c98bcb",
      "parameters": {},
      "credentials": {
        "klickTippApi": {
          "id": "K9JyBdCM4SZc1cXl",
          "name": "DEMO KlickTipp account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "97b6ca2b-618e-4446-aa84-ef9d46648019",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "onError": "continueErrorOutput",
      "position": [
        512,
        0
      ],
      "webhookId": "96c5ea1a-6a03-470c-9586-b787a82100a0",
      "parameters": {
        "html": "={{ $json.html }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "Thank you!",
        "toEmail": "={{ $('Recieve the data from KlickTipp').item.json.email }}",
        "fromEmail": "\"KlickTipp team\" no-reply@digital-results-international.com"
      },
      "credentials": {
        "smtp": {
          "id": "1Yhw2HxZNdcw0A75",
          "name": "(Mykhailo) Gmail SMTP account"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "active": true,
  "pinData": {
    "Recieve the data from KlickTipp": [
      {
        "json": {
          "email": "example@gmail.com",
          "CustomFieldPhone": "123456789",
          "CustomFieldWebsite": "https://awesome-website.com",
          "CustomFieldFirstName": "John"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7b7e9c38-3a97-4e34-8e90-a14867de5432",
  "connections": {
    "Send email": {
      "main": [
        [
          {
            "node": "Email delivery status: Sent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email delivery status: Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate HTML template": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recieve the data from KlickTipp": {
      "main": [
        [
          {
            "node": "Generate HTML template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 社交媒体

需要付费吗?

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

工作流信息
难度等级
中级
节点数量10
分类1
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
KlickTipp

KlickTipp

@KlickTipp

Reach more people. 100% GDPR compliant. Quickly create automated email campaigns, SMS and marketing automations. Market your knowledge independently of Google & Co., sell lucrative products and activate your customers.

外部链接
在 n8n.io 查看

分享此工作流