This workflow follows the Airtable → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Comment Capture Engine",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "minutes"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
-1344,
272
],
"id": "4f8d2b15-e5bd-477a-ad95-f5f1aad0d48e",
"name": "Every 05 Minutes"
},
{
"parameters": {
"operation": "search",
"base": {
"__rl": true,
"value": "appRd5RRS1FMQZoDx",
"mode": "list",
"cachedResultName": "Linkedin (Speed To Lead)",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx"
},
"table": {
"__rl": true,
"value": "tblINqMkvvkOeffuq",
"mode": "list",
"cachedResultName": "Posts Config",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx/tblINqMkvvkOeffuq"
},
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
-1120,
272
],
"id": "7e760101-f493-4d5b-9538-e2e660f07f52",
"name": "Fetch Active Posts",
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"jsCode": "// Native Airtable returns flat fields (post_id, status...). Restructure to old HTTP format.\nconst items = $input.all();\nreturn items.map(item => {\n const json = item.json || {};\n return {\n json: {\n id: json.id || json.recId || '',\n fields: {\n post_id: json.post_id || '',\n status: json.status || '',\n trigger_word: json.trigger_word || '',\n lead_magnet_link: json.lead_magnet_link || '',\n dm_message: json.dm_message || '',\n comment_reply: json.comment_reply || '',\n last_fetched_at: json.last_fetched_at || '',\n followup_message: json.followup_message || ''\n }\n }\n };\n});"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-896,
272
],
"id": "d7206db3-0c8a-4115-ad78-4e6f25891511",
"name": "Restructure Posts",
"onError": "continueRegularOutput"
},
{
"parameters": {
"jsCode": "// GAP 4 FIX: API Velocity Guard \u2014 skip posts fetched within last 8 minutes\n// FAIL CLOSED: if guard errors, return empty to protect quota\ntry {\n const inputs = $input.all();\n if (!inputs || inputs.length === 0) return [];\n const post = inputs[0].json;\n const fields = post.fields || {};\n const postConfigRecordId = post.id || '';\n const lastFetchedAt = fields.last_fetched_at;\n if (lastFetchedAt) {\n const eightMinAgo = new Date(Date.now() - 8 * 60 * 1000);\n if (new Date(lastFetchedAt) > eightMinAgo) return [];\n }\n return [{ json: { ...post, _post_config_record_id: postConfigRecordId } }];\n} catch (error) {\n return []; // Fail closed \u2014 protect LinkedIn API quota\n}"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-672,
272
],
"id": "4f444de1-449b-492a-a8a0-efcb9c8af0a7",
"name": "API Velocity Guard",
"onError": "continueRegularOutput"
},
{
"parameters": {
"url": "=https://api46.unipile.com:17646/api/v1/posts/urn%3Ali%3Aactivity%3A{{ $json.fields.post_id }}/comments",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "account_id",
"value": "=MfU7dR41QrOV6Wq3vJyRGQ"
},
{
"name": "limit",
"value": "100"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": []
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-448,
368
],
"id": "0796a4aa-817f-43f5-9d98-452f9c1e829b",
"name": "Get Post Comments",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"jsCode": "// Merge Unipile comments response with original post config so data flows downstream\nconst responses = $input.all();\nconst originals = $('API Velocity Guard').all();\nif (!responses || !originals || responses.length !== originals.length) {\n return [{ json: { _error: true, _error_node: 'Merge Comments Data', _error_message: 'Mismatch between responses and originals', _error_timestamp: new Date().toISOString() } }];\n}\nreturn responses.map((resp, i) => ({\n json: {\n ...originals[i].json,\n _comments: resp.json.items || [],\n _comments_response: resp.json\n },\n pairedItem: { item: i }\n}));"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-224,
368
],
"id": "2d007540-0ee0-4e9d-a8b8-fd7f3d9d9e0b",
"name": "Merge Comments Data",
"onError": "continueRegularOutput"
},
{
"parameters": {
"operation": "update",
"base": {
"__rl": true,
"value": "appRd5RRS1FMQZoDx",
"mode": "list",
"cachedResultName": "Linkedin (Speed To Lead)",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx"
},
"table": {
"__rl": true,
"value": "tblINqMkvvkOeffuq",
"mode": "list",
"cachedResultName": "Posts Config",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx/tblINqMkvvkOeffuq"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"last_fetched_at": "={{ new Date().toISOString() }}",
"id": "={{ $json._post_config_record_id }}"
},
"matchingColumns": [
"id"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": false,
"defaultMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "post_id",
"displayName": "post_id",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
},
{
"id": "trigger_word",
"displayName": "trigger_word",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
},
{
"id": "lead_magnet_link",
"displayName": "lead_magnet_link",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
},
{
"id": "dm_message",
"displayName": "dm_message",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
},
{
"id": "comment_reply",
"displayName": "comment_reply",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
},
{
"id": "status",
"displayName": "status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "active",
"value": "active"
},
{
"name": "inactive",
"value": "inactive"
}
],
"readOnly": false,
"removed": true
},
{
"id": "followup_message",
"displayName": "followup_message",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
},
{
"id": "last_fetched_at",
"displayName": "last_fetched_at",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
0,
464
],
"id": "960db8c1-06b0-4884-a88a-765060296542",
"name": "Update last_fetched_at",
"retryOnFail": true,
"waitBetweenTries": 3000,
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"jsCode": "// Splits comments into individual items, each carrying full post config\ntry {\n const inputs = $input.all();\n if (!inputs || inputs.length === 0) return [];\n const post = inputs[0].json;\n const comments = post._comments || [];\n const postFields = post.fields || {};\n const postConfigRecordId = post._post_config_record_id || '';\n const rawTriggers = postFields.trigger_word || '';\n const triggers = rawTriggers.toString().split(',').map(w => w.trim().toLowerCase()).filter(Boolean);\n\n const results = [];\n for (const comment of comments) {\n const text = comment.text || '';\n const matchedTrigger = triggers.find(w => {\n const esc = w.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return new RegExp(`\\\\b${esc}\\\\b`, 'i').test(text);\n }) || triggers[0] || 'lead';\n\n results.push({\n json: {\n id: comment.id || '',\n text: text,\n author: comment.author || 'Unknown User',\n author_details: comment.author_details || {},\n date: comment.date || '',\n post_config: {\n post_id: postFields.post_id || '',\n trigger_word: postFields.trigger_word || '',\n matched_trigger: matchedTrigger,\n lead_magnet_link: postFields.lead_magnet_link || '',\n dm_message: postFields.dm_message || '',\n comment_reply: postFields.comment_reply || ''\n },\n _post_config_record_id: postConfigRecordId\n }\n });\n }\n return results;\n} catch (error) {\n return [{ json: { _error: true, _error_node: 'Inject Post Config', _error_message: error.message, _error_timestamp: new Date().toISOString() } }];\n}"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
0,
0
],
"id": "b7659c73-d16a-4816-8214-adf545fa5ca7",
"name": "Inject Post Config",
"onError": "continueRegularOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "filter-trigger",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ (() => { if ($json._error) return false; const raw = $json.post_config.trigger_word || ''; const text = String($json.text || ''); const esc = s => s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); const triggers = raw.toString().split(',').map(w => w.trim()).filter(Boolean); return triggers.some(w => new RegExp(`\\\\b${esc(w)}\\\\b`, 'i').test(text)); })() }}",
"rightValue": ""
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
224,
0
],
"id": "01cdcb20-13f6-41c8-81c8-af25176e696f",
"name": "Filter Trigger Word Comments"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "self-comment-filter",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.author_details.id || '' }}",
"rightValue": "niihhhalll"
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
448,
0
],
"id": "aff3078a-85f9-4df9-bd33-c1402fa77354",
"name": "Filter Self Comments"
},
{
"parameters": {
"operation": "search",
"base": {
"__rl": true,
"value": "appRd5RRS1FMQZoDx",
"mode": "list",
"cachedResultName": "Linkedin (Speed To Lead)",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx"
},
"table": {
"__rl": true,
"value": "tblmt9yszbW69MkBA",
"mode": "list",
"cachedResultName": "LinkedIn Leads",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx/tblmt9yszbW69MkBA"
},
"filterByFormula": "==({linkedin_id}='{{ $json.author_details.id }}')",
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
672,
96
],
"id": "82da5228-4b1d-434a-b222-d433bf219416",
"name": "Search Airtable Duplicate",
"retryOnFail": true,
"waitBetweenTries": 5000,
"alwaysOutputData": true,
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"onError": "continueRegularOutput"
},
{
"parameters": {
"jsCode": "const searchResults = $input.all();\n\n// Build set of duplicate IDs from search results\nconst duplicateIds = new Set();\nfor (const result of searchResults) {\n const id = result.json.linkedin_id || result.json.fields?.linkedin_id || result.json.id || '';\n if (id) duplicateIds.add(id);\n}\n\n// Get original comments from the previous node in the execution path\n// Since Search Airtable Duplicate might output empty items, we need to \n// get the real data from Filter Self Comments\nconst originalComments = $('Filter Self Comments').all();\n\nreturn originalComments.map((item) => {\n const authorId = item.json.author_details?.id || '';\n return {\n json: {\n ...item.json,\n _duplicate_found: duplicateIds.has(authorId),\n },\n pairedItem: item.pairedItem,\n };\n});"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
896,
96
],
"id": "f0e26488-6c5d-4314-b84d-446f3415b104",
"name": "Merge Duplicate Check",
"onError": "continueRegularOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"combinator": "and",
"conditions": [
{
"id": "new-lead-filter",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ !$json._duplicate_found }}",
"rightValue": ""
}
]
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
1120,
96
],
"id": "d402139c-0864-424e-830f-a5fc9c055ca6",
"name": "Filter New Leads"
},
{
"parameters": {
"operation": "search",
"base": {
"__rl": true,
"value": "appRd5RRS1FMQZoDx",
"mode": "list",
"cachedResultName": "Linkedin (Speed To Lead)",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx"
},
"table": {
"__rl": true,
"value": "tblmt9yszbW69MkBA",
"mode": "list",
"cachedResultName": "LinkedIn Leads",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx/tblmt9yszbW69MkBA"
},
"filterByFormula": "==AND({linkedin_id}='{{ $json.author_details.id }}',{do_not_contact}=TRUE())",
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
1344,
192
],
"id": "58102e78-cb57-451d-a40f-e9900799e762",
"name": "Check Blacklist",
"retryOnFail": true,
"waitBetweenTries": 5000,
"alwaysOutputData": true,
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"onError": "continueRegularOutput"
},
{
"parameters": {
"jsCode": "// Get Airtable search results (blacklist matches)\nconst searchResults = $input.all();\n\n// Build set of blacklisted IDs\nconst blacklistIds = new Set();\nfor (const result of searchResults) {\n const id = result.json.linkedin_id || result.json.fields?.linkedin_id || '';\n if (id) blacklistIds.add(id);\n}\n\n// Get original leads from Filter New Leads\nconst originalLeads = $('Filter New Leads').all();\n\nreturn originalLeads.map((item) => {\n const authorId = item.json.author_details?.id || '';\n return {\n json: {\n ...item.json,\n _blacklist: blacklistIds.has(authorId) ? { do_not_contact: true } : {},\n _is_blacklisted: blacklistIds.has(authorId),\n },\n pairedItem: item.pairedItem,\n };\n});"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1568,
192
],
"id": "40cc7959-5aae-4e24-b53b-90be6a97f554",
"name": "Merge Blacklist Check",
"onError": "continueRegularOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "allowlisted-filter",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $json._is_blacklisted }}",
"rightValue": ""
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
1792,
128
],
"id": "c1b84fb3-be81-4ab0-ab4d-fbbca0f869ca",
"name": "Filter Allowlisted"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"combinator": "and",
"conditions": [
{
"id": "blacklisted-filter",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json._blacklisted }}",
"rightValue": ""
}
]
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
4704,
576
],
"id": "f07fc3ea-c229-40b3-876a-1c96a43de398",
"name": "Filter Blacklisted"
},
{
"parameters": {
"method": "POST",
"url": "https://hooks.slack.com/services/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",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "={\n \"parameters\": {\n \"conditions\": {\n \"options\": {\n \"caseSensitive\": true,\n \"leftValue\": \"\",\n \"typeValidation\": \"strict\",\n \"version\": 2\n },\n \"combinator\": \"and\",\n \"conditions\": [\n {\n \"id\": \"blacklisted-filter\",\n \"operator\": {\n \"type\": \"string\",\n \"operation\": \"equals\"\n },\n \"leftValue\": \"={{ String($json._is_blacklisted) }}\",\n \"rightValue\": \"true\"\n }\n ]\n },\n \"options\": {}\n },\n \"type\": \"n8n-nodes-base.filter\",\n \"typeVersion\": 2.2,\n \"position\": [\n 6048,\n 576\n ],\n \"id\": \"295315ac-cf43-4dff-b42d-8da8601fb567\",\n \"name\": \"Filter Blacklisted\"\n}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
4928,
576
],
"id": "288e0120-a49b-4bcc-a650-96e22c4b2993",
"name": "Slack \u2014 Blacklisted Alert",
"retryOnFail": true,
"waitBetweenTries": 5000,
"onError": "continueRegularOutput"
},
{
"parameters": {
"url": "=https://api46.unipile.com:17646/api/v1/users/{{ encodeURIComponent($json.author_details.id) }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "account_id",
"value": "=MfU7dR41QrOV6Wq3vJyRGQ"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": []
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
2016,
128
],
"id": "f3c14633-526d-4250-bfb0-872de96f89ba",
"name": "Enrich Lead Profile",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"jsCode": "// Merges Unipile profile enrichment back into lead item\nconst responses = $input.all();\nconst originals = $('Filter Allowlisted').all();\nif (!responses || !originals || responses.length !== originals.length) {\n return [{ json: { _error: true, _error_node: 'Merge Enrichment', _error_message: 'Mismatch', _error_timestamp: new Date().toISOString() } }];\n}\nreturn responses.map((resp, i) => ({\n json: {\n ...originals[i].json,\n enriched_profile: {\n headline: resp.json.headline || '',\n title: resp.json.title || '',\n company: resp.json.company?.name || '',\n company_size: resp.json.company?.size || 0,\n summary: resp.json.summary || ''\n },\n _enrich_raw: resp.json\n },\n pairedItem: { item: i }\n}));"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2240,
128
],
"id": "48f486cc-a365-4a8e-84f9-a0275ce59c3c",
"name": "Merge Enrichment",
"onError": "continueRegularOutput"
},
{
"parameters": {
"jsCode": "// ICP Scoring \u2014 uses ONLY $json (current item). No cross-node references.\ntry {\n const item = $input.first().json;\n if (item._error) return [];\n\n const headline = (item.author_details?.headline || '').toLowerCase();\n const commentText = (item.text || '').toLowerCase();\n const isConnected = (item.author_details?.network_distance || '') === 'DISTANCE_1';\n const enriched = item.enriched_profile || {};\n const enrichedHeadline = (enriched.headline || '').toLowerCase();\n const companyName = (enriched.company || '').toLowerCase();\n const companySize = enriched.company_size || 0;\n const jobTitle = (enriched.title || '').toLowerCase();\n const profileHeadline = enrichedHeadline || headline;\n const profileTitle = jobTitle || profileHeadline;\n\n let score = 0;\n const titleKeywords = {\n 'founder': 30, 'co-founder': 30, 'cofounder': 30, 'ceo': 30, 'owner': 30,\n 'cto': 25, 'cmo': 25, 'coo': 25, 'chief': 25,\n 'head of': 20, 'director': 20, 'vp': 20, 'vice president': 20,\n 'manager': 10, 'lead': 10, 'senior': 10\n };\n for (const [keyword, points] of Object.entries(titleKeywords)) {\n if (profileTitle.includes(keyword)) { score += points; break; }\n }\n\n if (profileHeadline.includes('agency') || companyName.includes('agency') ||\n profileHeadline.includes('consulting') || companyName.includes('consulting') ||\n profileHeadline.includes('freelance')) score += 15;\n\n if (profileHeadline.includes('saas') || profileHeadline.includes('startup') ||\n profileHeadline.includes('product') || companyName.includes('tech')) score += 10;\n\n if (companySize >= 2 && companySize <= 10) score += 20;\n else if (companySize >= 11 && companySize <= 50) score += 15;\n else if (companySize >= 51 && companySize <= 200) score += 10;\n\n if (isConnected) score += 10;\n\n const commentLength = item.text?.length || 0;\n if (commentLength > 100) score += 15;\n else if (commentLength > 50) score += 10;\n else if (commentLength > 20) score += 5;\n\n const intentKeywords = ['help', 'need', 'looking for', 'struggling', 'how do', 'how to',\n 'interested', 'want to', 'start', 'build', 'launch', 'scale', 'grow'];\n for (const kw of intentKeywords) {\n if (commentText.includes(kw)) { score += 10; break; }\n }\n\n score = Math.min(score, 100);\n let tier = 'cold';\n if (score >= 80) tier = 'hot';\n else if (score >= 50) tier = 'warm';\n\n return [{\n json: {\n ...item,\n icp_score: score,\n lead_tier: tier,\n scoring_breakdown: {\n title_match: profileTitle,\n company_size: companySize,\n comment_length: commentLength,\n is_connected: isConnected\n }\n }\n }];\n} catch (error) {\n return [{ json: { _error: true, _error_node: 'Score Lead', _error_message: error.message, _error_timestamp: new Date().toISOString() } }];\n}"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2464,
128
],
"id": "69950afb-c979-492b-9918-f09dba3a9867",
"name": "Score Lead",
"onError": "continueRegularOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"combinator": "and",
"conditions": [
{
"id": "tier-warm-hot",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.lead_tier || 'cold' }}",
"rightValue": "cold"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
2688,
32
],
"id": "2acd69d4-4adc-49dc-9365-721ddc170ed7",
"name": "Filter Warm Hot"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"combinator": "and",
"conditions": [
{
"id": "tier-cold",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.lead_tier || 'cold' }}",
"rightValue": "cold"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
4480,
384
],
"id": "44e10415-ccf4-4d30-8a84-6271b3562403",
"name": "Filter Cold"
},
{
"parameters": {
"operation": "create",
"base": {
"__rl": true,
"value": "appRd5RRS1FMQZoDx",
"mode": "list",
"cachedResultName": "Linkedin (Speed To Lead)",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx"
},
"table": {
"__rl": true,
"value": "tblmt9yszbW69MkBA",
"mode": "list",
"cachedResultName": "LinkedIn Leads",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx/tblmt9yszbW69MkBA"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"do_not_contact": false,
"link_opens": 0,
"linkedin_id": "={{ $json.author_details.id }}",
"name": "={{ $json.author }}",
"headline": "={{ $json.author_details.headline }}",
"profile_url": "=\t{{ $json.author_details.profile_url }}",
"comment_text": "={{ $json.text }}",
"dm_status": "pending",
"lead_tier": "cold",
"followup_dm_status": "not_sent",
"trigger_word": "={{ $json.post_config.trigger_word }}",
"source_post_id": "={{ $json.post_config.post_id }}",
"connection_status": "connected",
"comment_reply_status": "sent",
"created_at": "=2026-06-08T14:51:54.023Z",
"icp_score": 40
},
"matchingColumns": [],
"schema": [
{
"id": "linkedin_id",
"displayName": "linkedin_id",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "name",
"displayName": "name",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "headline",
"displayName": "headline",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "profile_url",
"displayName": "profile_url",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "comment_text",
"displayName": "comment_text",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "connection_status",
"displayName": "connection_status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "connected",
"value": "connected"
},
{
"name": "not_connected",
"value": "not_connected"
}
],
"readOnly": false,
"removed": false
},
{
"id": "dm_status",
"displayName": "dm_status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "sent",
"value": "sent"
},
{
"name": "pending",
"value": "pending"
}
],
"readOnly": false,
"removed": false
},
{
"id": "comment_reply_status",
"displayName": "comment_reply_status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "sent",
"value": "sent"
}
],
"readOnly": false,
"removed": false
},
{
"id": "source_post_id",
"displayName": "source_post_id",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "trigger_word",
"displayName": "trigger_word",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "created_at",
"displayName": "created_at",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
},
{
"id": "notion_opened_at",
"displayName": "notion_opened_at",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": true
},
{
"id": "form_submitted_at",
"displayName": "form_submitted_at",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": true
},
{
"id": "followup_dm_status",
"displayName": "followup_dm_status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "not_sent",
"value": "not_sent"
},
{
"name": "sent",
"value": "sent"
}
],
"readOnly": false,
"removed": false
},
{
"id": "Lead Score",
"displayName": "Lead Score",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": true
},
{
"id": "Follow-up Angle",
"displayName": "Follow-up Angle",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
},
{
"id": "liked_at",
"displayName": "liked_at",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": true
},
{
"id": "do_not_contact",
"displayName": "do_not_contact",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "boolean",
"readOnly": false,
"removed": false
},
{
"id": "icp_score",
"displayName": "icp_score",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": false
},
{
"id": "lead_tier",
"displayName": "lead_tier",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "hot",
"value": "hot"
},
{
"name": "warm",
"value": "warm"
},
{
"name": "cold",
"value": "cold"
}
],
"readOnly": false,
"removed": false
},
{
"id": "link_opens",
"displayName": "link_opens",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "number",
"readOnly": false,
"removed": false
},
{
"id": "email",
"displayName": "email",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
4704,
384
],
"id": "5f65ef6a-56d5-4656-ad32-8d182d5b809f",
"name": "Log Cold Lead",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"method": "POST",
"url": "=https://hooks.slack.com/services/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",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "=\"text\": \"=\u2744\ufe0f *Cold Lead Logged \u2014 No DM Sent*\\n\\n*Name:* {{ $json.fields.name }}\\n*ICP Score:* {{ $json.fields.icp_score }}/100\\n*Tier:* COLD\\n\\n\ud83d\udccc *Action:* Nurture via Like Comments workflow only.\""
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
4928,
384
],
"id": "1e50ba19-2c01-4799-aafa-45c371ef3199",
"name": "Slack \u2014 Cold Lead Logged",
"retryOnFail": true,
"waitBetweenTries": 5000,
"onError": "continueRegularOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"combinator": "and",
"conditions": [
{
"id": "connected-filter",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.author_details.network_distance }}",
"rightValue": "DISTANCE_1"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
2912,
0
],
"id": "6c2cbd29-449d-4b3f-9907-c9128c227486",
"name": "Filter Connected"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"combinator": "and",
"conditions": [
{
"id": "not-connected-filter",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.author_details.network_distance }}",
"rightValue": "DISTANCE_1"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
3808,
192
],
"id": "b32c5939-48c8-4af3-8a0d-601e78e570d6",
"name": "Filter Not Connected"
},
{
"parameters": {
"operation": "create",
"base": {
"__rl": true,
"value": "appRd5RRS1FMQZoDx",
"mode": "list",
"cachedResultName": "Linkedin (Speed To Lead)",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx"
},
"table": {
"__rl": true,
"value": "tblmt9yszbW69MkBA",
"mode": "list",
"cachedResultName": "LinkedIn Leads",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx/tblmt9yszbW69MkBA"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"linkedin_id": "={{ $json.author_details.id }}",
"name": "={{ $json.author }}",
"headline": "={{ $json.author_details.headline }}",
"profile_url": "={{ $json.author_details.profile_url }}",
"comment_text": "={{ $json.text }}",
"connection_status": "connected",
"dm_status": "pending",
"comment_reply_status": "pending",
"source_post_id": "={{ $json.post_config.post_id }}",
"trigger_word": "={{ $json.post_config.trigger_word }}",
"created_at": "={{ new Date().toISOString() }}",
"followup_dm_status": "not_sent",
"do_not_contact": false,
"icp_score": "={{ $json.icp_score || 0 }}",
"lead_tier": "={{ $json.lead_tier || 'warm' }}"
},
"matchingColumns": [],
"schema": [
{
"id": "linkedin_id",
"displayName": "linkedin_id",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "name",
"displayName": "name",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "headline",
"displayName": "headline",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "profile_url",
"displayName": "profile_url",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "comment_text",
"displayName": "comment_text",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "connection_status",
"displayName": "connection_status",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "dm_status",
"displayName": "dm_status",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "comment_reply_status",
"displayName": "comment_reply_status",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "source_post_id",
"displayName": "source_post_id",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "trigger_word",
"displayName": "trigger_word",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "created_at",
"displayName": "created_at",
"type": "dateTime",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "followup_dm_status",
"displayName": "followup_dm_status",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "icp_score",
"displayName": "icp_score",
"type": "number",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
},
{
"id": "lead_tier",
"displayName": "lead_tier",
"type": "string",
"required": false,
"defaultMatch": false,
"display": true,
"readOnly": false,
"removed": false
}
]
},
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
3136,
0
],
"id": "a7893bf8-146c-49da-a805-363b0d44eb1f",
"name": "Pre-Log Lead (Connected, pending)",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"jsCode": "// Merges Airtable create response back into lead item (preserves _lead_record_id)\nconst logs = $input.all();\nconst originals = $('Filter Connected').all();\nif (!logs || !originals || logs.length !== originals.length) {\n return [{ json: { _error: true, _error_node: 'Merge Connected Log', _error_message: 'Mismatch', _error_timestamp: new Date().toISOString() } }];\n}\nreturn logs.map((log, i) => ({\n json: {\n ...originals[i].json,\n _lead_record_id: log.json.id\n },\n pairedItem: { item: i }\n}));"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
3360,
0
],
"id": "c4109ed1-aca4-4d84-9b2d-f088bcd1dde5",
"name": "Merge Connected Log",
"onError": "continueRegularOutput"
},
{
"parameters": {
"amount": 3
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
3584,
0
],
"id": "f2eabd89-357c-43b2-a92d-ec9d5e3a1301",
"name": "Wait 3s Before Reply"
},
{
"parameters": {
"method": "POST",
"url": "=https://api46.unipile.com:17646/api/v1/posts/urn:li:activity:{{ $json.post_config.post_id }}/comments",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": []
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "account_id",
"value": "MfU7dR41QrOV6Wq3vJyRGQ"
},
{
"name": "comment_id",
"value": "={{ $json.id }}"
},
{
"name": "text",
"value": "={{ $json.post_config.comment_reply }}"
}
]
},
"options": {
"batching": {
"batch": {
"batchSize": 1,
"batchInterval": 3000
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
3808,
0
],
"id": "0b81eade-8f7c-467b-a31a-7bbd127942bb",
"name": "Reply to Comment (Connected)",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"amount": "={{ Math.floor(Math.random() * 60) + 60 }}"
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
4032,
0
],
"id": "95166b73-7bdd-4719-8bc3-4c35310cf3f5",
"name": "Wait 60-120 Seconds"
},
{
"parameters": {
"method": "POST",
"url": "https://api38.unipile.com:16821/api/v1/chatshttps://api46.unipile.com:17646/api/v1/chats",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": []
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "account_id",
"value": "=MfU7dR41QrOV6Wq3vJyRGQ"
},
{
"name": "attendees_ids",
"value": "={{ $json.author_details.id }}"
},
{
"name": "text",
"value": "={{ (() => { const firstName = ($json.author || 'there').trim().split(/\\s+/)[0].replace(/^(Dr\\.?|Mr\\.?|Mrs\\.?|Ms\\.?|Prof\\.?|Miss|Sir|Lady)\\.?$/i, 'there'); const link = 'https://link.markeye.space/' + ($json.post_config.matched_trigger || 'lead').toLowerCase() + '?id=' + ($json.author_details?.id || ''); return $json.post_config.dm_message.replace(/\\{first_name\\}/g, firstName).replace(/\\{link\\}/g, link); })() }}"
}
]
},
"options": {
"batching": {
"batch": {
"batchSize": 1,
"batchInterval": "={{ Math.floor(Math.random() * 4000) + 8000 }}"
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
4256,
0
],
"id": "f6049b90-1f0b-4771-9d8d-b383236db45a",
"name": "Send DM with Dynamic Message",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"onError": "executeErrorBranch"
},
{
"parameters": {
"amount": 1
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
4480,
0
],
"id": "59416f82-b753-44fc-88ed-77aea0a847ff",
"name": "Wait 1s Before Status Update"
},
{
"parameters": {
"operation": "update",
"base": {
"__rl": true,
"value": "appRd5RRS1FMQZoDx",
"mode": "list",
"cachedResultName": "Linkedin (Speed To Lead)",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx"
},
"table": {
"__rl": true,
"value": "tblmt9yszbW69MkBA",
"mode": "list",
"cachedResultName": "LinkedIn Leads",
"cachedResultUrl": "https://airtable.com/appRd5RRS1FMQZoDx/tblmt9yszbW69MkBA"
},
"columns": {
"mappingMode": "autoMapInputData",
"value": {
"do_not_contact": false
},
"matchingColumns": [
"id"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": false,
"defaultMatch": true,
"display": true,
"type": "string",
"readOnly": true,
"removed": false
},
{
"id": "linkedin_id",
"displayName": "linkedin_id",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "name",
"displayName": "name",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "headline",
"displayName": "headline",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "profile_url",
"displayName": "profile_url",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "comment_text",
"displayName": "comment_text",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "connection_status",
"displayName": "connection_status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "connected",
"value": "connected"
},
{
"name": "not_connected",
"value": "not_connected"
}
],
"readOnly": false,
"removed": false
},
{
"id": "dm_status",
"displayName": "dm_status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "sent",
"value": "sent"
},
{
"name": "pending",
"value": "pending"
}
],
"readOnly": false,
"removed": false
},
{
"id": "comment_reply_status",
"displayName": "comment_reply_status",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "options",
"options": [
{
"name": "sent",
"value": "sent"
}
],
"readOnly": false,
"removed": false
},
{
"id": "source_post_id",
"displayName": "source_post_id",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "trigger_word",
"displayName": "trigger_word",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "created_at",
"displayName": "created_at",
"required": false,
"defaultMatch": false,
"canBeUsedToMatch": true,
"display": true,
"type": "dateTime",
"readOnly": false,
"removed": false
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
airtableTokenApihttpHeaderAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Comment Capture Engine. Uses airtable, httpRequest. Scheduled trigger; 52 nodes.
Source: https://gist.github.com/niihhhall/d21cc17ba562a25aba9b892212abb534 — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Convert your customer satisfaction into high-converting social media content with this fully automated social proof pipeline. This workflow scans your database for top-tier reviews, generates a brande
Linkedin Automation. Uses airtable, telegram, scheduleTrigger, stickyNote. Scheduled trigger; 15 nodes.
🧠 Problem This Solves Manually sharing Medium articles to LinkedIn daily can be repetitive and time-consuming. This automation:
This workflow is for sales teams, growth hackers, and outreach specialists who manage prospect lists in Airtable and want to automate LinkedIn connection requests at scale without manual effort. A sch
🧠 Problem This Solves: For developers and creators, consistently posting quality content on LinkedIn can be time-consuming. This workflow automates the process by: