A monitoring workflow in n8n runs your customer questions through AI platforms on a schedule, checks each answer for your brand and domain, and records the results so you can chart your share over time. The bottom line: it is a scheduled loop with an API call, a small piece of parsing code, and a results table, and the main limits are that API answers can differ from what people see in the apps and that you need enough runs per question for the numbers to mean anything.
What the workflow does
It reads a list of questions from a sheet, sends each to one or more platform APIs several times, parses each response for mentions and citations, writes one row per run, and alerts you when your share changes. The same idea is packaged in tools that run prompts through OpenAI's web search, Perplexity Sonar, and Gemini with Google Search grounding and diff the results between runs. Building your own gives you control of the question set and the raw data.
The pieces
| Piece | n8n node | Job |
|---|---|---|
| Schedule | Schedule Trigger | Runs monthly, or weekly for active work |
| Questions | Google Sheets, read rows | One row per question with your brand terms and competitors |
| Repeat | Loop Over Items, with a run counter | Runs each question five or more times per platform |
| Ask | HTTP Request or a provider node | Calls the API with web search enabled and a fresh conversation each time |
| Parse | Code | Detects brand mention, domain citation, and other cited domains |
| Record | Google Sheets, append row | Question, platform, run, date, named, cited, sources |
| Summarize | Aggregate or Code | Share of runs per question and platform |
| Alert | IF, then Slack or email | Notifies you when share moves beyond a threshold |
APIs to call
Three official options return answers grounded in current web search: the OpenAI Responses API with its web search tool, Perplexity's Sonar models, which return citations, and Gemini with Google Search grounding. The Vercel AI SDK cookbook shows each in a few lines. Anthropic's API also offers a web search tool. Check each provider's current documentation for parameters and pricing before building.
Parsing code
// n8n Code node: detect brand mention and domain citation in one answer
const answer = ($json.answer || '').toLowerCase();
const sources = ($json.sources || []).map(s => (s.url || s).toLowerCase());
const brandTerms = ['example plumbing', 'exampleplumbing.com'];
const domain = 'exampleplumbing.com';
return {
json: {
...$json,
named: brandTerms.some(t => answer.includes(t)),
cited: sources.some(u => u.includes(domain)),
otherDomains: [...new Set(sources.map(u => new URL(u).hostname))]
}
};
Build steps
- Create the questions sheet. 20 to 50 customer questions with place and situation.
- Add the Schedule Trigger. Monthly to start.
- Read the sheet. One item per question.
- Loop each question five times per platform. That is 300 calls a month for 20 questions on three platforms.
- Call each API with a fresh request. Do not reuse conversation history.
- Parse the response. Use the code above and adapt the brand terms.
- Append a row per run. Keep raw answers for audit.
- Compute shares. Runs that name you divided by total runs.
- Add an alert. Notify when your share drops or a competitor's rises past your threshold.
- Spot check against the apps. Run a handful of questions manually and compare.
Limits to state plainly
- API answers are a proxy. They may differ from the consumer apps, so confirm with manual checks.
- Variation. SparkToro and Gumshoe found less than a 1 in 100 chance that two responses returned the same brand list, so use enough runs. With 100 runs and a share near 30 percent the margin is about 9 points.
- Cost. Calls add up. Estimate calls times price before scheduling.
- Name matching. String matching can miss variants or catch false matches, so review a sample.
Questions people ask
Can I monitor AI visibility with n8n?
Yes. A scheduled workflow can read questions from a sheet, call OpenAI, Perplexity, or Gemini APIs with web search enabled, parse each answer for your brand and domain, and record results.
Are API answers the same as ChatGPT answers?
Not necessarily. API responses can differ from what people see in the consumer apps, so treat them as a proxy and spot check manually.
How many runs should the workflow do?
At least five per question per platform. With 100 runs and a share near 30 percent the margin of error is about 9 percentage points.
What should the workflow record?
The question, platform, run number, date, whether your brand was named, whether your domain was cited, and the other domains cited.
