AutomationFlowsEmail & Gmail › Automate Welcome Emails with Discount Codes via Mailchimp and Gmail

Automate Welcome Emails with Discount Codes via Mailchimp and Gmail

ByAbideen Bello @bideen on n8n.io

This is an n8n template that Automate welcome emails with discount codes via Mailchimp and Gmail

Webhook trigger★★☆☆☆ complexity7 nodesMailchimpGmail
Email & Gmail Trigger: Webhook Nodes: 7 Complexity: ★★☆☆☆ Added:

This workflow corresponds to n8n.io template #7774 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "1363ffcf-aa23-436a-8c53-0a3fbc096cfa",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -352,
        -32
      ],
      "parameters": {
        "path": "b3d366be-bffc-4d2d-a465-db487976ada0",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "36da0cb5-4135-4289-bfd9-2ceb81aea84a",
      "name": "Create a member",
      "type": "n8n-nodes-base.mailchimp",
      "onError": "continueRegularOutput",
      "position": [
        -128,
        -32
      ],
      "parameters": {
        "list": "YOUR_MAILCHIMP_LIST_ID ",
        "email": "={{ $json.body.email }}",
        "status": "subscribed",
        "options": {},
        "mergeFieldsUi": {
          "mergeFieldsValues": [
            {
              "name": "FNAME",
              "value": "={{ $json.body.name }}"
            }
          ]
        }
      },
      "credentials": {
        "mailchimpApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": false,
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "6370189c-3288-4e4a-8c91-cfe831fc96b1",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        96,
        -32
      ],
      "parameters": {
        "sendTo": "={{ $('Webhook').item.json.body.email }}",
        "message": "=<!DOCTYPE html> <html> <body style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto;\">     <div style=\"background-color: #f8f9fa; padding: 20px; text-align: center;\">         <h1 style=\"color: #333;\">Welcome to [Your Business Name]!</h1>                  <p style=\"font-size: 18px; color: #666;\">             Hi {{ $node[\"Webhook\"].json[\"name\"] || \"there\" }},         </p>                  <p style=\"font-size: 16px; color: #666; line-height: 1.6;\">             Thank you for joining our community! We're excited to have you on board.         </p>                  <div style=\"background-color: #007bff; color: white; padding: 20px; margin: 20px 0; border-radius: 8px;\">             <h2 style=\"margin: 0;\">Your Welcome Gift!</h2>             <p style=\"font-size: 24px; font-weight: bold; margin: 10px 0;\">                 WELCOME15             </p>             <p style=\"margin: 0;\">Use this code for 15% off your first order</p>         </div>                  <a href=\"https://your-website.com/shop\"             style=\"background-color: #28a745; color: white; padding: 15px 30px;                    text-decoration: none; border-radius: 5px; display: inline-block;                    margin: 20px 0;\">             Start Shopping         </a>                  <p style=\"font-size: 14px; color: #999; margin-top: 30px;\">             Follow us on social media for the latest updates and offers!         </p>                  <div style=\"margin-top: 20px;\">             <a href=\"https://facebook.com/yourpage\" style=\"margin: 0 10px;\">Facebook</a>             <a href=\"https://instagram.com/yourpage\" style=\"margin: 0 10px;\">Instagram</a>             <a href=\"https://twitter.com/yourpage\" style=\"margin: 0 10px;\">Twitter</a>         </div>     </div> </body> </html>",
        "options": {},
        "subject": "Welcome to Berley! Here's your 15% discount \ud83c\udf89"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "36131d9d-d138-4955-ae74-40b765851aef",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -240
      ],
      "parameters": {
        "width": 304,
        "height": 1136,
        "content": "## \ud83d\udce7 Automated Welcome Email with Discount Code\n\n### \ud83c\udfaf What This Does\nAutomatically nurtures new subscribers with personalized welcome emails and discount codes:\n  - **Instant response** to website signup forms via webhook\n  - **Mailchimp integration** adds contacts to your email list\n  - **Branded welcome email** with personalized discount code\n  - **Error handling** ensures emails send even if list addition fails\n\n### \u26a1 How It Works\n  1. Website form submits data to webhook endpoint\n  2. Contact automatically added to Mailchimp audience\n  3. Personalized welcome email sent via Gmail\n  4. Subscriber gets immediate value with discount code\n\n### \ud83d\udee0\ufe0f Setup Required\n**Before using this workflow:**\n  1. Replace YOUR_MAILCHIMP_LIST_ID with your actual Mailchimp list ID\n  2. Update email template with your business name and branding\n  3. Change discount code and shop URL to your own\n  4. Add your website form endpoint to trigger the webhook\n  5. Configure Mailchimp and Gmail credentials\n\n### \ud83d\udca1 Perfect For\n  - E-commerce businesses building customer lists\n  - SaaS companies onboarding trial users\n  - Course creators nurturing leads\n  - Service providers automating client intake"
      },
      "typeVersion": 1
    },
    {
      "id": "244bd91b-1dc0-4b0c-8771-4c7da2ebf0f9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        -192
      ],
      "parameters": {
        "color": 6,
        "height": 336,
        "content": "#### Step 1: Receive Signup Data\n\nWebhook receives form submissions from your website."
      },
      "typeVersion": 1
    },
    {
      "id": "6768e505-ed3e-4462-8fc3-2825580d9cbc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -192
      ],
      "parameters": {
        "color": 3,
        "height": 336,
        "content": "#### Step 2: Add to Email List\n\nAutomatically adds subscriber to your Mailchimp audience."
      },
      "typeVersion": 1
    },
    {
      "id": "de85be05-732e-4ab9-b12f-5c35dee75a96",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -192
      ],
      "parameters": {
        "color": 4,
        "height": 336,
        "content": "#### Step 3: Send Welcome Email\n\nSends branded welcome email with personalized discount code."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Create a member",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a member": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This is an n8n template that Automate welcome emails with discount codes via Mailchimp and Gmail

Source: https://n8n.io/workflows/7774/ — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

Receive orders via webhook with automatic payment verification, stock checking, inventory reservation, shipping label generation, confirmation emails, and Slack notifications.

HTTP Request, Gmail, Slack +1
Email & Gmail

OTP Verification System. Uses googleSheets, gmail. Webhook trigger; 23 nodes.

Google Sheets, Gmail
Email & Gmail

A comprehensive n8n workflow template for automating e-commerce return processes with fraud prevention and professional document generation. E-commerce businesses preventing fraudulent returns Custome

N8N Nodes Verifiemail, Stop And Error, N8N Nodes Htmlcsstopdf +2
Email & Gmail

Transform your visitor management process with this fully automated, enterprise-grade workflow. The Verified Visitor Pass Generator eliminates manual data entry, prevents fake registrations through em

N8N Nodes Htmlcsstoimage, Gmail, Slack +3
Email & Gmail

Automated email verification and welcome email workflow that validates new user signups, prevents fake emails, and creates a seamless onboarding experience with real-time team notifications.

N8N Nodes Verifiemail, Slack, Google Sheets +2