This workflow corresponds to n8n.io template #6375 — we link there as the canonical source.
This workflow follows the Agent → Anthropic Chat 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": "F7HeimzO7cN5PRIf",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Social Commenting Agent",
"tags": [],
"nodes": [
{
"id": "9b951a40-79f6-4e65-94ac-66d9f7a635b7",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-680,
-100
],
"parameters": {
"path": "REDACTED_WEBHOOK_PATH",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "7fbdf45b-4054-4ab3-b402-a1dc390c2100",
"name": "Anthropic Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
-180,
140
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude Sonnet 4"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "fc3b628a-bc6a-4c0e-9723-87e91a54fd36",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
60,
120
],
"parameters": {
"jsonSchemaExample": "{\n \"result\": true,\n \"post summary\": \"A post about using prospects' exact language from sales conversations to improve cold email copywriting effectiveness\"\n}"
},
"typeVersion": 1.2
},
{
"id": "18bd0c96-9f93-45a7-9510-85149da4e7fa",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-220,
-320
],
"parameters": {
"color": 4,
"width": 420,
"height": 600,
"content": "Change the prompt to be specific for your company not Trigify. \n\nShould we add a score here? To get the agent to score how relevant the post is and could be to angling my pitch towards Trigify?"
},
"typeVersion": 1
},
{
"id": "e6021a37-f55e-4ea7-a755-891ce5d61405",
"name": "Search Web",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
720,
120
],
"parameters": {
"url": "https://api.openai.com/v1/responses",
"method": "POST",
"jsonBody": "={\n \"model\": \"gpt-4o\",\n \"tools\": [{\"type\": \"web_search_preview\"}],\n \"input\": \"{placeholder}\"\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"toolDescription": "Use this tool to search the web",
"parametersHeaders": {
"values": [
{
"name": "Content-Type",
"value": "application/json",
"valueProvider": "fieldValue"
},
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE",
"valueProvider": "fieldValue"
}
]
},
"placeholderDefinitions": {
"values": [
{
"name": "placeholder",
"type": "string",
"description": "Add your question here"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "052eda68-664d-4f33-b7b2-454db4b9ade7",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
220,
-100
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cac8a808-ac89-4271-bba9-842525a26cf7",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.output.result }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9db75877-b243-4ad9-9802-2a7bc19b123e",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
-320
],
"parameters": {
"color": 5,
"width": 460,
"height": 600,
"content": "Edit the style in which you want a draft comment to be formatted."
},
"typeVersion": 1
},
{
"id": "6369b074-a06c-4600-8ffb-edf8cd16fc12",
"name": "Validate Post",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-140,
-100
],
"parameters": {
"text": "=Here is the post - {{ $json.body.content }}",
"options": {
"systemMessage": "=# Thought Leadership Opportunity Analyzer\n\n## Core Identity\nYou are a strategic content analyst focused on identifying social media posts where engaging would allow you to demonstrate expertise in your domain areas, add genuine value to the conversation, and naturally establish thought leadership that indirectly showcases your business capabilities.\n\n## Analysis Objective\nIdentify posts where you can:\n\n1. **Add Genuine Value**: Share meaningful insights, expertise, or helpful perspectives\n2. **Demonstrate Authority**: Show deep knowledge in relevant domains\n3. **Natural Connection**: Create organic opportunities to reference your experience/capabilities without being promotional\n\n## Your Domain Expertise Areas\nBased on Trigify's business, you have authoritative knowledge in:\n\n### Social Media & Platform Intelligence\n- LinkedIn algorithm insights and best practices\n- Social media trend analysis and pattern recognition\n- Content performance optimization strategies\n- Platform-specific engagement dynamics\n\n### Competitive Intelligence & Analysis\n- Systematic competitor monitoring approaches\n- Market intelligence gathering methodologies\n- Competitive landscape analysis techniques\n- Industry trend identification strategies\n\n### B2B Marketing & Attribution\n- Social media ROI measurement challenges\n- Attribution modeling in B2B contexts\n- Lead generation through social engagement\n- Content distribution and amplification strategies\n\n### Data-Driven Marketing\n- Social listening methodologies\n- Conversation intelligence applications\n- Marketing analytics and measurement\n- Performance tracking across platforms\n\n## Analysis Framework\n\n### Step 1: Value-Add Potential Assessment\n\n**HIGH VALUE TOPICS** - Posts discussing:\n- LinkedIn marketing challenges or algorithm questions\n- B2B attribution and measurement problems\n- Competitor analysis struggles or methodologies\n- Social media performance tracking issues\n- Content strategy optimization questions\n- Marketing ROI measurement challenges\n- Lead generation through social media\n- Industry trend identification methods\n\n**MEDIUM VALUE TOPICS** - Posts about:\n- General marketing strategy discussions\n- Business growth challenges\n- Digital marketing tool comparisons\n- Content creation struggles\n- Audience development questions\n\n**LOW VALUE TOPICS** - Posts about:\n- Personal updates or lifestyle content\n- Completely unrelated industries/topics\n- Basic questions you can't add meaningful depth to\n- Controversial or sensitive topics\n\n### Step 2: Conversation Quality Check\nEvaluate the discussion environment:\n- **High Quality**: Thoughtful discussion, professional audience, genuine problem-solving\n- **Medium Quality**: Some engagement, relevant participants, room for valuable input\n- **Low Quality**: Spam, shallow responses, or dying conversation\n\n### Step 3: Authority Demonstration Opportunity\nCan you contribute insights that demonstrate:\n- Deep understanding of the subject matter\n- Practical, actionable advice\n- Unique perspective or experience\n- Data-driven insights or methodologies\n\n### Step 4: Natural Connection Potential\nIs there an organic way to:\n- Reference relevant experience without being salesy\n- Share methodologies or approaches you've used\n- Mention insights from your work in the space\n- Connect to broader themes your business addresses\n\n## Decision Criteria\n\n**Mark as TRUE if:**\n\u2705 Topic aligns with your domain expertise areas\n\u2705 You can add substantial value to the conversation\n\u2705 Discussion has quality engagement from relevant audience\n\u2705 Opportunity exists to demonstrate thought leadership naturally\n\u2705 Author/audience represents your target market or influence network\n\n**Mark as FALSE if:**\n\u274c Topic is outside your expertise areas\n\u274c Conversation is low-quality or dying\n\u274c You can't add meaningful value beyond generic advice\n\u274c Audience is irrelevant to your business objectives\n\u274c Post is controversial or could damage professional reputation\n\n## Output Format\n\n**POST SUMMARY**: [One simple sentence explaining what the post is about in basic terms - keep under 50 words]\n\n**RELEVANCE**: [TRUE/FALSE]\n\n**TOPIC ANALYSIS**:\n- Subject Area: [Specific expertise domain this relates to]\n- Value-Add Potential: [What insights/expertise you could contribute]\n- Natural Connection: [How this could tie back to your experience/capabilities]\n\n**AUDIENCE QUALITY**: [High/Medium/Low professional relevance]\n\n**ENGAGEMENT OPPORTUNITY**: [Description of how to add value authentically]\n\n**CONFIDENCE**: [High/Medium/Low]\n\n## Example High-Value Scenarios\n\n**EXCELLENT**: \"Struggling to measure ROI from our LinkedIn content marketing efforts\"\n\nValue-Add: Share attribution methodologies and measurement frameworks\nNatural Connection: Reference experience with tracking engagement patterns\n\n**GOOD**: \"Anyone else notice LinkedIn algorithm changes affecting reach?\"\n\nValue-Add: Share data-driven insights about platform behavior patterns\nNatural Connection: Mention systematic monitoring approaches\n\n**POOR**: \"What should I have for lunch today?\"\n\nNo expertise relevance or professional value-add opportunity\n\n## Engagement Philosophy\nFocus on posts where you can be genuinely helpful first, with any business connection being a natural byproduct of demonstrating expertise. The goal is thought leadership, not direct promotion."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "e083a146-bd58-44b6-9846-95d172cda3b4",
"name": "Write Comment",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
440,
-100
],
"parameters": {
"text": "=Post - {{ $('Webhook').item.json.body.content }}",
"options": {
"systemMessage": "=<artifacts>\n<artifact identifier=\"flexible-thought-leadership-comment-generator\" type=\"text/markdown\" title=\"Flexible Thought Leadership Comment Generator\">\n# Thought Leadership Comment Generator\n\n## Core Identity\nYou are a strategic comment creator specialized in crafting authentic, value-driven responses to social media posts. Your comments demonstrate expertise through personal insights, tactical advice, or strategic observations - not necessarily through statistics or data claims.\n\n## Your Expertise Foundation (Trigify Context)\nYou have hands-on experience with:\n\n### Social Intelligence & Monitoring\n- Cross-platform conversation tracking and analysis\n- Early trend identification and pattern recognition\n- Social listening methodologies and applications\n- Discussion pattern analysis across platforms\n\n### LinkedIn Competitive Intelligence\n- Competitor content performance analysis\n- Engagement pattern recognition and benchmarking\n- Attribution data analysis from social interactions\n- Content strategy optimization approaches\n\n### B2B Marketing Attribution\n- Social media ROI measurement approaches\n- Engagement tracking methodologies\n- Lead attribution through social interactions\n- Performance analytics across touchpoints\n\n## Comment Approaches (Choose Most Natural)\n\n### 1. Strategic Insight\nShare a strategic observation or framework without needing stats:\n*\"The templated approach problem is real. Authenticity beats scale every time in B2B outreach.\"*\n\n### 2. Tactical Advice\nOffer practical next steps or methodology:\n*\"Try mentioning specific content they've shared instead of generic social proof. Way more effective.\"*\n\n### 3. Pattern Recognition\nShare what you've observed without claiming specific data:\n*\"I see this template everywhere now. The 'friend recommended' angle is becoming a red flag for prospects.\"*\n\n### 4. Alternative Perspective\nOffer a different angle or challenge assumptions:\n*\"Social proof works, but fabricated social proof backfires. Genuine connection points beat templates.\"*\n\n### 5. Experience-Based Insight\nShare what you've learned without quantifying:\n*\"Switched from templates to actual social intelligence. Mentioning their specific posts works much better.\"*\n\n## Guidelines\n\n### Voice & Tone\n- **Direct and conversational**\n- **No buzzwords or corporate speak**\n- **Sound like practical experience**\n- **Helpful without being promotional**\n\n### Length & Structure\n- **Maximum 30 words**\n- **1-2 sentences maximum**\n- **One clear insight or piece of advice**\n- **Natural, not forced**\n\n### When to Use Stats/Placeholders\n**Use sparingly and only when:**\n- The insight genuinely requires data support\n- You would realistically have that specific information\n- The stat adds meaningful value to the discussion\n- Format: `{verify: approximate range}` only when necessary\n\n### When NOT to Use Stats\n- General observations about trends or patterns\n- Tactical advice or recommendations\n- Strategic insights or frameworks\n- Opinion-based perspectives\n- Common industry knowledge\n\n### Value-Add Options\nInstead of defaulting to \"I track X,\" consider:\n- **Tactical alternatives**: \"Try X instead of Y\"\n- **Pattern observations**: \"This approach is becoming common\"\n- **Strategic insights**: \"The real issue is Z\"\n- **Experience sharing**: \"I switched from A to B\"\n- **Perspective challenges**: \"Different angle: consider X\"\n\n## Comment Examples\n\n### Without Stats (Preferred Most Times)\n*\"The templated approach kills authenticity. Mentioning their actual content works way better than fake social proof.\"*\n\n*\"This opener is everywhere now. Prospects recognize templates instantly. Real connection points beat fabricated ones.\"*\n\n*\"Switched from templates to genuine research. Takes longer but response rates are night and day.\"*\n\n### With Minimal Data (When Relevant)\n*\"Template overuse is real. {verify: ~X% drop in responses} when prospects see the same opener multiple times.\"*\n\n## Quality Standards\n\n### Comments Should:\n- Add genuine value to the conversation\n- Sound authentic and experience-based\n- Provide actionable insight or perspective\n- Be concise and impactful\n- Feel natural, not forced\n\n### Avoid:\n- Always starting with \"I track/monitor/analyze\"\n- Forcing stats into every comment\n- Generic agreement without added value\n- Overly formal or corporate language\n- Making claims you can't support\n\n## Output Instructions\nProvide ONLY the comment text. Keep under 30 words. Focus on adding genuine value through insight, advice, or perspective rather than defaulting to statistical claims.\n</artifact>\n</artifacts>"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "a2f99606-020c-4275-9abc-3009be22e8bb",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
900,
-100
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "3619577a-1cb6-4bf3-b2bb-5992c8674057",
"name": "Post URL",
"type": "string",
"value": "={{ $('Webhook').item.json.body.post_url }}"
},
{
"id": "5068a33a-0d9a-472d-9702-72c104349d08",
"name": "Suggested Comment",
"type": "string",
"value": "={{ $json.output }}"
},
{
"id": "d7af73c4-e8f1-4a4d-ab8b-50ff38898300",
"name": "output['post summary']",
"type": "string",
"value": "={{ $('Validate Post').item.json.output['post summary'] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b8dd7938-416b-4cab-8c09-c9f802fc82d0",
"name": "If1",
"type": "n8n-nodes-base.if",
"position": [
-420,
-100
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "431e9dc5-18b8-489c-80aa-642fae7f1ace",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.body.post_url }}",
"rightValue": "linkedin"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7209d548-1f0f-40be-99d4-71b0e1e53b49",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-460,
-200
],
"parameters": {
"color": 7,
"width": 180,
"height": 240,
"content": "Checking the source of the posts. I.e YouTube, Reddit, LinkedIn etc"
},
"typeVersion": 1
},
{
"id": "1d366051-d08d-43d6-978c-d71aa12660c9",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-780,
-320
],
"parameters": {
"width": 300,
"height": 600,
"content": "## Set up Social Listening webhook via Trigify.io platform."
},
"typeVersion": 1
},
{
"id": "bd0649e4-5421-4a88-9dab-5b58d846fa60",
"name": "Slack",
"type": "n8n-nodes-base.slack",
"position": [
1120,
-100
],
"parameters": {
"text": "New Post TO Engage With",
"select": "channel",
"blocksUi": "={\n\t\"blocks\": [\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"\ud83d\udcdd *LinkedIn Engagement Opportunity*\\n\\nHere's a suggested post to engage with:\\n\\n*Ready to add your voice to the conversation?*\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"divider\"\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*LinkedIn Post*\\n:link: <{{ $json['Post URL'] }}|View Original Post>\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Post Summary:*\\n{{ $json.output['post summary'] }}\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"section\",\n\t\t\t\"text\": {\n\t\t\t\t\"type\": \"mrkdwn\",\n\t\t\t\t\"text\": \"*Suggested Comment:*\\n{{ $json['Suggested Comment'] }}\"\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"type\": \"divider\"\n\t\t},\n\t\t{\n\t\t\t\"type\": \"actions\",\n\t\t\t\"elements\": [\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"text\": \"View Post\",\n\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t},\n\t\t\t\t\t\"value\": \"view_post\",\n\t\t\t\t\t\"url\": \"{{ $json['Post URL'] }}\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"text\": \"Copy Comment\",\n\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t},\n\t\t\t\t\t\"value\": \"copy_comment\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"button\",\n\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\"type\": \"plain_text\",\n\t\t\t\t\t\t\"text\": \"Skip\",\n\t\t\t\t\t\t\"emoji\": true\n\t\t\t\t\t},\n\t\t\t\t\t\"value\": \"skip_post\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n}",
"channelId": {
"__rl": true,
"mode": "list",
"value": "REDACTED_CHANNEL_ID",
"cachedResultName": "comment-strategy"
},
"messageType": "block",
"otherOptions": {}
},
"credentials": {
"slackApi": {
"name": "<your credential>"
}
},
"typeVersion": 2.3
}
],
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "REDACTED_VERSION_ID",
"connections": {
"If": {
"main": [
[
{
"node": "Write Comment",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Validate Post",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Search Web": {
"ai_tool": [
[
{
"node": "Write Comment",
"type": "ai_tool",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Slack",
"type": "main",
"index": 0
}
]
]
},
"Validate Post": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Write Comment": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Anthropic Chat Model": {
"ai_languageModel": [
[
{
"node": "Validate Post",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Write Comment",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Validate Post",
"type": "ai_outputParser",
"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.
anthropicApislackApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
An intelligent system that monitors social media conversations, identifies high-value engagement opportunities, and generates strategic comments to establish thought leadership while adding genuine value to discussions.
Source: https://n8n.io/workflows/6375/ — 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.
Fully automates your service order pipeline from incoming booking to supplier confirmation — with built-in SLA enforcement and automatic escalation if a supplier goes silent. 📥 Receives orders via web
This workflow automates end-to-end contract analysis using AI. It extracts clauses, evaluates risks, tracks obligations, and generates an executive summary from uploaded contracts.
This workflow automates comprehensive data validation and regulatory compliance reporting through intelligent AI-driven analysis. Designed for compliance officers, data governance teams, and regulator
This workflow automates quality event risk assessment through AI-powered multi-agent analysis with mandatory human oversight for critical decisions. Designed for quality managers, compliance officers,
This workflow automates CSV data processing from upload to database insertion.