Build Your First n8n Workflow: Automate Welcome Emails & Lead Sorting

Ready to transition from theory to practice? One of the most common business needs is responding to new leads immediately. In this guide, based on a tutorial by GenAI Unplugged, we’ll build a workflow that automatically sends a welcome email when a user signs up via a Google Form and sorts “Corporate” leads into a dedicated spreadsheet.

This step-by-step process requires zero coding and can save hours of manual data entry.


Step 1: The Trigger (Webhooks)

To make the workflow start automatically, we use a Webhook node. This node provides a unique URL that “listens” for data from external apps [02:27].

  • The Setup: In n8n, add a Webhook node and set the HTTP method to POST.
  • Connecting Google Forms: Since Google Forms doesn’t support webhooks natively, you can use a small Google Apps Script (provided in the tutorial) to send form data to your n8n Webhook URL whenever a user clicks “Submit” [05:41].
  • Testing: Click “Listen for test event” in n8n and submit a sample form. You’ll see the user’s name and email appear instantly in the n8n canvas [08:13].

Step 2: Sending the Personalized Welcome Email

Once n8n has the user’s data, the next step is an Action node.

  • Service Options: You can use Gmail, Outlook, or a professional service like Amazon SES (Simple Email Service) for higher deliverability [11:04].
  • Personalization with Expressions: Instead of a generic “Hello,” use Expressions to pull the “First Name” directly from the Webhook data. By dragging and dropping the name field into the email body, n8n creates a dynamic variable like {{ $json.body.firstName }} [16:18].
  • The Result: Every new signup gets a personalized email addressed specifically to them [17:33].

Step 3: Filtering Corporate Leads (The “If” Node)

Not all leads are created equal. To help your sales team, you can separate “Corporate” leads (e.g., name@company.com) from “Generic” ones (e.g., name@gmail.com).

  • The Logic: Add an If Node. Configure it to check if the email address does not end with gmail.com or hotmail.com [21:12].
  • Two Paths: This creates two branches:
    • True: The lead is corporate.
    • False: The lead is using a personal email [22:33].

Step 4: Storing Data in Google Sheets

For the “True” branch (Corporate leads), we want to save their info for follow-up.

  • The Action: Add a Google Sheets node and select “Append Row.”
  • Manual Mapping: Map the columns (Name, Email, Role) manually by dragging data from the original Webhook node [25:03].
  • Automation in Action: Now, when a corporate user signs up, they get an email and their details are added to your “Corporate Signups” sheet automatically [27:50].

Key Takeaways for Beginners

  1. Test URLs vs. Production URLs: Always use the “Test URL” while building. Once you’re ready to go live, switch the URL in your Google Form script to the “Production” version and activate the workflow [04:05].
  2. Visual Debugging: n8n shows you exactly where the data is flowing. If a branch turns green, it ran successfully; if it’s grey, the condition wasn’t met [27:44].
  3. Endless Extensions: You can easily add more steps, like sending a Slack notification to your team or waiting 3 days to send a follow-up email [28:49].

Watch the full step-by-step tutorial here: Build Your First n8n Workflow

Leave a Comment

Your email address will not be published. Required fields are marked *