{ "name": "Outlevo: Today's LinkedIn tasks to Microsoft Teams", "nodes": [ { "id": "023a54ae-6afe-422b-9203-cfd712cc9e16", "name": "How to set it up", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -40, -364 ], "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- **Microsoft Teams**: connect your Microsoft Teams account.\n\n**API key scopes**: `campaigns:read`.\n\n**Pick in the node**:\n- **Post to Teams**: the team and the channel\n\nThen switch the workflow to **Active**.", "height": 304, "width": 620 } }, { "id": "171536eb-ade6-4afd-b368-075d2e711c48", "name": "Every morning", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ 0, 0 ], "parameters": { "rule": { "interval": [ { "field": "days", "daysInterval": 1, "triggerAtHour": 8 } ] } } }, { "id": "9bba2599-b1b4-48bc-9d0f-1ecd72a9f81c", "name": "Today's tasks", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 240, 0 ], "parameters": { "method": "GET", "url": "=https://api.outlevo.com/v1/linkedin/tasks", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "view", "value": "today" }, { "name": "sender", "value": "all" }, { "name": "limit", "value": "200" } ] }, "options": {} }, "credentials": { "httpHeaderAuth": { "id": "", "name": "Outlevo API key (Authorization: Bearer olv_live_…)" } } }, { "id": "a1ec90ef-39a4-4758-a57b-2a7a795ef525", "name": "Write the digest", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 480, 0 ], "parameters": { "mode": "runOnceForAllItems", "jsCode": "const s = (v) => (v == null ? '' : typeof v === 'string' ? v : typeof v === 'object' ? JSON.stringify(v) : String(v));\nconst person = (c) => [c.first_name, c.last_name].filter(Boolean).join(' ');\nconst when = (d) => (d ? new Date(d).toUTCString().replace(/:\\d\\d GMT$/, ' UTC') : '');\nconst list = $input.first().json.data || [];\nif (!list.length) return [];\nconst lines = list.slice(0, 25).map((t) => {\n const p = t.person || {};\n return `• ${t.step === 'connect' ? 'Connect with' : 'Message'} ${person(p) || 'someone'}${p.title ? ` (${p.title})` : ''}${p.company ? ` at ${p.company}` : ''}${t.campaign && t.campaign.name ? ` · ${t.campaign.name}` : ''}`;\n});\nconst more = list.length > 25 ? `\\n…and ${list.length - 25} more` : '';\nreturn [{ json: { text: `🔗 ${list.length} LinkedIn task(s) for today:\\n${lines.join('\\n')}${more}\\nhttps://app.outlevo.com/linkedin`, subject: `${list.length} LinkedIn task(s) today` } }];\n" } }, { "id": "9a33e332-1fa6-4bd0-b815-1095b6f9acfc", "name": "Post to Teams", "type": "n8n-nodes-base.microsoftTeams", "typeVersion": 2, "position": [ 720, 0 ], "parameters": { "resource": "channelMessage", "operation": "create", "teamId": { "__rl": true, "mode": "list", "value": "" }, "channelId": { "__rl": true, "mode": "list", "value": "" }, "contentType": "html", "message": "={{ $json.text.split('&').join('&').split('<').join('<').split('>').join('>').split('\\n').join('
') }}", "options": { "includeLinkToWorkflow": false } }, "credentials": { "microsoftTeamsOAuth2Api": { "id": "", "name": "Microsoft Teams" } } } ], "connections": { "Every morning": { "main": [ [ { "node": "Today's tasks", "type": "main", "index": 0 } ] ] }, "Today's tasks": { "main": [ [ { "node": "Write the digest", "type": "main", "index": 0 } ] ] }, "Write the digest": { "main": [ [ { "node": "Post to Teams", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "pinData": {}, "meta": { "templateCredsSetupCompleted": false } }