π Track buyer query citation sources with GPT-4o and Google Sheets
β‘ 19 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 tracks which sources ChatGPT cites for buyer queries.vIt runs weekly to test buyer queries against OpenAIβs GPT-4o web search, extracts the cited URLs, and logs per-query citation counts and domain classifications to Google Sheets.
How it works
- Runs every week on a schedule trigger.
- Reads a list of buyer queries (including brand and competitor context) from the
queriestab in Google Sheets. - Sends each query to OpenAIβs
gpt-4o-mini-search-previewthree times with web search enabled and extracts theurl_citationannotations from each response. - Aggregates citations per query and domain, calculating citation totals and a sample hit rate across the three runs.
- Sends the unique cited domains to OpenAIβs
gpt-4o-minito classify each domain into a source taxonomy (brand site, competitor site, review platform, community, publisher, or docs/other). - Appends the aggregated rows with the domain classification and an example URL to the
citationstab in Google Sheets.
Setup
- Add an OpenAI API key as an HTTP Header Auth credential (Authorization: Bearer YOUR_KEY) for both OpenAI HTTP requests.
- Add a Google Sheets credential with access to the target spreadsheet.
- Create a sheet with tabs
queriesandcitationsβ> queries: query_id | query | brand | competitors. citationsβ> run_date | query_id | query | domain | citations | sample_hit_rate | source_type | example_url - Replace
YOUR_GOOGLE_SHEET_IDin both Google Sheets nodes and ensure the spreadsheet hasqueriesandcitationstabs with the expected columns.
π Nodes Used
Google Sheets, HTTP Request, Schedule Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File