Quick Overview
This workflow pulls Google Business Profile reviews, classifies each review’s themes and sentiment with Anthropic, stores results in Supabase, and emails a monthly plain-English digest via Microsoft Outlook with trend, split-detection, and change since the last report.
How it works
- Runs manually (test set, live reviews, or location lookup) or on a monthly schedule to start a reporting cycle.
- Fetches Google Business Profile reviews for the configured location (or loads built-in test reviews) and normalizes them into a consistent structure.
- Reads previously stored classifications from Supabase and keeps only reviews that have not been classified before.
- Sends each new review to Anthropic Claude for theme and sentiment classification, validates the JSON and quotes against the original text, and upserts the classifications into Supabase.
- Combines stored and newly classified reviews, then computes theme counts, severity, “real split” disagreements, staleness, and a 24‑month rating trend entirely in code.
- Pulls the last saved report from Supabase to determine whether this run is a full, delta, or quiet report and builds a digest prompt (or generates a quiet-month digest without AI).
- Produces a final digest, renders it into branded HTML, sends it via Microsoft Outlook, and saves the report snapshot back to Supabase for next month’s comparison.
Setup
- Create the Supabase tables (review_classifications and review_reports) and add a Supabase API credential, then replace YOUR_PROJECT_REF in the Supabase REST URLs.
- Add Google Business Profile OAuth2 credentials and set YOUR_GBP_ACCOUNT_ID and YOUR_GBP_LOCATION_ID in the Google Business Profile requests.
- Add an Anthropic credential for the Claude model used to classify reviews and write the digest.
- Add Microsoft Outlook credentials and update the To/CC/BCC recipients used for the digest email.
- Update the business_name and location_id in the run configuration to match the location you want to report on, then enable the Monthly Run trigger when you are ready.