{ "name": "Outlevo: Airtable record to a do-not-contact entry", "nodes": [ { "id": "75821b0f-8f09-495d-a0ce-86525148edc1", "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- **Airtable**: connect your Airtable 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**: `compliance:write`.\n\n**Replace**: `https://airtable.com/YOURBASEID/YOURTABLEID/YOURVIEWID`.\n\n**Columns in the table** (first row): `Email`, `Domain`, `Created (a Created time field)`.\n\nThen switch the workflow to **Active**.", "height": 326, "width": 620 } }, { "id": "43fd44d3-08a4-4565-bf41-22be62372e55", "name": "New Airtable record", "type": "n8n-nodes-base.airtableTrigger", "typeVersion": 1, "position": [ 0, 0 ], "parameters": { "pollTimes": { "item": [ { "mode": "everyMinute" } ] }, "authentication": "airtableTokenApi", "baseId": { "__rl": true, "mode": "url", "value": "https://airtable.com/YOURBASEID/YOURTABLEID/YOURVIEWID" }, "tableId": { "__rl": true, "mode": "url", "value": "https://airtable.com/YOURBASEID/YOURTABLEID/YOURVIEWID" }, "triggerField": "Created", "additionalFields": {} }, "credentials": { "airtableTokenApi": { "id": "", "name": "Airtable" } } }, { "id": "d78f6c93-e1d5-4c14-b46f-6c61d137a2aa", "name": "Email or domain", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 240, 0 ], "parameters": { "mode": "runOnceForAllItems", "jsCode": "// An email address blocks that person; a domain blocks the whole company. Rows with neither are skipped.\nreturn $input.all().flatMap((item) => {\n const f = item.json.fields || {};\n const keys = Object.keys(f);\n const val = (re) => { const k = keys.find((x) => re.test(x.toLowerCase()) && String(f[x] ?? '').trim()); return k ? String(f[k]).trim().toLowerCase() : ''; };\n const email = val(/e-?mail/);\n if (/^[^@\\s]+@[^@\\s]+\\.[a-z]{2,}$/.test(email)) return [{ json: { email } }];\n const m = val(/domain|website|\\bsite\\b/).match(/^(?:[a-z]+:\\/\\/)?(?:www\\.)?([a-z0-9-]+(?:\\.[a-z0-9-]+)*\\.[a-z]{2,63})(?:[/:?#]|$)/);\n return m ? [{ json: { domain: m[1] } }] : [];\n});\n" } }, { "id": "a12d7df7-17d3-4fba-8c82-b62544171cd1", "name": "Block in Outlevo", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 480, 0 ], "parameters": { "method": "POST", "url": "=https://api.outlevo.com/v1/suppressions", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Idempotency-Key", "value": "={{ ('airtable-block-' + ($json.email || $json.domain)).slice(0, 200) }}" } ] }, "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify($json.email ? { email: $json.email } : { domain: $json.domain }) }}", "options": {} }, "credentials": { "httpHeaderAuth": { "id": "", "name": "Outlevo API key (Authorization: Bearer olv_live_…)" } } } ], "connections": { "New Airtable record": { "main": [ [ { "node": "Email or domain", "type": "main", "index": 0 } ] ] }, "Email or domain": { "main": [ [ { "node": "Block in Outlevo", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "pinData": {}, "meta": { "templateCredsSetupCompleted": false } }