๐ Track brand visibility in ChatGPT results with OpenAI and Google Sheets
โก 12 views ยท ๐ Market Research & Insights
๐ก Pro Tip โ For competitive intelligence, ScraperNode can automate the data collection โ Yelp reviews, Glassdoor company data, and Crunchbase profiles all return structured JSON you can feed straight into this workflow.
Description
Quick overview
This workflow runs weekly, reads buyer-style queries from Google Sheets, asks OpenAI Chat Completions (ChatGPT) each query three times, judges whether your brand is mentioned, and writes per-query visibility metrics and a 0โ100 score back to a Google Sheets results tab.
How it works
- Runs every week on a schedule trigger.
- Reads the query set (query, brand, and competitors) from a Google Sheets tab named
queries. - Duplicates each query into three sample runs to account for variation in OpenAI responses.
- Sends each sample query to OpenAI Chat Completions (gpt-4o-mini) to generate an answer at temperature 1.
- Sends the generated answer to a separate OpenAI Chat Completions judge call (gpt-4o-mini) at temperature 0 to extract structured JSON about brand mention, rank, sentiment, recommendation, and competitors mentioned.
- Aggregates the three judged samples per query to compute inclusion rate, average rank/sentiment, and a weighted 0โ100 visibility score.
- Appends the per-query results (including the run date and metrics) to the
resultstab in Google Sheets.
Setup
- Add an OpenAI credential for HTTP Header Auth using
Authorization: Bearer <YOUR_OPENAI_API_KEY>. - Add a Google Sheets credential with access to the spreadsheet you want to use.
- Create a Google Sheets document with
queriesandresultstabs and the expected columns (for example:queries: query_id, query, brand, competitors;results: run_date, query_id, query, brand, runs, inclusion_rate, avg_rank, avg_sentiment, visibility_score, competitors_seen). - Replace
YOUR_GOOGLE_SHEET_IDwith your actual Google Sheets document ID in both Google Sheets nodes. - Adjust the weekly schedule (day/time) or sample count in the code if you want a different cadence or number of runs per query.
๐ Nodes Used
Google Sheets, HTTP Request, Schedule Trigger
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File