Enrich company data from Google Sheet with OpenAI Agent and ScrapingBee
Needs changesWhat this workflow does
This AI workflow has 12 nodes and runs when an HTTP GET request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI Chat Model and Google Sheets. It also calls app.scrapingbee.com over HTTP.
How it runs
Trigger: When an HTTP GET request hits its webhook URL (plus 1 other trigger).
- Get rows from Google Sheet (Google Sheets): uses Google Sheets
- Set company url (Edit Fields (Set)): sets 1 field: url
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- ScrapingBee : Scrape company's homepage data (HTTP Request): calls app.scrapingbee.com
- Update Company's Row on Google Sheet (Google Sheets): update
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Call n8n workflow : Scrape companies homepage content); output parser: Structured Output Parser
- HTML to Markdown (Markdown): converts between Markdown and HTML
Services it uses
HTTP calls to: app.scrapingbee.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Sheets
n8n-nodes-base.googleSheets - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - HTTP Request
n8n-nodes-base.httpRequest - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - AI Agent
@n8n/n8n-nodes-langchain.agent - Edit Fields (Set)
n8n-nodes-base.set - Markdown
n8n-nodes-base.markdown - Webhook
n8n-nodes-base.webhook
From the author
This workflow demonstrates how to enrich data from a list of companies in a spreadsheet. While this workflow is production-ready if all steps are followed, adding error handling would enhance its robustness. Important notes - Check legal regulations: This…