Web pages to Google Sheets, competitor data captured
Competitor tracking sounds simple until you’re copying numbers from five tabs into a sheet and realizing one “Followers” value came from the wrong page. Again. That’s how messy “manual research” turns into decisions built on bad data.
Marketing managers feel this when weekly reporting comes around. Agency owners get it when clients ask, “Can we track this for 10 brands?” And solo operators just want competitor data automation that doesn’t steal their afternoons.
This workflow uses Selenium plus AI to pull the exact numbers you care about from almost any webpage and send them into Google Sheets (or Excel). You’ll see how it works, what you need, and where people usually get stuck.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Web pages to Google Sheets, competitor data captured
flowchart LR
subgraph sg0["Information Extracto Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/html.dark.svg' width='40' height='40' /></div><br/>Extract First Url Match"]
n1@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Clean Webdriver "]
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session"]
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session2"]
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If Block1", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session3"]
n7@{ icon: "mdi:cog", form: "rounded", label: "Limit", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session1"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session4"]
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Success with cookie"]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Respond to Webhook2"]
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code"]
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session5"]
n14["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Error"]
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Error1"]
n16["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Error2"]
n17@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Inject Cookie"]
n19["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Respond to Webhook3"]
n20["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Success"]
n21["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Go on url"]
n22["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session6"]
n23["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Error3"]
n24@{ icon: "mdi:robot", form: "rounded", label: "Information Extractor", pos: "b", h: 48 }
n25@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check if empty of NA", pos: "b", h: 48 }
n26@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If Block", pos: "b", h: 48 }
n27["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Google search Query "]
n28["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Selenium Session"]
n29["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get ScreenShot 1"]
n30["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Refresh browser"]
n31["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get ScreenShot "]
n32@{ icon: "mdi:cog", form: "rounded", label: "Convert to File", pos: "b", h: 48 }
n33@{ icon: "mdi:cog", form: "rounded", label: "Convert to File1", pos: "b", h: 48 }
n34["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session7"]
n35@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields (For testing pru..", pos: "b", h: 48 }
n40["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Error can't find url"]
n41["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Resize browser window"]
n42@{ icon: "mdi:robot", form: "rounded", label: "OpenAI", pos: "b", h: 48 }
n43@{ icon: "mdi:robot", form: "rounded", label: "OpenAI1", pos: "b", h: 48 }
n44@{ icon: "mdi:robot", form: "rounded", label: "Information Extractor1", pos: "b", h: 48 }
n45@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model1", pos: "b", h: 48 }
n46@{ icon: "mdi:robot", form: "rounded", label: "Information Extractor2", pos: "b", h: 48 }
n47@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model2", pos: "b", h: 48 }
n48["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Webhook"]
n49@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If Target Url", pos: "b", h: 48 }
n50@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If1", pos: "b", h: 48 }
n51["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Go on url1"]
n52@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If2", pos: "b", h: 48 }
n53["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Go on url2"]
n54@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If3", pos: "b", h: 48 }
n55["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Go on url3"]
n17 --> n54
n17 --> n13
n50 --> n21
n50 --> n51
n52 --> n17
n52 --> n50
n54 --> n53
n54 --> n55
n12 --> n18
n7 --> n30
n42 --> n5
n43 --> n26
n43 --> n22
n48 --> n35
n26 --> n8
n26 --> n3
n21 --> n29
n21 --> n22
n5 --> n4
n5 --> n6
n51 --> n29
n51 --> n22
n53 --> n12
n53 --> n9
n55 --> n12
n55 --> n9
n49 --> n27
n49 --> n28
n18 --> n7
n3 --> n44
n32 --> n42
n32 --> n9
n8 --> n19
n4 --> n11
n6 --> n46
n9 --> n15
n13 --> n14
n22 --> n23
n34 --> n16
n31 --> n32
n31 --> n9
n30 --> n31
n30 --> n9
n2 --> n52
n33 --> n43
n33 --> n22
n29 --> n33
n29 --> n22
n1 -.-> n24
n45 -.-> n44
n47 -.-> n46
n25 --> n40
n25 --> n28
n27 --> n0
n24 --> n25
n41 --> n2
n44 --> n20
n46 --> n10
n28 --> n41
n28 --> n34
n0 --> n24
n35 --> n49
end
subgraph sg1["Flow 2"]
direction LR
n36["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get ScreenShot 2"]
n37@{ icon: "mdi:cog", form: "rounded", label: "Convert to File2", pos: "b", h: 48 }
n38["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Go on ip-api.com"]
n39["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Session8"]
n36 --> n37
n36 --> n39
n38 --> n36
n38 --> n39
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n24,n42,n43,n44,n46 ai
class n1,n45,n47 aiModel
class n5,n17,n25,n26,n49,n50,n52,n54 decision
class n2,n3,n4,n6,n8,n9,n10,n11,n13,n14,n15,n16,n18,n19,n20,n21,n22,n23,n27,n28,n29,n30,n31,n34,n40,n41,n48,n51,n53,n55,n36,n38,n39 api
class n12 code
classDef customIcon fill:none,stroke:none
class n0,n2,n3,n4,n6,n8,n9,n10,n11,n12,n13,n14,n15,n16,n18,n19,n20,n21,n22,n23,n27,n28,n29,n30,n31,n34,n40,n41,n48,n51,n53,n55,n36,n38,n39 customIcon
Why This Matters: Clean competitor numbers without busywork
If you track competitors, you already know the pain: the numbers you need are buried in different layouts, loaded by scripts, and sometimes behind a login. So you open a site, scroll, copy a value, paste it into a sheet, then repeat for the next brand. After a few rounds, your “quick check” becomes a recurring task that quietly eats a couple hours a week. Worse, it’s easy to paste the right number into the wrong row, or pull yesterday’s value from a cached page and not notice until someone asks why the chart looks weird.
It adds up fast. Here’s where it usually breaks down.
- You end up re-checking the same pages because you don’t fully trust what you pasted last time.
- Modern sites render key stats dynamically, so simple “scrapers” miss the value or grab the wrong element.
- Login-required pages force awkward workarounds, which usually means someone does it manually anyway.
- When the page layout changes, your tracking process silently fails and nobody notices for days.
What You’ll Build: A webpage-to-sheet competitor tracker that adapts
This template is built for real-world webpages, not perfect static HTML. You send a request (usually via a webhook) with a target URL and a list of the fields you want, like “Followers” or “Total Stars.” The workflow then spins up a Selenium browser session, navigates to the page, and captures screenshots so the AI can “see” what’s on the screen. OpenAI handles the interpretation and extraction, turning what it finds into structured results you can store and trend over time. If you need authenticated access, you can pass session cookies so the workflow can load logged-in pages too. Finally, the workflow returns a clean response and can log the results into Google Sheets or Excel for reporting.
The flow starts with your input (URL + the data points you care about). Selenium loads the page and produces visual evidence (screenshots), which means dynamic pages are fair game. Then AI extracts the requested values and pushes them into a spreadsheet-ready structure.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you track 8 competitors and you collect 5 numbers from each site every Monday. Manually, it’s easy to spend about 10 minutes per competitor between loading pages, finding the right section, and pasting values, so you lose roughly 80 minutes weekly. With this workflow, you submit one request per competitor (or batch them) and wait for the run to finish, which is usually more like 10 minutes of active time total. The time isn’t the only win. You stop second-guessing the sheet.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Selenium setup to load and screenshot web pages.
- OpenAI API to interpret screenshots and extract fields.
- Google Sheets to store competitor metrics over time.
- OpenAI API key (get it from your OpenAI dashboard).
Skill level: Intermediate. You won’t write much code, but you will connect accounts and follow a setup guide for the Selenium side.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A webhook receives your tracking request. You send the target URL (or a subject the workflow can search for) plus a list of “Target data” fields you want pulled from the page.
The workflow chooses the best URL to visit. If you provided a direct URL, it uses that. If not, it can run a search query, pull a likely match, and validate it before moving forward.
Selenium loads the page like a real browser. The automation starts a session, resizes the window, refreshes when needed, and captures multiple screenshots to increase the chance of catching the right element on the page.
AI extracts the exact fields you requested. The screenshots are sent through OpenAI-powered vision and extraction steps, then normalized into a clean response you can store in Google Sheets or Excel.
You can easily modify the target fields to track different KPIs based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Webhook Trigger
Start by setting up the webhook that initiates the scraping request and captures input fields.
- Add or open Incoming Webhook Trigger and set HTTP Method to
POST. - Set Path to
67d77918-2d5b-48c1-ae73-2004b32125f0and Response Mode toresponseNode. - Open Map Input Fields and map Subject to
{{ $json.body.subject }}and Website Domaine to{{ $json.body.Url }}.
Step 2: Connect the URL Discovery Path
This workflow searches for a URL when the target URL is missing, then validates it before scraping.
- In Check Target URL Empty, keep the empty check on
{{ $('Incoming Webhook Trigger').item.json.body['Target Url'] }}. - Configure Search Engine Query with URL set to
https://www.google.com/search?q=site:{{ $json['Website Domaine'] }}+{{$json.Subject}}&oq=site&gs_lcrp=EgZjaHJvbWUqCAgAEEUYJxg7MggIABBFGCcYOzIICAEQRRgnGDsyBggCEEUYOzIRCAMQRRg5GEMYyQMYgAQYigUyBggEEEUYQDIGCAUQRRg9MgYIBhBFGD0yBggHEEUYPdIBCDEwNTRqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8. - In Pull First URL Match, keep the HTML extraction selector set to
=a[href*="https://"][href*="{{ $('Map Input Fields').item.json['Website Domaine'] }}"]. - Set Extract URL Candidate Text to
{{ $json['Url Find '][1] }}{{ $json['Url Find '][2] }}{{ $json['Url Find '][3] }}and keep the system prompt as configured. - In Validate URL Output, keep the conditions that treat empty or
NAas invalid and route to Return URL Not Found.
Step 3: Configure Selenium Session Startup
These nodes launch Selenium, size the browser, and apply stealth settings before navigation.
- Set Start Selenium Session URL to
http://selenium_chrome:4444/wd/hub/sessionand keep the JSON body with the Chrome options provided. - Configure Resize Browser Window with URL
http://selenium_chrome:4444/wd/hub/session/{{ $json.value.sessionId }}/window/rectand JSON body{"width":1920,"height":1080,"x":0,"y":0}. - In Stealth Driver Cleanup, keep URL set to
http://selenium_chrome:4444/wd/hub/session/{{ $('Start Selenium Session').item.json.value.sessionId }}/execute/syncand preserve the stealth JavaScript in JSON Body.
Step 4: Configure Cookie Validation and Injection
This section verifies cookie presence, checks domain matching, and inserts cookies into Selenium.
- In Check Cookies Present, keep the not-empty check on
{{ $('Incoming Webhook Trigger').item.json.body.cookies }}. - In Domain Match Check, keep the contains condition between
{{ $('Incoming Webhook Trigger').item.json.body.cookies[0].cookie.domain }}and{{ $('Incoming Webhook Trigger').item.json.body.Url }}. - Keep the JavaScript in Custom Cookie Parser unchanged so it normalizes
sameSitevalues. - Set Insert Session Cookie URL to
http://selenium_chrome:4444/wd/hub/session/{{ $('Start Selenium Session').item.json.value.sessionId }}/cookieand keep the JSON body that maps cookie fields from{{ $json.* }}.
Step 5: Configure Navigation and Screenshot Capture
The workflow chooses a URL path and captures screenshots for AI analysis.
- In Choose URL Source, keep the not-empty condition on
{{ $('Incoming Webhook Trigger').item.json.body['Target Url'] }}to decide between direct or extracted URL navigation. - Set Navigate Direct URL and Navigate Target URL JSON Body to
{"url":"{{ $('Incoming Webhook Trigger').item.json.body['Target Url'] }}"}. - Set Navigate Extracted URL and Navigate Found URL JSON Body to
{"url":"{{ $('Extract URL Candidate').item.json.output.Good_url_for_etract_information }}"}. - Confirm Capture Screenshot A, Capture Screenshot B, and Capture Screenshot C use
http://selenium_chrome:4444/wd/hub/session/{{ $('Start Selenium Session').item.json.value.sessionId }}/screenshot. - Keep Convert Image File A, Convert Image File B, and Convert Image File C set to Operation
toBinaryand Source Propertyvalue.
Step 6: Set Up AI Analysis and URL Extraction
OpenAI models analyze screenshots and extract structured data or detect blocks.
- Open Vision Analysis A and Vision Analysis B, and keep the analysis prompt with
{{ $('Incoming Webhook Trigger').item.json.body.subject }}in the text. - Credential Required: Connect your openAiApi credentials in Vision Analysis A and Vision Analysis B.
- Open Extract Info Set A and Extract Info Set B and keep Text set to
{{ $('Vision Analysis A').item.json.content }}and{{ $('Vision Analysis B').item.json.content }}. - AI Chat Model Mini A is connected as the language model for Extract Info Set A — ensure credentials are added to AI Chat Model Mini A.
- AI Chat Model Mini B is connected as the language model for Extract Info Set B — ensure credentials are added to AI Chat Model Mini B.
- AI Chat Model Core is connected as the language model for Extract URL Candidate — ensure credentials are added to AI Chat Model Core with model
gpt-4o.
Step 7: Configure Block Detection and Branching
The workflow detects blocked pages and routes to the appropriate response nodes.
- In Block Check Branch, keep the condition
{{ $json.content }}equalsBLOCK. - In Block Content Check, keep the contains condition for
BLOCKin{{ $json.content }}. - Confirm the branch output links to Terminate Session B → Return Block Notice and Terminate Session D → Return Block Notice 2.
Step 8: Configure Output Responses
Set the workflow’s responses for successful and unsuccessful runs.
- In Return Success Output, keep Response Key set to
{{ $json.output }}and Response Code to200. - In Respond Success Cookie, keep the default Response Code
200for cookie-based success. - Confirm fallback responses are configured: Return URL Not Found, Return Cookie Error, Return Page Crash, Return Session Error, and Return Server Error.
Step 9: Add Error Handling
Although there is no dedicated error handler node, the workflow uses terminate-and-respond patterns to handle failures.
- Review all termination nodes (e.g., Terminate Session A through Terminate Session I) to ensure they target
http://selenium_chrome:4444/wd/hub/session/{{ $('Start Selenium Session').item.json.value.sessionId }}. - Verify that each termination node routes to a corresponding response node (e.g., Return Server Error, Return Page Crash).
- Group review: The workflow contains many httpRequest and respondToWebhook nodes; ensure all are correctly connected to terminate-and-respond branches.
sessionId, the terminate nodes will fail too. Validate Start Selenium Session is returning {{ $json.value.sessionId }}.Step 10: Test & Activate Your Workflow
Run a full test to confirm navigation, AI analysis, and response paths before enabling production usage.
- Use Incoming Webhook Trigger’s test URL and send a POST body containing
subject,Url, optionalTarget Url, andcookies. - Manually execute the workflow and verify that a successful run returns data via Return Success Output or Respond Success Cookie.
- Check that blocked or invalid paths return Return Block Notice, Return URL Not Found, or other error responses as expected.
- When results look correct, switch the workflow to Active to enable production use.
Troubleshooting Tips
- OpenAI credentials can expire or be restricted by billing. If things break, check your OpenAI API key status and usage limits first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
Plan on about an hour if Selenium is new to you.
No. You’ll mostly connect accounts and follow the Selenium setup instructions. The workflow already contains the logic for URL checks, screenshots, and extraction.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually a few cents per run depending on screenshot size and prompt length.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. The easiest change is editing the incoming request fields (the “Target data” list) so the extractor looks for different metrics, like “Price,” “Plan name,” or “Employee count.” If a site blocks bots, you can adjust the block-check logic and add cookies via the cookie parsing step so Selenium loads an authenticated page. You can also swap the destination from Google Sheets to Excel 365 if that’s where your reporting lives. And if you want to track multiple pages per brand, you can run the webhook request in a loop and merge the results before writing a single row.
Usually the Selenium service isn’t running, isn’t reachable from n8n, or the session terminates early. Confirm your Selenium endpoint and make sure the workflow can create a session, then check the “block notice” responses because some sites detect automation and serve a dead page.
If you self-host, there’s no execution limit, but Selenium sessions are the bottleneck, so think in terms of “a few pages at a time” rather than hundreds at once.
For this workflow, yes, most of the time. Zapier and Make are great for SaaS-to-SaaS automations, but browser-based scraping with branching logic, error handling, and session cleanup is where they start feeling cramped (and expensive). n8n lets you control the full flow: URL selection, cookie handling, block detection, multi-shot screenshots, and structured extraction. You can also self-host, which matters if you’re running lots of checks. If you only need something like “copy a value from an API into a sheet,” Zapier or Make might be quicker. Talk to an automation expert if you want a recommendation for your exact use case.
Once this is running, competitor checks stop being a weekly scramble. The workflow pulls the numbers, your sheet stays clean, and you can finally focus on what the data means.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.