img set up personalised emails with n8n automation n8n email automation

Set up personalised emails with n8n automation

n8n is a node-based workflow tool for connecting apps and automating repetitive tasks. I use it to glue simple building blocks together: fetch rows from a sheet, run a few transforms, then send an email. It runs on a single machine or a server. You can self-host and keep your data local.

Automation removes copy‑paste and late-night sends. A workflow makes your newsletter repeatable. It pulls fresh data from Google Sheets integration, formats content, and sends batches without manual clicks. That saves time and reduces mistakes. It also lets you add AI-driven newsletters later by inserting a content-generation node before the send step.

I use n8n email automation to send weekly digests, drip sequences and triggered alerts. Common patterns:

  • Read rows tagged “send” in Google Sheets and email each row.
  • Pull content via an AI step, merge into a template, then send.
  • Collect replies into a spreadsheet and mark rows as processed.

You need:

  • A machine or VM with Docker, or a server where you can run n8n.
  • A Google account with a spreadsheet for recipients and content.
  • SMTP credentials or an API key from an email provider (SendGrid, Mailgun, etc.).
  • Basic comfort with the n8n editor.

Installation process

Quickest way is Docker. Example command for a test instance:

  1. docker run -it –rm -p 5678:5678 -e N8NBASICAUTHACTIVE=true -e N8NBASICAUTHUSER=admin -e N8NBASICAUTH_PASSWORD=changeme n8nio/n8n
    That starts n8n on http://localhost:5678. Use production setup for live runs.

If you prefer docker-compose, create a small compose with the n8n image, persistent volumes and environment variables for auth and SMTP. Start the stack with docker-compose up -d.

In the n8n editor:

  1. Click the plus icon, search for “Google Sheets”, and add the node.
  2. Click Credentials, then Create New and choose OAuth2.
  3. In Google Cloud Console create an OAuth client ID and set the authorised redirect URI to the callback URL n8n lists on the credential screen.
  4. Back in n8n, click Connect and complete the Google account consent.

Once authorised, configure the node to point at your spreadsheet and the sheet name. Test by running the node to read a few rows.

Creating your first workflow

Follow these steps.

  1. Create a new workflow. Click New.
  2. Add a Google Sheets node. Configure it to Read Rows. Set the range or query such as A2:C100. Save credentials.
  3. Add a Function node if you need to transform rows. Example JavaScript to map columns:
    • Click +, choose Function, paste:
      return items.map(i => ({ json: { email: i.json.Email, name: i.json.Name, body: Hello ${i.json.Name} } }));
  4. Add an Email node (SMTP or SendGrid). Click +, search for SMTP or SendGrid, add the node.
  5. Connect the Function node to the Email node.
  6. Configure the Email node fields:
    • From: newsletter@yourdomain.com
    • To: {{$json[“email”]}}
    • Subject: Weekly digest for {{$json[“name”]}}
    • HTML: {{$json[“body”]}}
  7. Save the workflow. Toggle Active to off during tests.

For SMTP:

  • Host: smtp.yourprovider.com
  • Port: 587
  • Secure: false (or true for 465)
  • User and Password: the SMTP account

For API providers like SendGrid:

  • Use the SendGrid node or HTTP Request node with header Authorization: Bearer .
  • In the node UI click Credentials, then create new credential and paste the API key.

Exact UI clicks:

  • Open the Email node, click Credentials, Create New, choose SMTP/SendGrid, fill fields, click Save.
  • Test with the Test button in the node. The node returns a success object when the provider accepts the message.

Testing the workflow

  1. In the top bar click Execute Workflow to run once.
  2. Watch the node colours. Green means success, red means failure.
  3. Click the Email node’s output to inspect the response data. Expect a provider status like “250 OK” for SMTP or a JSON response with message_id for APIs.
  4. Check the recipient inbox for the message and inspect headers to confirm delivery.

Verification expected output:

  • n8n node status: success (green) for every node.
  • SMTP response: a 250 OK response in the node output.
  • Email received with correct Subject and personalised body.

If your workflow will send real emails, disable it until you complete tests. Sending live emails is a state change.

Monitoring workflow performance

Use the Executions view in n8n to monitor runs and timings. Enable environment logging for more detail:

  • Set N8NLOGLEVEL=info (or debug for deeper traces).
    Keep an eye on memory and CPU if you batch large lists. Break big sends into chunks to avoid provider rate limits.

Check the n8n documentation and community forum for node-specific quirks. Search the node error text; most times someone has hit the same issue. If you used Google API, confirm the project and OAuth consent screen settings. For SMTP problems check the provider’s dashboard and bounce logs.

Final takeaway: build the flow in small, testable steps. Read rows, transform, send. Test each node and keep an export of the working workflow. That gives a fast rollback path and keeps your newsletter runs predictable.

Leave a Reply

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

Prev
Samsung Galaxy Tab A9+ and 2 more Amazon tech bargains
weekly deals

Samsung Galaxy Tab A9+ and 2 more Amazon tech bargains

Discover the Samsung Galaxy Tab A9+ and two more tech deals available this week

Next
n8n | n8n@1.111.0
n8n n8n1 111 0

n8n | n8n@1.111.0

Explore n8n Release 1

You May Also Like