{ "name": "Outlevo: Sheet row to an account signal", "nodes": [ { "id": "112cca6e-0d23-46c5-b4ac-c8f982fa491f", "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- **Google Sheets**: connect your Google Sheets account.\n- **Outlevo API key**: a Header Auth credential, name `Authorization`, value `Bearer olv_live_…` (Settings → API keys in Outlevo).\n\n**API key scopes**: `signals:write`.\n\n**Replace**: `YOUR_SHEET_ID`.\n\n**Columns in the sheet** (first row): `Domain`, `Title`, `Link`, `Quote`, `Date`.\n\nThen switch the workflow to **Active**.", "height": 326, "width": 620 } }, { "id": "81275c11-961f-4743-90f7-0a56669c24d8", "name": "New row in the sheet", "type": "n8n-nodes-base.googleSheetsTrigger", "typeVersion": 1, "position": [ 0, 0 ], "parameters": { "pollTimes": { "item": [ { "mode": "everyMinute" } ] }, "documentId": { "__rl": true, "mode": "url", "value": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit" }, "sheetName": { "__rl": true, "mode": "name", "value": "Signals" }, "event": "rowAdded", "options": {} }, "credentials": { "googleSheetsTriggerOAuth2Api": { "id": "", "name": "Google Sheets" } } }, { "id": "15be39fe-8986-4b66-9c11-dc18170741c2", "name": "The signal", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 240, 0 ], "parameters": { "mode": "runOnceForAllItems", "jsCode": "// Rows need a domain that is already one of your accounts, a title of 3 to 160 characters and a link.\nreturn $input.all().flatMap((item) => {\n const r = item.json;\n const domain = String(r.Domain || '').trim().toLowerCase().replace(/^(?:[a-z]+:\\/\\/)?(?:www\\.)?/, '').split('/')[0];\n const title = String(r.Title || '').trim().slice(0, 160);\n const link = String(r.Link || '').trim();\n if (!domain || title.length < 3 || !/^https?:\\/\\//.test(link)) return [];\n const date = /^\\d{4}-\\d{2}-\\d{2}/.test(String(r.Date || '')) ? String(r.Date).slice(0, 10) : undefined;\n return [{ json: { domain, title, source_url: link, quote: String(r.Quote || title).slice(0, 300), ...(date ? { date } : {}), row_number: r.row_number } }];\n});\n" } }, { "id": "b827a969-e6a1-47b9-9ebb-cdfc73f7fdbe", "name": "Send the signal", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 480, 0 ], "parameters": { "method": "POST", "url": "=https://api.outlevo.com/v1/signals", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Idempotency-Key", "value": "={{ ('sheet-signal-' + $json.row_number + '-' + $json.source_url).slice(0, 200) }}" } ] }, "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({ domain: $json.domain, title: $json.title, quote: $json.quote, source_url: $json.source_url, ...($json.date ? { date: $json.date } : {}) }) }}", "options": {} }, "credentials": { "httpHeaderAuth": { "id": "", "name": "Outlevo API key (Authorization: Bearer olv_live_…)" } } } ], "connections": { "New row in the sheet": { "main": [ [ { "node": "The signal", "type": "main", "index": 0 } ] ] }, "The signal": { "main": [ [ { "node": "Send the signal", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "pinData": {}, "meta": { "templateCredsSetupCompleted": false } }