See llms.txt for all machine-readable content.

Back to Templates

Win back past customers from Google Sheets with OpenAI, Gmail and Slack

Quick overview

This workflow runs a win-back email campaign from Google Sheets using OpenAI to write emails, Gmail to send and draft replies, and Slack for approvals and reporting, while tracking sends, follow-ups, unsubscribes, and reply outcomes back in the sheet.

How it works

  1. Runs on three schedules: weekdays to send win-back emails, hourly to check Gmail for replies, and Mondays to post a weekly report to Slack.
  2. Reads Customers, Suppression, and Approvals tabs from Google Sheets and selects follow-ups due first and then new consented customers up to the daily limit.
  3. Uses OpenAI to generate a small sample for any new or changed offer, validates the content, and requests approval in Slack before sending anything.
  4. Uses OpenAI to write the remaining emails, validates each message (name, booking link, numbers/dates, length), then sends approved messages via the Gmail API in-thread for follow-ups and records status and thread IDs back to Google Sheets.
  5. Posts a daily Slack summary showing how many emails were sent or held and why, plus how many consented customers remain.
  6. Every hour, searches Gmail for campaign replies and unsubscribe messages, classifies bounces and opt-outs in code, and uses OpenAI to categorize other replies and draft responses when possible.
  7. Updates Google Sheets with reply status and summaries, adds bounced/unsubscribed addresses to the Suppression tab, labels handled messages in Gmail, creates Gmail reply drafts for interested/questions, and posts a Slack alert with reply highlights.
  8. On Mondays, aggregates campaign metrics from Google Sheets and posts a weekly performance report to Slack.

Setup

  1. Add credentials for Google Sheets OAuth2, Gmail OAuth2 (with permission to read and send), Slack OAuth2, and an OpenAI API key.
  2. Run the manual setup to create the “Win-back Campaign” Google Sheet and the Gmail label, then copy the generated sheetId and handledLabelId into the Campaign Settings.
  3. Fill in Campaign Settings values (business details, offer, booking link, Slack channel ID, limits, follow-up timing, and optional FAQ/offer end date) and set the workflow timezone.
  4. Populate the Customers tab with recipients and set consent to “yes”, and optionally preload the Suppression tab to exclude addresses you should never email.

Requirements

  • Gmail, Google Sheets, Slack and an OpenAI API key. Only email people who agreed to hear from you, and follow the email marketing rules where you and they live.

Customization

  • Change the daily limit, sample size and follow-up timing in Campaign Settings, and the send time in Every Weekday at 10.