π Track organic SEO market share with DataForSEO, OpenAI and Google Docs
β‘ 21 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 to identify your organic search competitors with DataForSEO, estimate traffic and market share for each domain, and compare results to prior runs stored in Google Sheets. It uses OpenAI to draft a narrative report, writes it to Google Docs, and emails the document link via Gmail.
How it works
- Runs every Monday morning on a schedule.
- Calls the DataForSEO Competitors Domain endpoint to find competing domains for your site and filters out your own domain plus common platforms unless you provide a pinned competitor list.
- Requests DataForSEO Bulk Traffic Estimation for the full peer set and reads prior snapshots from the
historytab in Google Sheets. - Calculates each domainβs estimated visits, share of the peer set, and share change since the most recent prior run, then flags domains that are new to the set or gained meaningful share.
- For domains that gained share, fetches DataForSEO Relevant Pages to capture the top pages driving the increase, and for domains new to the set, fetches DataForSEO Domain Rank Overview to add a one-time profile note.
- Sends the aggregated results to OpenAI to generate a short plain-text market note, then creates and fills a Google Doc with a title, a fixed-width table, and the narrative.
- Emails the Google Doc link and summary via Gmail and appends one row per domain to the Google Sheets
historytab for next run comparisons.
Setup
- Create a DataForSEO Basic Auth credential in n8n (username is your account email and password is your API password).
- Create a Google Sheet with a tab named
historyand columnschecked_on,domain,is_you,visits,share_pct, andkeywords, then connect Google Sheets credentials. - Connect Google Docs and Gmail credentials and choose the Drive folder to store the generated reports.
- Add an OpenAI credential (or OpenAI-compatible model access) and confirm the model selection in the OpenAI chat model node.
- Update the Settings values for
your_domain,location,language,history_sheetURL,drive_folder, andemail_to, and optionally setpinned_rivalsand thresholds likemove_pct.
Requirements
- A DataForSEO account with the Labs API. Two requests run every time (about $0.024 together) and only the movers cost more: a rival that gained share adds $0.013, a domain new to the peer set adds $0.012. A five-rival month is roughly seven cents.
π Nodes Used
Google Sheets, HTTP Request, Gmail, Google Docs, Schedule Trigger, Basic LLM Chain
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File