{ "name": "Outlevo: New qualified companies to Airtable, daily", "nodes": [ { "id": "eb6bdf50-b094-4716-a007-8396215e33db", "name": "How to set it up", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -40, -408 ], "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- **Airtable**: connect your Airtable account.\n\n**API key scopes**: `companies:read`.\n\n**Pick in the node**:\n- **Add to Airtable**: the base and the table\n\n**Columns in the table** (first row): `Company`, `Domain`, `Country`, `Account`.\n\nThen switch the workflow to **Active**.", "height": 348, "width": 620 } }, { "id": "e0747a4f-29b9-4de9-89c4-9ae1b46afee4", "name": "Every morning", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ 0, 0 ], "parameters": { "rule": { "interval": [ { "field": "days", "daysInterval": 1, "triggerAtHour": 7 } ] } } }, { "id": "7d5d47de-80d7-436d-b0d7-c0f04b19956a", "name": "Qualified since yesterday", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 240, 0 ], "parameters": { "method": "GET", "url": "=https://api.outlevo.com/v1/companies", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "status", "value": "qualified" }, { "name": "updated_since", "value": "={{ $now.minus({ days: 1 }).toUTC().toISO() }}" }, { "name": "limit", "value": "1000" } ] }, "options": {} }, "credentials": { "httpHeaderAuth": { "id": "", "name": "Outlevo API key (Authorization: Bearer olv_live_…)" } } }, { "id": "605ba160-1747-41f7-970b-0f76ab87fbc8", "name": "Only new ones", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 480, 0 ], "parameters": { "mode": "runOnceForAllItems", "jsCode": "// Companies seen in earlier runs are skipped (remembered for 90 days in this workflow's static data).\nconst seen = $getWorkflowStaticData('global');\nseen.ids = seen.ids || {};\nconst now = Date.now();\nfor (const [id, at] of Object.entries(seen.ids)) if (now - at > 90 * 864e5) delete seen.ids[id];\nconst fresh = ($input.first().json.data || []).filter((co) => !seen.ids[co.id]);\nfor (const co of fresh) seen.ids[co.id] = now;\nreturn fresh.map((co) => ({ json: { id: co.id, name: co.name || co.domain, domain: co.domain, website: co.website_url || `https://${co.domain}`, country: co.country || '', note: `Qualified by Outlevo.\\nhttps://app.outlevo.com/accounts/${co.id}` } }));\n" } }, { "id": "6d16c72a-1bd6-4608-8c9b-f471025634e3", "name": "Write the row", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 720, 0 ], "parameters": { "mode": "runOnceForEachItem", "jsCode": "return { json: { Company: $json.name, Domain: $json.domain, Country: $json.country, Account: `https://app.outlevo.com/accounts/${$json.id}` } };\n" } }, { "id": "e13151b8-bcc0-4a21-9422-f92db6acdfb2", "name": "Add to Airtable", "type": "n8n-nodes-base.airtable", "typeVersion": 2.1, "position": [ 960, 0 ], "parameters": { "authentication": "airtableTokenApi", "operation": "create", "base": { "__rl": true, "mode": "list", "value": "" }, "table": { "__rl": true, "mode": "list", "value": "" }, "columns": { "mappingMode": "autoMapInputData", "value": {}, "matchingColumns": [], "schema": [] }, "options": { "typecast": true } }, "credentials": { "airtableTokenApi": { "id": "", "name": "Airtable" } } } ], "connections": { "Every morning": { "main": [ [ { "node": "Qualified since yesterday", "type": "main", "index": 0 } ] ] }, "Qualified since yesterday": { "main": [ [ { "node": "Only new ones", "type": "main", "index": 0 } ] ] }, "Only new ones": { "main": [ [ { "node": "Write the row", "type": "main", "index": 0 } ] ] }, "Write the row": { "main": [ [ { "node": "Add to Airtable", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "pinData": {}, "meta": { "templateCredsSetupCompleted": false } }