This workflow follows the Google Sheets → 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 →
{
"id": "PUBLIC_LINKEDIN_WORKFLOW_ID",
"meta": {
"templateCredsSetupCompleted": false
},
"name": "17 - AI LinkedIn Responder",
"tags": [],
"nodes": [
{
"id": "9760b272-ad71-47ec-aab8-51eb8b937bb7",
"name": "\ud83d\udce5 Fetch LinkedIn Comments",
"type": "n8n-nodes-base.httpRequest",
"position": [
900,
320
],
"parameters": {
"url": "https://api.linkedin.com/v2/socialActions/urn:li:share:YOUR_POST_ID/comments",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.1
},
{
"id": "3a82041d-b02f-4431-97f2-c6760a96324e",
"name": "\ud83d\udcca Set Last Timestamp",
"type": "n8n-nodes-base.set",
"position": [
1120,
220
],
"parameters": {
"options": {}
},
"typeVersion": 3.3
},
{
"id": "6d88d258-ff26-41df-814d-e237f1061dbc",
"name": "\ud83d\udd0d Filter New Comments",
"type": "n8n-nodes-base.if",
"position": [
1340,
220
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "comment-filter-condition",
"operator": {
"type": "dateTime",
"operation": "after",
"rightType": "manual"
},
"leftValue": "={{ $json.created.time }}",
"rightValue": "={{ $node[\"\ud83d\udcca Set Last Timestamp\"].json.lastCommentTimestamp }}"
}
]
}
},
"typeVersion": 2
},
{
"id": "1e19adac-640f-4583-bc80-e9a4e4c8210a",
"name": "\ud83e\udd16 Generate AI Reply",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1560,
220
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-3.5-turbo",
"cachedResultName": "GPT-3.5-TURBO"
},
"options": {},
"messages": {
"values": [
{
"content": "You are a helpful social media manager. Generate a professional and engaging reply to the following LinkedIn comment. Keep it concise, positive, and appropriate for business networking.\n\nOriginal comment: {{ $json.message.text }}\n\nReply should be:\n- Professional but friendly\n- Maximum 2-3 sentences\n- Thank the commenter or acknowledge their input\n- Add value or continue the conversation naturally"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "abe4892d-9908-4794-ae53-befbdaaacf75",
"name": "\ud83d\udcac Post LinkedIn Reply",
"type": "n8n-nodes-base.httpRequest",
"position": [
1940,
220
],
"parameters": {
"url": "=https://api.linkedin.com/v2/socialActions/{{ $json.id }}/comments",
"options": {},
"jsonBody": "={\n \"actor\": \"urn:li:person:YOUR_ACTOR_URN\",\n \"message\": {\n \"text\": \"{{ $node[\"\ud83e\udd16 Generate AI Reply\"].json.response }}\"\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "dcaef8a6-4d04-4eac-b01b-f03984556e34",
"name": "\ud83d\udccb Workflow Notes2",
"type": "n8n-nodes-base.stickyNote",
"position": [
620,
-200
],
"parameters": {
"color": 5,
"width": 440,
"height": 740,
"content": "## Nodes Covered: LinkedIn API, Scheduling, Google Sheet\n\n\ud83d\udcc5 Note:\n\nAUTOMATED LINKEDIN COMMENT MONITORING\n\n*Fetches comments from a specific LinkedIn post every 10 minutes using LinkedIn's API. It authenticates via header-based token access and ensures updated responses by scheduling regular runs.*\n\n*And also reads timestamps of the comments from the sheet*"
},
"typeVersion": 1
},
{
"id": "226eb70b-6529-48fe-9c60-872eb15a59e4",
"name": "\u23f0 Runs Every 10 Mins",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
680,
220
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 10
}
]
}
},
"typeVersion": 1.2
},
{
"id": "65caa63a-15c2-4ff1-9917-ff5e6f0789d2",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1080,
-200
],
"parameters": {
"width": 420,
"height": 740,
"content": "## Nodes Covered: Data Filtering\n\n\ud83d\udcca Note:\n\nDYNAMIC COMMENT FILTERING\n\n*Retrieves the timestamp of the last processed comment from a Google Sheet, and filters out already-handled entries to focus only on newly received comments.*"
},
"typeVersion": 1
},
{
"id": "d30d1fda-a75d-4017-bec8-8eb02541be05",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1520,
-200
],
"parameters": {
"color": 3,
"width": 340,
"height": 740,
"content": "## Nodes Covered: OpenAI Analysis\n\n\ud83e\udde0 Note:\n\nAI-GENERATED LINKEDIN ENGAGEMENT\n\n*Uses OpenAI (GPT-3.5 Turbo) to generate friendly and professional replies to new LinkedIn comments. Prompts are structured to ensure tone, brevity, and contextual relevance for networking.*"
},
"typeVersion": 1
},
{
"id": "5885c2a3-43db-4184-af9b-759ba9d7cc99",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1880,
-200
],
"parameters": {
"color": 4,
"width": 220,
"height": 740,
"content": "## Nodes Covered: LinkedIn API, AI Output Delivery\n\n\ud83d\udcac Note:\n\nAUTOMATED COMMENT REPLY POSTING\n\n*Takes AI-generated replies and posts them back to LinkedIn as responses under the original comment thread, maintaining the actor identity and message formatting.*\n"
},
"typeVersion": 1
},
{
"id": "c50f65cb-00d1-40e4-b5a0-5640c25edb79",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2120,
-200
],
"parameters": {
"color": 6,
"width": 220,
"height": 740,
"content": "## Nodes Covered: Google Sheets (Write)\n\n\ud83d\udcbe Note:\n\nCOMMENT DATA ARCHIVAL\n\n*Appends processed LinkedIn comments and associated metadata into a structured Google Sheet for tracking, review, or future analytics.*"
},
"typeVersion": 1
},
{
"id": "6c6ccc12-0678-4cec-9257-97a9b1c67022",
"name": "\ud83d\udcca Get Last Comment Timestamp",
"type": "n8n-nodes-base.googleSheets",
"position": [
900,
140
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "YOUR_SHEET_NAME_OR_GID"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_GOOGLE_SHEET_DOCUMENT_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.4
},
{
"id": "93407535-d411-4407-800c-df6930304cb3",
"name": "\ud83d\udcbe Store Comment Data",
"type": "n8n-nodes-base.googleSheets",
"position": [
2160,
220
],
"parameters": {
"columns": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "YOUR_SHEET_NAME_OR_GID"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_GOOGLE_SHEET_DOCUMENT_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.4
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "PUBLIC_VERSION_ID",
"connections": {
"\u23f0 Runs Every 10 Mins": {
"main": [
[
{
"node": "\ud83d\udce5 Fetch LinkedIn Comments",
"type": "main",
"index": 0
},
{
"node": "\ud83d\udcca Get Last Comment Timestamp",
"type": "main",
"index": 0
}
]
]
},
"\ud83e\udd16 Generate AI Reply": {
"main": [
[
{
"node": "\ud83d\udcac Post LinkedIn Reply",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udcca Set Last Timestamp": {
"main": [
[
{
"node": "\ud83d\udd0d Filter New Comments",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udcac Post LinkedIn Reply": {
"main": [
[
{
"node": "\ud83d\udcbe Store Comment Data",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udd0d Filter New Comments": {
"main": [
[
{
"node": "\ud83e\udd16 Generate AI Reply",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udce5 Fetch LinkedIn Comments": {
"main": [
[
{
"node": "\ud83d\udcca Set Last Timestamp",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udcca Get Last Comment Timestamp": {
"main": [
[
{
"node": "\ud83d\udcca Set Last Timestamp",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
googleSheetsOAuth2ApihttpHeaderAuthopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
How this works
This workflow automates intelligent responses to new comments on your LinkedIn posts, saving you hours of manual engagement and helping maintain an active professional presence without constant monitoring. It's ideal for busy professionals, marketers, or business owners who want to nurture leads and build connections effortlessly. The key step involves using OpenAI to craft personalised replies based on comment content, which are then posted directly to LinkedIn via HTTP requests, while Google Sheets tracks interactions for easy oversight.
Use this workflow when you post regularly on LinkedIn and need consistent, context-aware responses to foster conversations, especially for high-volume comment threads. Avoid it for sensitive topics requiring human nuance or if your account has strict compliance needs, as AI-generated content might occasionally miss subtleties. Common variations include adjusting the schedule trigger to hourly runs or integrating additional filters for specific comment keywords to prioritise replies.
About this workflow
17 - AI LinkedIn Responder. Uses httpRequest, openAi, stickyNote, scheduleTrigger. Scheduled trigger; 13 nodes.
Source: https://github.com/ScraperNode/awesome-n8n-templates/blob/main/templates/ai-and-llm/7806-automate-linkedin-comment-replies-with-gpt-35-track-in-google-sheets/workflow.json — 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.
Create and publish Instagram carousels using OpenAI gpt-image-1 and AI caption. Uses chainLlm, outputParserItemList, lmChatOpenAi, splitInBatches. Scheduled trigger; 32 nodes.
Generate and schedule social media content across platforms using AI and Google Sheets. Uses stickyNote, googleSheets, openAi, httpRequest. Scheduled trigger; 16 nodes.
AI Story Generator. Uses chatTrigger, httpRequest, openAi, googleSheets. Chat trigger; 14 nodes.
RoboNuggets - Faceless POV AI Machine (R24). Uses scheduleTrigger, googleSheets, chainLlm, lmChatOpenAi. Scheduled trigger; 31 nodes.
Video Automation (images only). Uses chainLlm, lmChatOpenAi, outputParserStructured, splitOut. Scheduled trigger; 28 nodes.