Skip to main content

Send re-engagement emails to inactive users with Supabase, Claude and SMTP

Workflow preview

Workflow preview
100%
Send re-engagement emails to inactive users with Supabase, Claude and SMTP preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow runs daily to find inactive users in Supabase, generates personalized re engagement emails with Anthropic Claude using brand directions stored in an email guidance tabl...

Best for

  • Automation automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.supabase, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.emailsend

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Aumadi Technologies.

Original n8n.io source

1.1 Workflow description

Title
Send re-engagement emails to inactive users with Supabase, Claude and SMTP
Workflow name
Send re-engagement emails to inactive users with Supabase, Claude and SMTP

Quick Overview

This workflow runs daily to find inactive users in Supabase, generates personalized re-engagement emails with Anthropic Claude using brand directions stored in an email_guidance table, sends the emails via SMTP, and updates the user record to prevent repeat sends.

How it works

  1. Runs every day at 9am on a schedule.
  2. Reads the selected email guidance (three directions and a subject hint) from the Supabase email_guidance table based on the configured mail type.
  3. Fetches up to 100 users from the Supabase users table who have been inactive longer than the configured number of days and have not been sent a re-engagement email.
  4. Sends each user’s name and the three guidance directions to Anthropic Claude to generate a JSON response containing an email subject and body.
  5. Parses Claude’s response, builds an HTML version of the email, and skips any users without an email address.
  6. Sends the email via SMTP and, on successful delivery, updates the Supabase user record to set reengagement_sent to true and store the reengaged_at timestamp.

Setup

  1. Add Supabase credentials (host and service_role key) and ensure your database has a users table plus an email_guidance table with fields for mail_type, direction_1, direction_2, direction_3, and subject_hint.
  2. Add an Anthropic (Claude) API key using HTTP Header Auth with the x-api-key header, and keep the required Anthropic version header as configured.
  3. Add SMTP credentials for your email provider and set the fromEmail value in the workflow configuration.
  4. Update the workflow configuration values (inactiveDays, mailType, and model) and confirm your users table includes email, name, last_active_at, reengagement_sent (and optionally reengaged_at) columns.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - 🎥 Demo Video

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - 📘 Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - 🔧 Setup

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Every day 9am

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 5 - ⚙️ Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 6 - Get Email Guidance (3 directions)

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 7 - Get Inactive Users

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 8 - 🧠 Claude: Write Email

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Extract Email

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - ✉️ Send Email

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 11 - Mark Re-engaged

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 12 - 📒 The twist

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Section — Find inactive users

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Section — AI writes the email

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Section — Send & mark done

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Send re-engagement emails to inactive users with Supabase, Claude and SMTP
Complexity advanced
Nodes 15
Categories Automation
Author Aumadi Technologies
Published 16 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16423/16423.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Send re-engagement emails to inactive users with Supabase, Claude and SMTP do?

Quick Overview This workflow runs daily to find inactive users in Supabase, generates personalized re engagement emails with Anthropic Claude using brand directions stored in an email guidance tabl...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Automation use case.