Browsing History Automation Analysis using AI and OpenRouter - n8n Workflow

Use this powerful n8n workflow to automatically analyze raw browsing history from Google Sheets. Leverage OpenRouter AI to generate personalized automation suggestions and find relevant n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Automation Experts: Seeking high-level recommendations for complex n8n workflow ideas.
Productivity Hackers: Users who want to discover hidden automation opportunities in their daily web habits.
Technical Analysts: Individuals needing a structured way to analyze usage patterns and suggest n8n templates.
Data-Driven Users: Those who use Google Sheets as a centralized hub for data analysis and input.

Overview

Identifying valuable tasks to automate is often the hardest part of building efficient systems. This comprehensive n8n workflow solves that challenge by turning raw, unstructured browsing data into actionable automation intelligence.

The system reads historical web visits from a Google Sheet, smartly groups the visits by domain, and employs a sophisticated AI Agent (utilizing OpenRouter) to evaluate the pattern of activity on each site. The AI is specifically instructed to act as an expert automation consultant, determining if the behavior is repetitive enough to warrant an n8n workflow or a similar automation solution. It not only suggests what to automate but also estimates the automation rating and searches for corresponding n8n templates, saving all its findings back into a structured Google Sheet. This makes the n8n workflow a powerful tool for streamlining productivity.

How it Works

The entire process is initiated by the n8n trigger, which is set as the 'When clicking ‘Execute workflow’' node.


  1. Data Ingestion: The n8n workflow begins by fetching all rows from the specified 'history' sheet in Google Sheets using the Google Sheets n8n node.

  2. Data Structuring (Code Node): A custom JavaScript n8n node runs to process the raw URLs. It extracts the domain from each URL and groups all related history entries together. This prepares the data for domain-specific analysis.

  3. Filtering: The workflow uses a Filter n8n node to remove common, non-actionable domains (like Google search, YouTube, and ChatGPT), ensuring the AI focuses only on potentially automatable sites.

  4. Loop Preparation: The 'Loop Over Items' n8n node splits the data so the AI agent receives one grouped domain history at a time.

  5. Prompt Formatting: A subsequent Code n8n node formats the grouped domain history into a clean JSON prompt specifically tailored for the AI Agent.

  6. AI Analysis (LangChain Agent): The central AI Agent n8n node receives the data. It uses the OpenRouter Chat Model as its core intelligence, along with specialized tools (like the Google Sheets Tool for saving results and the HTTP Request Tool for searching n8n templates) to perform a deep analysis.

  7. Output and Recording: Based on the analysis, the AI Agent decides if the pattern suggests a suitable n8n workflow. It then automatically utilizes the Google Sheets Tool to append a structured row containing the domain, the automation suggestion, the reason, and the automation rating to the 'automations' sheet.

Installation Guide

To set up this powerful n8n workflow, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON and paste it into your n8n canvas.

  2. Google Sheets Credentials: You must set up a Google Sheets credential. Configure the 'Get row(s) in sheet' and 'Append row in sheet in Google Sheets' n8n node using this OAuth2 credential.

  3. OpenRouter Credentials: Set up an OpenRouter API key credential for the 'OpenRouter Chat Model' n8n node, which acts as the Large Language Model brain for the AI Agent.

  4. Spreadsheet Setup: Ensure your Google Sheet is set up correctly. The workflow is configured to look for a document ID and specific sheets (e.g., 'history' for input and 'automations' for output).

  5. Execution: Once credentials are set, click the 'Execute workflow' button on the manual n8n trigger node to run the automation.

Node Details

When clicking ‘Execute workflow’ (Manual Trigger n8n trigger): This simple n8n trigger starts the workflow manually, ideal for on-demand analysis.
Get row(s) in sheet (Google Sheets n8n node): Fetches all browsing history records from the designated 'history' tab, preparing the dataset for processing.
groupe history by domain (Code n8n node): Essential custom scripting that iterates through the raw history and groups all visits under their respective top-level domains. This is crucial input for the AI Agent.
remove unwanted domains (Filter n8n node): Uses a regular expression to filter out high-traffic but generally non-automatable sites (like internal Google services), ensuring the n8n workflow analysis is focused.
AI Agent (LangChain Agent n8n node): The core decision-making unit. It integrates the input history with an expert system message and available tools. It controls the flow of analysis and output generation.
OpenRouter Chat Model (LLM n8n node): Provides the large language model capabilities required by the AI Agent to perform sophisticated reasoning about automation possibilities. This is the intelligence behind the n8n workflow.


  • Append row in sheet in Google Sheets (Google Sheets Tool n8n node): Used by the AI Agent as a tool to save its structured findings (domain, rating, suggested n8n templates, and reason) into the designated output sheet.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by
Msaid Mohamed el hadi
Msaid Mohamed el hadi

Hi! I’m Mohamed El Hadi, a passionate developer and automation expert from Algeria. I specialize in building smart, scalable workflows using n8n to streamline business operations, save time, and drive innovation. 🌍 Open to collaborations | 🤖 Automation lover | 💼 Founder of EcoPetDZ & AADL Auto Reload

Featured*