All workflows
Google Sheets logoAnthropic logoGmail logo

Send sentiment-aware emails with coupons

Emails each customer about their purchase in your tone, reads their feedback first, and adds a coupon when the feedback is negative.

Every day3 apps6 steps

Apps it connects

Authenticate each one once and the workflow is ready to run.

What it does

The integration steps this workflow runs, in the order it first runs them.

  1. 1Google SheetsCreate tab
  2. 2Google SheetsAppend row
  3. 3Google SheetsRead column
  4. 4Google SheetsRead rows
  5. 5AnthropicGenerate model response
  6. 6GmailSend

How it works

Everything the template sets up, and what to fill in before the first run.

Every day this workflow reads a Google Sheet of customer purchases and the feedback each customer left, works out whether that feedback is positive, neutral or negative, and sends each customer a short personalised email from your own Gmail account, written in the tone you choose. A customer whose feedback was negative gets an apology and a coupon code to win them back; everyone else gets a thank-you that answers what they said and invites them to shop again.

Your sheet needs a header row with Name, Email, Product and Feedback columns, spelled exactly like that. Nothing in it is ever changed: the workflow adds a separate 'Emails sent' tab alongside it and appends one line there for every email it sends - the customer's address, the product, how the feedback was read, whether a coupon went out and the subject line.

That tab is what makes a daily run safe. Every customer and product is checked against it before anything is written, so nobody is emailed twice about the same purchase, and a customer who buys something else later still hears from you. If an email goes out but the tab cannot be written, the run stops immediately rather than carrying on and emailing the same person again tomorrow.

Rows are handled carefully rather than blindly. A row whose Email cell is empty or not an address is reported and skipped. A row with no feedback yet is left alone and picked up on the day the feedback arrives, so nobody is thanked for a review they have not written. If the sentiment cannot be read, or no usable subject or body comes back, the row is skipped and tried again the next day. Every recovery email is checked for the coupon code and the code is added if the model left it out, and no coupon is ever offered on the thank-you path.

'maxEmailsPerRun' starts at 1 so your first run is a test: one email goes out, you read it, then you raise the number. Fill in 'sheetUrl', 'sheetTabName', 'businessName', 'senderName', 'couponCode' and 'couponDetails' to set it up. 'emailTone' sets the voice of every email, and 'optOutLine', if you fill it in, is added to the end of each one.

gmailgoogle sheetscustomer feedbacksentimentcouponsaidaily

Start from a workflow that already works.

Add "Send sentiment-aware emails with coupons" to your workspace, connect its apps, and make it yours. No credit card required.

Free plan available · No credit card required