Skip to content
MORNINGMETHOD
Structured Output…OpenAI Chat ModelGet rows from Goo…Call n8n workflow…Update Company's …ScrapingBee : Scr…Tool called from …Loop Over ItemsAI AgentSet company urlHTML to MarkdownWebhook
The workflow you get12 nodes
  • n8n
  • OpenAI
  • Google Sheets
  • HTTP Request
  • AI Agent

AI Company Data Enrichment from Google Sheets

Give it a list of company names, and the AI looks up and adds their details.

Best for: Sales teams cleaning up lead lists

$19.00Regular price $49.0061% off
  • Card or PayPal
  • Instant download
  • Setup guide included
Delivery
Download after payment
Format
n8n workflow + guide (ZIP)
Access
Re-download any time

Setup

What you need, and how to set it up

It starts when another app sends it a message at its web address. No code needed. Follow the steps in order.

What you need

  • An n8n account

    The app that runs the automation.

    Free to self-host, or a free trial on n8n Cloud.

  • OpenAI API keyPay as you go, usually a few cents a day

    A secret password that lets n8n use ChatGPT's brain.

    Get it: Go to platform.openai.com, open API keys, and click Create new secret key. Copy it. Show me how to connect OpenAI API key (opens n8n docs)

    Used by: OpenAI Chat Model

  • Google service accountFree

    A robot Google account n8n signs in with.

    Get it: In Google Cloud, create a service account and download its JSON key. Show me how to connect Google service account (opens n8n docs)

    Used by: Get rows from Google Sheet, Update Company's Row on Go

Setup in 6 easy steps

  1. Step 1: Get n8n

    n8n is the app that runs your automation. Make a free account at n8n.io. That is the easy way. You can also put it on your own computer for free.

  2. Step 2: Download your file

    After you pay, open My downloads and download the ZIP. Double-click it to open it. Inside is a file called workflow.json.

  3. Step 3: Put it in n8n

    In n8n, click Create workflow. Click the three dots (⋯) at the top, then Import from file, and pick workflow.json. Now you see the same boxes as in the picture above.

  4. Step 4: Connect your accounts

    Some boxes show a little red triangle. That means they need a key. Click the box, click Create new credential, and paste the key from your list. Do this for each red box.

  5. Step 5: Try it once

    Click Test workflow, then send one test message to the web address n8n shows on the first box. Green ticks on the boxes mean it worked.

  6. Step 6: Turn it on

    Click Save. Then flip the switch at the top from Inactive to Active. Now it works by itself, even while you sleep.

Stuck? Email support@morningmethod.co and we will help you.

Category: Automations › Lead Generation & CRM · Best for: Sales teams cleaning up lead lists · Platform: n8n · Steps: 12

What it does

Give it a list of company names, and the AI looks up and adds their details.

Enrich Company Data from Google Sheet with OpenAI Scraper Agent

Works with: OpenAI, Tool Workflow, Output Parser Structured, Google Sheets, Agent, ScrapingBee

What you get

  • The n8n workflow file (workflow.json), ready to import
  • This setup guide
  • The list of fields to change for your own accounts (see Install below)
  • Email support if you get stuck

Before you start

  1. An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker: docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678.

  2. Accounts and API keys for these services:

    • OpenAI API key: how to connect (used by OpenAI Chat Model)
    • Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Get rows from Google Sheet, Update Company's Row on Google Sheet)

Install

  1. In n8n, click Create workflow (top right).
  2. Click the ⋯ menu → Import from file and choose workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V.
  3. Open each node with a red warning triangle and pick or create the matching credential from the list above.
  4. Point these fields at your own sheets, chats and accounts:
    • Get rows from Google Sheet → sheetName: choose your own
    • Get rows from Google Sheet → documentId: choose your own
    • Update Company's Row on Google Sheet → sheetName: choose your own
    • Update Company's Row on Google Sheet → documentId: choose your own
  5. Click Save.

Test it

  1. Click Test workflow (or Execute workflow). Webhook starts it. Trigger it once with real sample data.
  2. Click each node to check its output. A green tick means the step worked.
  3. Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.

Go live

Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.

How it works, step by step

  1. Webhook starts the workflow (Webhook).
  2. Tool called from Agent starts the workflow (Execute Workflow).
  3. OpenAI Chat Model uses AI (OpenAI).
  4. Call n8n workflow : Scrape companies homepage content uses AI (Tool Workflow).
  5. Structured Output Parser uses AI (Output Parser Structured).
  6. Get rows from Google Sheet uses Google Sheets.
  7. Set company url reshapes the data for the next step.
  8. AI Agent uses AI (Agent).
  9. Loop Over Items uses Split In Batches.
  10. **ScrapingBee : Scrape company's homepage data ** calls an external API (https://app.scrapingbee.com/api/v1).
  11. Update Company's Row on Google Sheet uses Google Sheets to update.
  12. HTML to Markdown uses Markdown.

India & US notes

India: Zoho CRM and WhatsApp follow-ups are the most common combo; you can swap the CRM node for Zoho CRM. US: HubSpot free CRM is the usual starting point.

Extra setup notes

These notes are also on the canvas as yellow sticky notes:

Enrich Company Data from Google Sheet with OpenAI Scraper Agent

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.

Impportant notes

  • Check legal regulations: This workflow involves scraping, so make sure to check the legal regulations around scraping in your country before getting started. Better safe than sorry!
  • Mind those tokens: OpenAI tokens can add up fast, so keep an eye on usage unless you want a surprising bill that could knock your socks off!

Main Workflow

Node 1 - Webhook

This node triggers the workflow via a webhook call. You can replace it with any other trigger of your choice, such as form submission, a new row added in Google Sheets, or a manual trigger.

Node 2 - Get Rows from Google Sheet

This node retrieves the list of companies from your spreadsheet. The columns in this Google Sheet are:

  • Company: The name of the company

  • Website: The website URL of the company
    These two fields are required at this step.

  • Business Area: The business area deduced by OpenAI from the scraped data

  • Offer: The offer deduced by OpenAI from the scraped data

  • Value Proposition: The value proposition deduced by OpenAI from the scraped data

  • Business Model: The business model deduced by OpenAI from the scraped data

  • ICP: The Ideal Customer Profile deduced by OpenAI from the scraped data

  • Additional Information: Information related to the scraped data, including:

    • Information Sufficiency:
      • Description: Indicates if the information was sufficient to provide a full analysis.
      • Options: "Sufficient" or "Insufficient"
    • Insufficient Details:
      • Description: If labeled "Insufficient," specifies what information was missing or needed to complete the analysis.
    • Mismatched Content:
      • Description: Indicates whether the page content aligns with that of a typical company page.
    • Suggested Actions:
      • Description: Provides recommendations if the page content is insufficient or mismatched, such as verifying the URL or searching for alternative sources.

Node 3 - Loop Over Items

This node ensures that, in subsequent steps, the website in "extra workflow input" corresponds to the row being processed. You can delete this node, but you'll need to ensure that the "query" sent to the scraping workflow corresponds to the website of the specific company being scraped (rather than just the first row).

Node 4 - AI Agent

This AI agent is configured with a prompt to extract data from the content it receives. The node has three sub-nodes:

  • OpenAI Chat Model: The model used is currently gpt4-o-mini.
  • Call n8n Workflow: This sub-node calls the workflow to use ScrapingBee and retrieves the scraped data.
  • Structured Output Parser: This parser structures the output for clarity and ease of use, and then adds rows to the Google Sheet.

Node 5 - Update Company Row in Google Sheet

This node updates the specific company's row in Google Sheets with the enriched data.

Scraper Agent Workflow

Node 1 - Tool Called from Agent

This is the trigger for when the AI Agent calls the Scraper. A query is sent with:

  • Company name
  • Website (the URL of the website)

Node 2 - Set Company URL

This node renames a field, which may seem trivial but is useful for performing transformations on data received from the AI Agent.

Node 3 - ScrapingBee: Scrape Company's Website

This node scrapes data from the URL provided using ScrapingBee. You can use any scraper of your choice, but ScrapingBee is recommended, as it allows you to configure scraper behavior directly. Once configured, copy the provided "curl" command and import it into n8n.

Node 4 - HTML to Markdown

This node converts the scraped HTML data to Markdown, which is then sent to OpenAI. The Markdown format generally uses fewer tokens than HTML.

Improving the Workflow

It's always a pleasure to share workflows, but creators sometimes want to keep some magic to themselves . Here are some ways you can enhance this workflow:

  • Handle potential errors
  • Configure the scraper tool to scrape other pages on the website. Although this will cost more tokens, it can be useful (e.g., scraping "Pricing" or "About Us" pages in addition to the homepage).
  • Instead of Google Sheets, connect directly to your CRM to enrich company data.
  • Trigger the workflow from form submissions on your website and send the scraped data about the lead to a Slack or Teams channel.

Troubleshooting

  • "Credentials not found": open the node and select your credential again.
  • Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
  • Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
  • AI node errors: check your API key has billing enabled and the model name exists on your plan.
  • Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.

Need help?

Reply to your Morning Method order email and we'll help you get it running.


© Morning Method

$19.00Regular price $49.0061% off
AI Company Data Enrichment from Google Sheets | n8n Automation | Morning Method