{ "name": "Outlevo: ICP visitors to Google Sheets, daily", "nodes": [ { "id": "c01338e7-6cdb-44b6-b5c0-1e2458e47567", "name": "How to set it up", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -40, -386 ], "parameters": { "content": "## How to set it up\n\n**Credentials** (n8n asks for each on first open):\n- **Outlevo API key**: a Header Auth credential, name `Authorization`, value `Bearer olv_live_…` (Settings → API keys in Outlevo).\n- **Google Sheets**: connect your Google Sheets account.\n\n**API key scopes**: `visitors:read`.\n\n**Replace**: `YOUR_SHEET_ID`.\n\n**Columns in the \"Visitors\" sheet** (first row): `Day`, `Company`, `Domain`, `Country`, `Visits`, `Pages`, `Pricing`, `Top page`, `Account`.\n\nThen switch the workflow to **Active**.", "height": 326, "width": 620 } }, { "id": "d6240df3-c37f-43bb-86e8-8bbe33b5b49b", "name": "Every morning", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ 0, 0 ], "parameters": { "rule": { "interval": [ { "field": "days", "daysInterval": 1, "triggerAtHour": 8 } ] } } }, { "id": "213b4a9e-9a8d-4b4e-9f58-57612dee82b2", "name": "ICP visitors", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 240, 0 ], "parameters": { "method": "GET", "url": "=https://api.outlevo.com/v1/visitors", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "days", "value": "1" }, { "name": "in_icp", "value": "true" } ] }, "options": {} }, "credentials": { "httpHeaderAuth": { "id": "", "name": "Outlevo API key (Authorization: Bearer olv_live_…)" } } }, { "id": "95331d39-28c9-4c4a-82d4-a2d62c38d6de", "name": "Write the rows", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 480, 0 ], "parameters": { "mode": "runOnceForAllItems", "jsCode": "const day = new Date(Date.now() - 864e5).toISOString().slice(0, 10);\nreturn ($input.first().json.data || []).map((v) => ({ json: { Day: day, Company: v.name || v.domain, Domain: v.domain, Country: v.country || '', Visits: v.visits, Pages: v.page_views, Pricing: v.pricing ? 'yes' : 'no', 'Top page': ((v.top_pages || [])[0] || {}).path || '', Account: v.account ? `https://app.outlevo.com/accounts/${v.account.company_id}` : '' } }));\n" } }, { "id": "b14bb676-5184-4f8a-be4d-410503872bf2", "name": "Add to the sheet", "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.5, "position": [ 720, 0 ], "parameters": { "operation": "append", "documentId": { "__rl": true, "mode": "url", "value": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit" }, "sheetName": { "__rl": true, "mode": "name", "value": "Visitors" }, "columns": { "mappingMode": "autoMapInputData", "value": {}, "matchingColumns": [], "schema": [] }, "options": {} }, "credentials": { "googleSheetsOAuth2Api": { "id": "", "name": "Google Sheets" } } } ], "connections": { "Every morning": { "main": [ [ { "node": "ICP visitors", "type": "main", "index": 0 } ] ] }, "ICP visitors": { "main": [ [ { "node": "Write the rows", "type": "main", "index": 0 } ] ] }, "Write the rows": { "main": [ [ { "node": "Add to the sheet", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "pinData": {}, "meta": { "templateCredsSetupCompleted": false } }