Build Your First n8n Workflow - Send Welcome Emails Automatically

Learn Build Your First n8n Workflow - Send Welcome Emails Automatically in this comprehensive n8n tutorial. Step-by-step guide with video, code examples, and expert tips from the n8n Zero to Hero course.

Table of Contents

Overview

This lesson is part of the n8n AI Automation - Zero to Hero course, Section: 2. Getting Started.

Watch the video above for the full tutorial, or read the written guide below.

What does a webhook-triggered welcome email workflow do in n8n?

The Webhook trigger node listens for incoming POST requests from an external form and fires the n8n workflow the moment a submission arrives. Connected to an email action node such as AWS SES, Gmail, or any SMTP provider, it sends a personalized welcome email automatically, replacing manual outreach. The workflow uses submitted form fields, including first name and email address, as dynamic expression variables inside the message body and recipient field.

How to build a form-to-email automation in n8n

The Webhook node provides two URLs: a test URL for development and a production URL for live traffic. Set the HTTP method to POST because the workflow is receiving form data. Click "Listen for test event" to register the webhook and make it ready to accept requests. Google Forms don't support webhooks natively, so paste the test URL into a Google AppScript bound to the form, set the trigger event to "On form submit," and save the script. The AppScript fires a POST request to that URL every time someone submits the form. Switch the AppScript's postUrl variable to the production URL only after the workflow is fully tested and activated.

Add an AWS SES (or Gmail, Outlook, or Send Email SMTP) node after the Webhook. In the body field, drag the first_name field from the webhook's JSON input panel directly onto the template text, and n8n converts it to the expression {{$json.body.first_name}} automatically. Do the same for the To address using the email field from the same JSON body. Use a brand-domain sender address rather than a personal Gmail to protect deliverability. Rename the node to something descriptive like "Send Welcome Message" so the canvas stays readable.

The IF node extends the workflow to branch on customer type. Set two conditions joined by AND: email does not end with gmail.com, and email does not end with hotmail.com. Because the email data lives two nodes back on the Webhook, click the Webhook node in the input selector to access it inside the IF node configuration. When both conditions are true, the submission is treated as a corporate signup. Connect the true branch to a Google Sheets node set to "Append row" to log corporate customers automatically for sales or marketing follow-up.

Key Takeaways

  • The Webhook node's test URL and production URL are separate. Update the postUrl variable in your Google AppScript every time you switch between them, or live submissions will hit a dead endpoint.
  • Google AppScript bridges Google Forms to n8n by catching the "On form submit" trigger event and sending a POST request to the webhook URL you configure in the script.
  • Dragging a field from the input panel into any configuration field switches that field from fixed to expression mode and wraps the reference in {{$json.body.fieldName}} automatically, so no manual expression syntax is required.
  • The IF node's "does not end with" string operation, chained with AND, identifies corporate emails by excluding known free domains. For production use, a regular expression covers more providers reliably.
  • Use a professional sending service such as AWS SES or SendGrid with a brand domain for outbound welcome emails. Free provider addresses like Gmail frequently land in spam.

Next Steps

Continue your n8n journey with the full n8n AI Automation - Zero to Hero course.

Frequently Asked Questions

The Webhook node provides a test URL so you can build and verify the workflow without exposing it to real traffic. Clicking 'Listen for test event' activates the test URL temporarily for a single submission. Once the workflow behaves correctly end to end, you paste the production URL into your Google AppScript's postUrl variable and activate the workflow so it runs continuously without needing manual listening.

Google Forms don't support webhook integrations out of the box. A Google AppScript bound to the form intercepts the 'On form submit' trigger event, packages the field values from the response, and sends a POST request to the webhook URL stored in the script's postUrl variable. The Webhook node in n8n receives that POST request and exposes the field values as JSON under the body property.

Dragging a field from the input panel into a configuration field switches that field from fixed mode to expression mode. n8n wraps the reference in double curly braces, for example {{$json.body.first_name}}, and evaluates it as JavaScript when the workflow runs. The submitted value replaces the placeholder in the final email, so every recipient receives a message addressed to their actual name without any manual variable syntax.

The IF node's true branch activates when the submitted email address does not end with gmail.com AND does not end with hotmail.com. A submission that satisfies both conditions is classified as a corporate customer. That true branch connects to a Google Sheets 'Append row' node, which logs the corporate signup automatically so a sales or marketing team can follow up.

Dheeraj Sharma

Dheeraj Sharma

AI Systems Builder
Creator of the n8n Zero to Hero course (42 lessons, 31+ hours). I help solopreneurs build AI systems that grow revenue without growing workload.

Get the n8n Mastery Bundle

All workflows, cheat sheets, and premium resources from the entire course in one package.

Get Premium Resources