Track buyer query citation sources with GPT-4o and Google Sheets
Ready for 3.0What this workflow does
This workflow has 10 nodes and runs on a schedule (every week at 09:00). Along the way it connects Google Sheets. It also calls api.openai.com over HTTP.
How it runs
Trigger: On a schedule (every week at 09:00).
- Read Queries from Sheets (Google Sheets): uses Google Sheets
- Expand Queries to Samples (Code): runs custom JavaScript code
- Batch Process Samples (Loop Over Items (Split in Batches)): loops over the items in batches
- Aggregate Citation Data (Code): runs custom JavaScript code
- Post to OpenAI API (HTTP Request): calls api.openai.com (POST)
- Classify Citation Domains (HTTP Request): calls api.openai.com (POST)
- Extract URL Citations (Code): runs custom JavaScript code
- Join Domain Classifications (Code): runs custom JavaScript code
- Append Citations to Sheets (Google Sheets): append
Services it uses
HTTP calls to: api.openai.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (5)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - HTTP Request
n8n-nodes-base.httpRequest
From the author
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…