AutomationFlowsAI & RAG › Analyze Browsing History and Generate Automation Suggestions with Openrouter…

Analyze Browsing History and Generate Automation Suggestions with Openrouter…

Original n8n title: Analyze Browsing History and Generate Automation Suggestions with Openrouter AI and Google Sheets

ByMsaid Mohamed el hadi @mohamedgb00714 on n8n.io

This n8n workflow analyzes your browsing history to identify opportunities for automation. It reads history from a Google Sheet, groups visits by domain, filters out irrelevant entries, and uses AI to recommend what can be automated — including how and why. 📄 Reads your browsing…

Event trigger★★★★☆ complexityAI-powered12 nodesGoogle SheetsAgentOpenRouter ChatMemory Buffer WindowGoogle Sheets ToolHTTP Request Tool
AI & RAG Trigger: Event Nodes: 12 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #6438 — we link there as the canonical source.

This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "0b829d80-6090-460d-bc0e-5d0ff925251b",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -380,
        -20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b2114f33-6fab-4e0b-9c03-63b54faf166f",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -160,
        -20
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1592379591,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V26KDJLBZno6e_VxaBqhsK_JOOOn_5N6uww2apcAeoc/edit#gid=1592379591",
          "cachedResultName": "history"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V26KDJLBZno6e_VxaBqhsK_JOOOn_5N6uww2apcAeoc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V26KDJLBZno6e_VxaBqhsK_JOOOn_5N6uww2apcAeoc/edit?usp=drivesdk",
          "cachedResultName": "Untitled spreadsheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "a81bbc84-5d25-42fa-b8d5-0ef4d97517b2",
      "name": "remove unwanted domains",
      "type": "n8n-nodes-base.filter",
      "position": [
        280,
        -20
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5d9d468c-cdc3-40c8-94ac-05260397ff1e",
              "operator": {
                "type": "string",
                "operation": "notRegex"
              },
              "leftValue": "={{ $json.group[0].domain }}",
              "rightValue": "=/(?:youtube\\.com|google\\.(com|[a-z]{2})|chatgpt\\.com|openai\\.com|chromewebstore.google.com)/i"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "323337f3-3aec-4b25-9777-e50ce77d088f",
      "name": "groupe history by domain",
      "type": "n8n-nodes-base.code",
      "position": [
        60,
        -20
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst grouped = {};\n\n// Group items by domain\nfor (const item of items) {\n  const url = item.json.url;\n  const domain = url.split(\"/\")[2]; // Extract domain\n  item.json.domain = domain;\n\n  if (!grouped[domain]) {\n    grouped[domain] = [];\n  }\n\n  grouped[domain].push(item.json); // Store just the data part\n}\n\n// Convert grouped object to n8n-friendly format\nconst result = [];\n\nfor (const group of Object.values(grouped)) {\n  result.push({\n   \n      group: group, // Now `group` is the array under an object\n    \n  });\n}\n\nreturn result;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "dfa4698f-ced5-48ff-89db-c8f15705aeda",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1000,
        0
      ],
      "parameters": {
        "text": "=Here is a grouped browsing history from one domain. Analyze whether it's automatable and why.\n\nHistory:{{ $json.prompt }}\n\n\nPlease analyze and tell me:\n- Is this automatable?\n- What should be automated?\n- What is the automation rating?\n-save result on google sheet",
        "options": {
          "systemMessage": "You are an expert automation analyst AI that uses tools to analyze web browsing history and determine if tasks can be automated.\n\nYou have access to tools such as:\n- Google Sheets (to save recommendations)\n- Web automation platforms (e.g., browser scripts, Apify, Puppeteer, n8n)\n- APIs and schedulers (to trigger tasks periodically)\n-search n8n templates\n\nYour responsibilities:\n1. Analyze the user's browsing history grouped by domain.\n2. Identify repetitive, frequent, or structured browsing behavior.\n3. Determine whether automation is possible.\n4. If yes, describe the specific action(s) to automate using available tools.\n5. Record your output in a structured format for use with Google Sheets.\n\nUse your tools wisely:\n- Save automation suggestions into a structured row (domain, automatable, what to automate, reason, automation rating).\n- Suggest appropriate tools (e.g., \"Use Apify to scrape dashboard\", \"Use n8n to schedule login\").\n\nOutput format:\n```json\n{\n  \"domain\": \"<example.com>\",\n  \"automatable\": true,\n  \"what_to_automate\": \"<Brief, tool-aware suggestion>\",\n  \"reason\": \"<Why it's suitable or not>\",\n  \"tool\": \"<Suggested tool: n8n, Apify, Google Apps Script, etc.>\",\n  \"automation_rating\": \"High\" // Or Medium, Low, Not Automatable,\nn8n_template:templates urls\n}\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "01bc75db-8254-4165-96f5-06a0c4bd682f",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        500,
        -20
      ],
      "parameters": {
        "options": {},
        "batchSize": "={{ $input.all().length }}"
      },
      "typeVersion": 3
    },
    {
      "id": "b9d674fe-6c2e-4359-a415-98233caaa342",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1000,
        340
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8833b3b4-36c6-4ab9-a72a-5955b7d4427d",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        760,
        0
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nreturn {\n  prompt:JSON.stringify($json)}"
      },
      "typeVersion": 2
    },
    {
      "id": "1ea2312d-5b13-4d7c-971c-81ac6598f1de",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1280,
        240
      ],
      "parameters": {
        "sessionKey": "={{ $('Loop Over Items').item.json.group[0].domain }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "ca69ff37-653a-4d40-b030-3439735e9289",
      "name": "Append row in sheet in Google Sheets",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        1160,
        480
      ],
      "parameters": {
        "columns": {
          "value": {
            "domain": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('domain__using_to_match_', ``, 'string') }}",
            "reason": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('reason', ``, 'string') }}",
            "automatable": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('automatable', ``, 'string') }}",
            "n8n_template": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('n8n_template', ``, 'string') }}",
            "what_to_automate": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('what_to_automate', ``, 'string') }}",
            "automation_rating": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('automation_rating', ``, 'string') }}"
          },
          "schema": [
            {
              "id": "domain",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "automatable",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "automatable",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "what_to_automate",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "what_to_automate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "automation_rating",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "automation_rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "n8n_template",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "n8n_template",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "domain"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1970061780,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V26KDJLBZno6e_VxaBqhsK_JOOOn_5N6uww2apcAeoc/edit#gid=1970061780",
          "cachedResultName": "automations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1V26KDJLBZno6e_VxaBqhsK_JOOOn_5N6uww2apcAeoc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V26KDJLBZno6e_VxaBqhsK_JOOOn_5N6uww2apcAeoc/edit?usp=drivesdk",
          "cachedResultName": "history"
        },
        "descriptionType": "manual",
        "toolDescription": "use this to save analyse result to google sheet "
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "0e2fceb0-4498-4ee3-8a72-0611d7ba5afd",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1300,
        440
      ],
      "parameters": {
        "url": "https://n8n.io/workflows/?sort=views:desc",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', ``, 'string') }}"
            }
          ]
        },
        "toolDescription": "get n8n template list from search page"
      },
      "typeVersion": 4.2
    },
    {
      "id": "93f68db2-7ba5-4ade-941d-d5309a70fb78",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        180
      ],
      "parameters": {
        "width": 740,
        "height": 2440,
        "content": "# \ud83e\udde0 Browsing History Automation Analyzer \u2013 Automation Toolkit (Google Sheets + AI)\n\nThis **n8n workflow** analyzes your browsing history to identify opportunities for automation. It reads history from a Google Sheet, groups visits by domain, filters out irrelevant entries, and uses AI to recommend what can be automated \u2014 including how and why.\n\n---\n\n## \ud83d\udccc What It Does\n\n- \ud83d\udcc4 **Reads** your browsing history from Google Sheets\n- \ud83c\udf10 **Groups** history by domain\n- \ud83d\udeab **Filters out** common non-actionable domains (e.g., YouTube, Google)\n- \ud83e\udd16 **Uses AI** to analyze whether your activity on each site is automatable\n- \ud83d\udca1 **Provides suggestions** including what to automate, how to do it, and which tools to use\n- \ud83d\udcdd **Saves results** into a new tab in the same Google Sheet\n- \ud83d\udd0d **Searches for n8n workflow templates** related to the suggested automation\n\n---\n\n## \ud83d\udcca Demo Sheet\n\nInput + output are handled via the following Google Sheet:\n\n**\ud83d\udcce Spreadsheet**:  \n[View on Google Sheets](https://docs.google.com/spreadsheets/d/1V26KDJLBZno6e_VxaBqhsK_JOOOn_5N6uww2apcAeoc/edit?usp=drivesdk)\n\n- **Sheet: `history`** \u2192 Input browsing history\n- **Sheet: `automations`** \u2192 Output AI automation suggestions\n\n---\n\n## \ud83e\udde0 AI Analysis Logic\n\nThe AI agent receives each domain's browsing history and responds with:\n- `domain`: The website domain\n- `automatable`: true/false\n- `what_to_automate`: Specific actions that can be automated\n- `reason`: Why it's suitable (or not) for automation\n- `tool`: Suggested automation tool (e.g., n8n, Apify)\n- `automation_rating`: High, Medium, Low, or Not Automatable\n- `n8n_template`: Relevant automation template (if found)\n\n---\n\n## \ud83d\udd27 Technologies Used\n\n| Tool                     | Purpose                             |\n|--------------------------|-------------------------------------|\n| **n8n**                  | Workflow automation                 |\n| **LangChain AI Agent**  | AI-based analysis                   |\n| **Google Sheets Node**   | Input/output data handling          |\n| **OpenRouter (LLM)**     | Language model for intelligent reasoning |\n| **JavaScript Code Node** | Grouping and formatting logic       |\n| **Filter Node**          | Remove unwanted domains             |\n| **HTTP Request Node**    | Search n8n.io templates             |\n\n---\n\n## \ud83d\udcbb Chrome History Export\n\nYou can use this Chrome extension to export your browsing history in a format compatible with the workflow:\n\n\ud83d\udd17 [Export Chrome History Extension](https://chromewebstore.google.com/detail/export-chrome-history/dihloblpkeiddiaojbagoecedbfpifdj?pli=1)\n\n---\n\n## \ud83d\udce7 Want Personalized Automation Advice?\n\nIf you'd like **personalized automation recommendations** based on your browsing history\u2014just like what this workflow provides\u2014feel free to contact me directly:\n\n> \ud83d\udce9 **msaidwolfltd@gmail.com**\n\nI'll help you discover what tasks you can automate to save time and boost productivity.\n\n---\n\n## \ud83d\ude80 Example Use Cases\n\n- Automate daily logins to dashboards\n- Auto-fill forms on repetitive websites\n- Schedule data exports from web portals\n- Trigger reminders based on recurring visits\n- Discover opportunities for scraping and integration\n\n---\n\n## \ud83d\udcdc License\n\nThis workflow is provided as-is for educational and personal use. For commercial or customized use, contact the author.\n\n---\n\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "groupe history by domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "remove unwanted domains": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "groupe history by domain": {
      "main": [
        [
          {
            "node": "remove unwanted domains",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet in Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow analyzes your browsing history to identify opportunities for automation. It reads history from a Google Sheet, groups visits by domain, filters out irrelevant entries, and uses AI to recommend what can be automated — including how and why. 📄 Reads your browsing…

Source: https://n8n.io/workflows/6438/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This n8n workflow creates an intelligent WhatsApp customer support bot that can handle text, image, audio, and document messages. The workflow automatically processes incoming messages through differe

HTTP Request, N8N Nodes Rapiwa, Agent Tool +9
AI & RAG

The Shopify AI Product Description Factory is a production-grade n8n workflow that converts product images and metadata into refined, SEO-aware descriptions—fully automated and region-agnostic. It ble

Memory Buffer Window, Output Parser Structured, OpenAI +7
AI & RAG

Housemate. Uses telegramTrigger, openAi, googleDrive, telegram. Event-driven trigger; 34 nodes.

Telegram Trigger, OpenAI, Google Drive +10
AI & RAG

This workflow automates the process of recording financial transactions from photos of receipts or shopping receipts. Users simply send an image of the receipt via Telegram. The image is processed usi

Telegram Trigger, HTTP Request, Chain Llm +7
AI & RAG

This automation flow is designed to proactively monitor email, calendar, and Slack communications, analyze priorities across all channels, and generate a comprehensive daily briefing with actionable t

Gmail Tool, Anthropic Chat, Memory Buffer Window +7