Daily
Log review sentiment in a sheet and open cases for bad ones
New customer reviews are labelled positive, neutral or negative in a Google Sheet, and negative ones become Salesforce cases.
- Runs
- Daily
- Apps
- Google Sheets, Salesforce
- AI
- Yes, uses the built-in AI allowance
- Access
- sheet edit; api
Send this to your assistant
Create a ClickRuntime automation: every day, pull new reviews from our review site, label the sentiment of each, add them to my Reviews sheet, and create a high-priority Salesforce case for each negative one.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A software company collects reviews on a public review site. Marketing reads the five-star ones; the two-star review saying onboarding took three weeks sits unanswered, and support never hears about it until the customer cancels.
This automation reads new reviews every day, labels each one, and keeps a running log in a Google Sheet for the whole team. Negative reviews are opened as high-priority cases in Salesforce, so support follows up like any other complaint.
What you get out of it
Every complaint gets an owner
A negative review becomes a case in the support queue, with the full text, instead of a page nobody checks.
A sentiment log anyone can read
The sheet shows date, author, rating, sentiment and text, which is easy to filter, chart or share.
Sentiment beyond the star rating
A four-star review that complains about billing is caught, because the text is read, not just the stars.
Reviews are handled once
Each review is logged only once, even though the review site is checked every day.
How it works
What happens, step by step
Every day the automation fetches recent reviews from your review site.
It skips any review it has already logged.
AI labels each new review positive, neutral or negative.
Every new review is added to the Reviews tab of your sheet.
Each negative review is opened as a high-priority case in Salesforce.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Salesforce
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Google Sheets and Salesforce steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, report_fetched, credentials, http, state, ai
SHEET_ID = "your-spreadsheet-id"
REVIEWS = "https://reviews.example.com/api/reviews" # your review source
API = "https://yourcompany.my.salesforce.com/services/data/v61.0"
SCHEMA = {"type": "object", "properties": {"labels": {"type": "array", "items": {"type": "string",
"enum": ["positive", "neutral", "negative"]}}}, "required": ["labels"]}
@on_trigger
def run(event):
seen = set(state.get("seen") or [])
reviews = [r for r in http.get(REVIEWS, params={"days": 2}).json()["reviews"] if r["id"] not in seen][:40]
report_fetched(len(reviews))
if not reviews:
return {"summary": "No new reviews"}
numbered = "\n".join(f"{i + 1}. {r['rating']}/5 {r['text'][:400]}" for i, r in enumerate(reviews))
labels = ai.generate("Label the sentiment of each numbered review, in order.\n" + numbered, json_schema=SCHEMA, max_output_tokens=400).json["labels"]
headers = {"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"}
for r, label in zip(reviews, labels):
if label == "negative":
http.post(f"{API}/sobjects/Case", headers=headers, json={"Subject": f"Negative review from {r['author']}",
"Description": r["text"], "Origin": "Web", "Priority": "High"}).raise_for_status()
rows = [[r["date"], r["author"], r["rating"], label, r["text"]] for r, label in zip(reviews, labels)]
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
sheets.values().append(spreadsheetId=SHEET_ID, range="Reviews!A1", valueInputOption="RAW", body={"values": rows}).execute()
state.set("seen", sorted(seen | {r["id"] for r in reviews})[-2000:])
return {"logged": len(rows), "cases": labels.count("negative")}FAQ
Common questions
Which review sites does it work with?
Is each review sent to the AI separately?
Can positive reviews go somewhere too?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get realistic close dates for open deals
Every week, AI estimates a realistic close date for each open deal, saves it in Salesforce and logs the old and new dates in a sheet.
See how it worksAudit open deals against rules kept in a sheet
Every Monday, open Salesforce deals are checked against the rules in your Google Sheet and every breach is listed on a Findings tab.
See how it worksBuild a white-space table of what key accounts haven't bought
Each month, a Google Sheet shows every key account against your product list, marking what they own and counting the gaps.
See how it worksKeep exploring
Set up “Log review sentiment in a sheet and open cases for bad ones” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.