Send Retention Emails With AI

OpenAIGoogle Sheets

Classify users into retention segments, enrich with LinkedIn context, and generate personalized reactivation emails — logged to Google Sheets and optionally sent.

Retention EmailsLinkedIn EnrichmentChurn PreventionGoogle Sheets

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:

  1. Loads your user data and product configuration
  2. Uses an AI agent to classify each user into a retention segment and draft an initial email
  3. Searches the web for each user's LinkedIn profile to gather personalization context
  4. Rewrites each email with LinkedIn insights woven in naturally
  5. 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 like last_activity_at and company_name improve 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

StepNodeWhat It Does
1Scheduled TriggerKicks off the workflow on a schedule you define. Default is every Monday at 9 AM.
2Load 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.
3AI 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.
4Filter + Config Re-inject (Code)Removes users classified as no_action and re-attaches your product config so downstream AI nodes can access it.
5LinkedIn 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.
6Personalized 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.
7Format for Review (Code)Cleans up the output into a simple structure with 10 fields per user, ready for logging or review.
8Google Sheets (Add Rows)Writes all email drafts to a spreadsheet so you can review, track, and audit what was sent.
9Superchat 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:

FieldDescription
user_idThe user's unique identifier
full_nameThe user's full name
emailThe user's email address
company_nameThe user's company
play_typeThe retention segment assigned
linkedin_profile_urlLinkedIn URL (if found)
personalization_hintExplanation of the personalization angle used
reason_for_sendWhy this user was selected for outreach
email_subjectFinal email subject line
email_bodyFinal email body

If the Superchat node is connected and configured, the emails are also sent automatically.

Important Notes

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Ready to vibe automate?

Join thousands of people who have transformed their workflows.

Workflows

Automations with AI agents

Collections

All your data, searchable

Chat Widget

Drop-in widget for your website

Developer API

Build AI-powered apps with ease

    We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy