Quick overview
This workflow runs every weekday morning to find HubSpot deals with no recent activity, uses OpenAI to generate a personalized re-engagement email, sends it via Gmail, logs the outcome to Google Sheets, and notifies your team in Slack with per-deal alerts and a daily digest.
How it works
- Runs on a weekday schedule at 08:00 and retrieves all open deals from HubSpot.
- Calculates days since the last deal activity and keeps only deals stalled for 7 days or more.
- Checks whether each stalled deal has an associated HubSpot contact and logs deals without a contact to Google Sheets as skipped.
- Fetches the associated contact from HubSpot, verifies an email address exists, and logs deals without an email to Google Sheets as skipped.
- Sends the deal and contact context to OpenAI to generate a JSON email subject and body, then parses the result into fields.
- Sends the re-engagement email to the contact via Gmail, adds a note to the HubSpot deal, posts a Slack alert to the sales channel, and appends the action to Google Sheets.
- Builds a run summary (re-engaged vs skipped) and posts a single daily digest message to Slack.
Setup
- Add credentials for HubSpot, OpenAI, Gmail, Slack, and Google Sheets in n8n.
- Replace
REPLACE_WITH_YOUR_SHEET_ID with your Google Sheet document ID and ensure the target sheet name (for example, Sheet1) exists.
- Create the Google Sheet columns used for logging (Date, Deal Name, Contact Email, Stage, Days Stalled, Email Sent, Slack Notified, Status).
- Update the Slack channel names/IDs for the sales notifications (for example,
sales-team) and the error channel (for example, n8n-errors).