Send Retention Emails With AI
Classify users into retention segments, enrich with LinkedIn context, and generate personalized reactivation emails — logged to Google Sheets and optionally sent.
Overview
This workflow automates personalized retention and reactivation emails for your users. Provide a list of users with basic activity data, and it will classify each one into a retention segment, research them on LinkedIn for personalization context, and produce ready-to-send emails tailored to each person.
At a high level, the workflow does five things:
- Loads your user data and product configuration
- Uses an AI agent to classify each user into a retention segment and draft an initial email
- Searches the web for each user's LinkedIn profile to gather personalization context
- Rewrites each email with LinkedIn insights woven in naturally
- Logs the final drafts to a Google Sheet and optionally sends them
Prerequisites
- A list of users with at least:
user_id,email,first_name,full_name. Additional fields likelast_activity_atandcompany_nameimprove results. - A Google account to connect the Google Sheets node for logging drafts.
- If you want to auto-send: a Superchat account with API key, or replace the HTTP node with your own email provider (Gmail, SendGrid, Mailgun, etc.).
Workflow Steps
| Step | Node | What It Does |
|---|---|---|
| 1 | Scheduled Trigger | Kicks off the workflow on a schedule you define. Default is every Monday at 9 AM. |
| 2 | Load Data + Config (Code) | The starting point you customize. Contains a CONFIG block where you describe your product (name, brief, segmentation rules, email tone, sender name) and a data section where you paste your user list or swap the node for Google Sheets, Airtable, or an API connection. |
| 3 | AI Classify and Draft (AI Agent) | Reads each user's data alongside your segmentation rules and assigns a play_type (e.g. gentle_nudge, win_back, onboarding_reminder). Also writes a reason_for_send and drafts a first version of the email. |
| 4 | Filter + Config Re-inject (Code) | Removes users classified as no_action and re-attaches your product config so downstream AI nodes can access it. |
| 5 | LinkedIn Enrichment (AI Agent with web search) | Searches the internet for each user's LinkedIn profile. When found, it extracts a summary of their role, company, and interests for personalization. |
| 6 | Personalized Email Rewrite (AI Agent) | Takes the draft email and LinkedIn research, then rewrites the subject line and body to weave in personal details naturally. Also produces a personalization_hint explaining the angle used. |
| 7 | Format for Review (Code) | Cleans up the output into a simple structure with 10 fields per user, ready for logging or review. |
| 8 | Google Sheets (Add Rows) | Writes all email drafts to a spreadsheet so you can review, track, and audit what was sent. |
| 9 | Superchat Send (HTTP Request) | Sends the emails via the Superchat API. This node is connected by default but can be disconnected if you prefer to review before sending, or replaced with any email provider. |
Output
A Google Sheet with one row per user containing the following fields:
| Field | Description |
|---|---|
user_id | The user's unique identifier |
full_name | The user's full name |
email | The user's email address |
company_name | The user's company |
play_type | The retention segment assigned |
linkedin_profile_url | LinkedIn URL (if found) |
personalization_hint | Explanation of the personalization angle used |
reason_for_send | Why this user was selected for outreach |
email_subject | Final email subject line |
email_body | Final email body |
If the Superchat node is connected and configured, the emails are also sent automatically.
Important Notes
- Duplicate CONFIG blocks: The CONFIG block appears in two Code nodes (the data loader and the filter). If you change your product details in one, update the other to match.
- LinkedIn search accuracy: LinkedIn search works best with real user names and companies. The sample data uses fictional names, so results will vary during testing.
- Review-before-send workflow: To review emails before they go out, disconnect the HTTP Request node from the Google Sheets node. Reconnect it once you've reviewed the drafts in the spreadsheet.
- Email provider flexibility: The Superchat send node can be replaced with any email provider you prefer — Gmail, SendGrid, Mailgun, or anything accessible via HTTP.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
