This workflow corresponds to n8n.io template #10251 — we link there as the canonical source.
This workflow follows the Agent → Datatable 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": "gauteMKS8RC8zIGb",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Social Media Monitoring",
"tags": [],
"nodes": [
{
"id": "7167c958-e821-4082-a13e-eda76c27c0be",
"name": "When clicking \u2018Execute workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1840,
432
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c26d107c-d1b4-40ae-b983-a66a7b9f81c8",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
864,
448
],
"parameters": {
"numberInputs": 4
},
"typeVersion": 3.2
},
{
"id": "e83df4cd-aaa2-4536-be7e-350aa0414f0e",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1232,
768
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "3009f7cc-fee2-48d4-b886-a81aaaad393e",
"name": "AnySite Get Reddit Post",
"type": "n8n-nodes-base.httpRequest",
"position": [
48,
112
],
"parameters": {
"url": "https://api.anysite.io/api/reddit/posts",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "timeout",
"value": "300"
},
{
"name": "post_url",
"value": "={{ $json.url }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "access-token"
}
]
}
},
"retryOnFail": true,
"typeVersion": 4.3
},
{
"id": "7d5e9846-8979-48d8-8e2f-7e1bfc752297",
"name": "AnySite Search Reddit Posts",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1200,
160
],
"parameters": {
"url": "https://api.anysite.io/api/reddit/search/posts",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "timeout",
"value": "300"
},
{
"name": "query",
"value": "={{ $json.word }}"
},
{
"name": "sort",
"value": "relevance"
},
{
"name": "count",
"value": "2"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "access-token"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "c00051fb-d3a3-4100-8c1f-4c60c06cf130",
"name": "AnySite Get Reddit Post Comment",
"type": "n8n-nodes-base.httpRequest",
"position": [
48,
304
],
"parameters": {
"url": "https://api.anysite.io/api/reddit/posts/comments",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "timeout",
"value": "300"
},
{
"name": "post_url",
"value": "={{ $json.url }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "access-token"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "a422b95c-2f44-4652-b420-46a15a3f3d86",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1328,
480
],
"parameters": {
"text": "=\u0421\u043f\u0438\u0441\u043e\u043a post_id: {{ $json.post_ids_str }}",
"options": {
"systemMessage": "=\n\nYou are a social media intelligence analyst inside an n8n workflow. Your job: given post_ids and/or pre-fetched posts plus user-defined keywords, you must retrieve records for each post_id from the internal database if needed, normalize and analyze them, generate a concise yet exhaustive report, and send that report by email using the provided email tool. Do not browse the web. Do not invent data.\n\nTools\n\nYou will be provided one or more tools. Prefer these canonical names if available; otherwise use whichever exact email tool is exposed to you in this runtime:\n\t\u2022\tsend_email\n\n\t\u2022\tfetch_posts_by_ids \nReturns an array of Post objects.\n\nIf a tool is unavailable, skip it and proceed with what you have; record any missing post_ids in missing_ids.\n\nInput (user message JSON)\n\n{\n \"post_ids\": [\"...\"], // required if \"posts\" is absent\n \"keywords\": [\"rocket\",\"anysite\"], // required (one or more)\n \"time_range\": {\"from\":\"ISO\",\"to\":\"ISO\"}, // optional\n \"language\": \"en\", // report language; default \"en\"\n \"time_zone\": \"Europe/Amsterdam\", // default \"Europe/Amsterdam\"\n \"email_to\": \"user@example.com\", // required to send the email\n \"context\": {\"brand\":\"...\",\"campaign\":\"...\",\"notes\":\"...\"}, // optional\n \"posts\": [ { ... } ] // optional: full post objects already provided\n}\n\nData handling\n\t\u2022\tIf posts present \u2192 use directly.\n\t\u2022\tIf only post_ids \u2192 call fetch_posts_by_ids. Record any misses in missing_ids.\n\t\u2022\tAnalyze only provided/returned data. No external calls.\n\nExpected post fields (may vary)\n\ntype, title, text, url, created_at (Unix or ISO), comment_count, vote_count/like_count/repost_count, platform-specific (subreddit_*, comments (array or JSON string), post_id, word, etc.).\n\nNormalization\n\t1.\tConvert created_at to ISO8601 localized to time_zone (default Europe/Amsterdam).\n\t2.\tParse comments if JSON string \u2192 array.\n\t3.\tDeduplicate by post_id or url.\n\t4.\tInfer platform from type.\n\t5.\tDetect post language; if different from report language, include a brief 1\u20132 line translation.\n\t6.\tMap each post to matched keyword(s): from word and actual matches in title/text.\n\t7.\tDisambiguate keyword senses with confidence:\n\t\u2022\trocket \u2192 space/launch, brands (e.g., Rocket Mortgage), games/memes, autos (e.g., BRABUS Rocket), food (arugula), fashion/other.\n\t\u2022\tanysite \u2192 product/brand vs generic phrase \u201cany site\u201d.\n\nPer-post analytics\n\nFor every post compute:\n\t\u2022\tengagement_proxy: sum of available counters (comment_count + vote_count/like_count/repost_count). If parsed comments array exists, you may add its length. Missing counters \u2192 0.\n\t\u2022\trecency_hours: hours since created_at to now.\n\t\u2022\tkeyword_match_strength: \"strong\" (title/exact), \"medium\" (body), \"weak\" (comments/tags), \"meta\" (only via word).\n\t\u2022\tsentiment: positive / neutral / negative + 1-sentence rationale.\n\t\u2022\tentities: notable brands/people/products/places if inferable.\n\t\u2022\trisks: toxicity, misinformation/rumors, controversy, compliance issues.\n\t\u2022\tdrivers: short notes on what likely drove engagement (e.g., striking media, controversy, timing, celebrity/brand mention).\n\t\u2022\tconfidence: high / medium / low based on data completeness, clarity, and sense disambiguation.\n\nAggregations (deeper detail)\n\t\u2022\tTotals: count of posts; split by platform.\n\t\u2022\tBy keyword: count and share (% of total), plus average engagement_proxy and sentiment mix per keyword.\n\t\u2022\tSenses distribution per keyword (counts, shares, example posts).\n\t\u2022\tPlatform breakdown: per platform totals, median and 75th-percentile engagement (approximate via sorted ranks), top topics.\n\t\u2022\tTrend narrative over time_range: textual description of spikes/dips (hourly/daily as appropriate).\n\t\u2022\tTopic clusters/themes: derive 3\u20137 themes using simple keyword co-occurrence (e.g., {\u201cspace/test/launch\u201d}, {\u201cauto/brabus/edition\u201d}, {\u201csecurity/telemetry/ads\u201d}); list 1\u20132 representative posts per theme.\n\t\u2022\tInfluential accounts/authors: where author info is available, rank by contribution to engagement.\n\t\u2022\tRisks & watchouts: consolidated list across posts with brief why-it-matters.\n\t\u2022\tRecommended actions: prioritized, actionable next steps (max per limits.max_actions), with impact/effort tags.\n\t\u2022\tConfidence & data quality: summarize coverage, missing counters, inferred senses.\n\nReport composition (rich)\n\t\u2022\tSubject: Social Media Report \u2022 {YYYY-MM-DD} \u2022 {keywords} \u2022 {posts_count}\n\t\u2022\tHTML body (inline CSS; no external assets). Include these sections in order:\n\t1.\tHeader\n\t\u2022\tTitle, date, time window, time zone, optional context (brand/campaign).\n\t2.\tExecutive summary (5\u20139 bullets)\n\t\u2022\tKey shifts, top themes, standout posts, immediate risks, recommended next actions (1\u20133).\n\t3.\tKey metrics (KPI grid + table)\n\t\u2022\tTotals, by-platform split, by-keyword split (counts, shares, avg engagement, sentiment mix).\n\t\u2022\tUse simple CSS bars (e.g., <div style=\"background:#eee\"><div style=\"width:XX%\"></div></div>) to visualize shares.\n\t4.\tKeyword senses\n\t\u2022\tTable of senses per keyword with counts, examples, and confidence notes.\n\t5.\tTrends & themes\n\t\u2022\tShort narrative of volume/engagement over time.\n\t\u2022\t3\u20137 themes/clusters with 1\u20132 representative links each.\n\t6.\tTop posts\n\t\u2022\tUp to limits.max_top_posts overall and up to limits.top_posts_per_platform per platform.\n\t\u2022\tFor each: platform, title/summary, link, localized timestamp, engagement_proxy, sentiment, matched keyword(s) & sense, 1\u20132 brief quotes/comments, drivers, risks (if any).\n\t7.\tPlatform insights\n\t\u2022\tPer-platform highlights: what content resonated, posting times, tone/style patterns.\n\t8.\tRisks & watchouts\n\t\u2022\tBullet list (\u2264 limits.max_risks) with brief mitigation ideas.\n\t9.\tRecommended actions\n\t\u2022\tPrioritized list with Impact / Effort tags (e.g., High/Low), owner suggestion if inferable from context.\n\t10.\tMethodology & limitations\n\t\u2022\tData source (workflow), missing counters treated as 0, heuristic senses, no external sources, confidence statement.\n\t\u2022\tPlain text: same flow as HTML in clean Markdown/ASCII.\n\nHTML tips (email-safe)\n\t\u2022\tInline CSS only; no external fonts/images/JS.\n\t\u2022\tUse simple tables and <div> bars for shares.\n\t\u2022\tKeep quotes \u22642 lines; truncate long text with ellipsis.\n\nCSV attachments (if supported by tool)\n\nAttach up to four CSVs:\n\t1.\tsummary.csv: keyword,count,share,avg_engagement,positive,neutral,negative\n\t2.\tposts.csv: platform,created_at,url,engagement_proxy,sentiment,keyword,sense,match_strength\n\t3.\ttop_comments.csv: platform,post_url,author,created_at,excerpt\n\t4.\tentities.csv: entity,type,frequency,example_post_url\n\nQuality & constraints\n\t\u2022\tNo fabricated data. Missing counters \u2192 0 (note in methodology).\n\t\u2022\tAbsolute timestamps with time_zone.\n\t\u2022\tKeep paragraphs tight and scannable.\n\t\u2022\tLanguage = language (default \"en\").\n\nError handling\n\t\u2022\tIf email_to missing \u2192 do not send; respond with status \"error\" and reason.\n\t\u2022\tIf email tool fails \u2192 return \"error\" with the tool\u2019s message.\n\nFinal action \u2014 you MUST send the email\n\t1.\tBuild subject, html, text per spec (depth per depth:\n\t\u2022\tstandard: sections 1\u20133, 6, 10\n\t\u2022\textended (default): all sections except 7 (optional)\n\t\u2022\tmax: include all sections with fuller detail within limits)\n\t2.\tCall the email tool with:\n\t\u2022\tto = email_to\n\t\u2022\tsubject, html, text\n\t\u2022\tattachments if supported\n\t3.\tAfter sending, reply with a single compact JSON acknowledgment (do not echo the full HTML):\n\nReturn exactly one JSON object:\n\n{\n \"status\": \"sent\" | \"error\",\n \"to\": \"string\",\n \"subject\": \"string\",\n \"totals\": {\n \"posts\": 0,\n \"platforms\": {\"reddit\":0,\"x\":0,\"linkedin\":0,\"instagram\":0},\n \"by_keyword\": [{\"keyword\":\"...\",\"count\":0,\"share\":0.0}],\n \"time_window\": {\"from\":\"ISO\",\"to\":\"ISO\",\"time_zone\":\"Europe/Amsterdam\"}\n },\n \"missing_ids\": [\"...\"],\n \"notes\": [\"...\"] // e.g., \"Engagement counters missing on some platforms; treated as 0.\"\n}\n\nPre-send checklist\n\t\u2022\tSubject has date, keywords, post count.\n\t\u2022\tHTML uses inline CSS only.\n\t\u2022\tTotals match analyzed posts.\n\t\u2022\tTime zone consistent.\n\t\u2022\temail_to present and non-empty.\n\n\n\u2e3b\n\nMinimal HTML skeleton you can adapt\n\n<html>\n <body style=\"font-family: Arial, sans-serif; color:#111; line-height:1.5; margin:0; padding:24px;\">\n <h1 style=\"margin:0 0 8px;\">Social Media Report</h1>\n <p style=\"margin:0 0 16px; color:#555;\">Date: {{DATE}} \u2022 Window: {{FROM}} \u2014 {{TO}} ({{TZ}})</p>\n {{#if CONTEXT}}<p style=\"margin:0 0 16px; color:#555;\">Context: {{CONTEXT}}</p>{{/if}}\n\n <h2 style=\"margin:24px 0 8px;\">Executive summary</h2>\n <ul style=\"margin:0 0 16px; padding-left:20px;\">{{BULLETS}}</ul>\n\n <h2 style=\"margin:24px 0 8px;\">Key metrics</h2>\n <table cellpadding=\"6\" cellspacing=\"0\" border=\"0\" style=\"border-collapse:collapse; width:100%; font-size:14px;\">\n <thead><tr><th align=\"left\" style=\"border-bottom:1px solid #ddd;\">Metric</th><th align=\"left\" style=\"border-bottom:1px solid #ddd;\">Value</th></tr></thead>\n <tbody>\n {{KPI_ROWS}}\n </tbody>\n </table>\n\n <h2 style=\"margin:24px 0 8px;\">By keyword</h2>\n {{KEYWORD_ROWS}} <!-- Include share bars like: -->\n <!--\n <div style=\"margin:6px 0;\">\n <strong>rocket</strong> \u2014 65% (13 posts)\n <div style=\"background:#eee; height:8px; width:100%; border-radius:4px;\">\n <div style=\"background:#444; height:8px; width:65%; border-radius:4px;\"></div>\n </div>\n </div>\n -->\n\n <h2 style=\"margin:24px 0 8px;\">Keyword senses</h2>\n {{SENSE_TABLE}}\n\n <h2 style=\"margin:24px 0 8px;\">Trends & themes</h2>\n <p style=\"margin:0 0 8px;\">{{TREND_NARRATIVE}}</p>\n <ul style=\"margin:0 0 16px; padding-left:20px;\">{{THEME_BULLETS}}</ul>\n\n <h2 style=\"margin:24px 0 8px;\">Top posts</h2>\n {{TOP_POST_CARDS}}\n\n <h2 style=\"margin:24px 0 8px;\">Platform insights</h2>\n {{PLATFORM_SECTIONS}}\n\n <h2 style=\"margin:24px 0 8px;\">Risks & watchouts</h2>\n <ul style=\"margin:0 0 16px; padding-left:20px;\">{{RISK_BULLETS}}</ul>\n\n <h2 style=\"margin:24px 0 8px;\">Recommended actions</h2>\n <ol style=\"margin:0 0 16px; padding-left:20px;\">{{ACTION_ITEMS}}</ol>\n\n <h2 style=\"margin:24px 0 8px;\">Methodology & limitations</h2>\n <p style=\"margin:0; color:#555;\">Data analyzed exactly as provided by the workflow (no external sources). Missing counters treated as 0. Keyword senses and themes inferred heuristically. Confidence: {{CONFIDENCE}}.</p>\n </body>\n</html>\n\nRemember: analyze only provided data, send the email yourself via the tool, then return the compact JSON acknowledgment."
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "fe4be382-803a-4829-8fcb-9b492861ae3b",
"name": "Get word's list",
"type": "n8n-nodes-base.dataTable",
"position": [
-1600,
544
],
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "VrIDpq4HXFQBRTU7",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/VrIDpq4HXFQBRTU7",
"cachedResultName": "Brand Monitoring Words"
}
},
"typeVersion": 1
},
{
"id": "e9b7166d-312a-4dd0-8afa-c40e0d13069b",
"name": "AnySite Search LinkedIn Posts",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1200,
400
],
"parameters": {
"url": "https://api.anysite.io/api/linkedin/search/posts",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "keywords",
"value": "={{ $json.word }}"
},
{
"name": "count",
"value": "2"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "access-token"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "aa8c0794-6012-40ae-894e-a5972d1db244",
"name": "AnySite Get LinkedIn Post Comments",
"type": "n8n-nodes-base.httpRequest",
"position": [
48,
544
],
"parameters": {
"url": "https://api.anysite.io/api/linkedin/post/comments",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "timeout",
"value": "300"
},
{
"name": "urn",
"value": "=urn:li:activity:{{ $json.post_id }}"
},
{
"name": "sort",
"value": "recent"
},
{
"name": "count",
"value": "30"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "access-token"
}
]
}
},
"retryOnFail": true,
"typeVersion": 4.3,
"alwaysOutputData": true
},
{
"id": "64714aa4-379b-43f5-9ce8-625ea769abde",
"name": "AnySite Search Instagram Posts",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1200,
624
],
"parameters": {
"url": "https://api.anysite.io/api/twitter/search/posts",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "query",
"value": "={{ $json.word }}"
},
{
"name": "count",
"value": "2"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "access-token"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "cfd2abac-84f3-49cf-8be0-887be12a46a5",
"name": "AnySite Search X Posts",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1200,
848
],
"parameters": {
"url": "https://api.anysite.io/api/instagram/search/posts",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "timeout",
"value": "300"
},
{
"name": "query",
"value": "={{ $json.word }}"
},
{
"name": "count",
"value": "2"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "access-token"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "67395f5a-9712-4a44-91c2-c38b44d23a28",
"name": "If LinkedIn post does not exist1",
"type": "n8n-nodes-base.dataTable",
"position": [
-592,
400
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "post_id",
"keyValue": "={{ $json.urn.value }}"
}
]
},
"operation": "rowNotExists",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring Posts"
}
},
"typeVersion": 1
},
{
"id": "ed0c57df-bc57-40bc-b220-7bfeaeaa8365",
"name": "If Reddit post does not exist",
"type": "n8n-nodes-base.dataTable",
"position": [
-592,
160
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "post_id",
"keyValue": "={{ $json.id }}"
}
]
},
"operation": "rowNotExists",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring Posts"
}
},
"typeVersion": 1
},
{
"id": "6b7d65ec-3ac2-4ee5-a5e6-4049952c8d47",
"name": "If X post does not exist3",
"type": "n8n-nodes-base.dataTable",
"position": [
-592,
848
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "post_id",
"keyValue": "={{ $json.id }}"
}
]
},
"operation": "rowNotExists",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring Posts"
}
},
"typeVersion": 1
},
{
"id": "85f7b4f1-9191-4397-a296-d45e15c371e2",
"name": "If Instagram post does not exist2",
"type": "n8n-nodes-base.dataTable",
"position": [
-592,
624
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "post_id",
"keyValue": "={{ $json.id }}"
}
]
},
"operation": "rowNotExists",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring Posts"
}
},
"typeVersion": 1
},
{
"id": "cfb6bc47-eb96-4f0a-91c4-2916ae51da44",
"name": "Insert Reddit post ",
"type": "n8n-nodes-base.dataTable",
"position": [
-368,
160
],
"parameters": {
"columns": {
"value": {
"url": "={{ $json.url }}",
"type": "={{ $json['@type'] }}",
"word": "={{ $('Get word\\'s list').item.json.word }}",
"title": "={{ $json.title }}",
"post_id": "={{ $json.id }}",
"created_at": "={{ $json.created_at }}",
"vote_count": "={{ $json.vote_count }}",
"subreddit_id": "={{ $json.subreddit.id }}",
"comment_count": "={{ $json.comment_count }}",
"subreddit_url": "={{ $json.subreddit.url }}",
"subreddit_alias": "={{ $json.subreddit.alias }}",
"subreddit_description": "={{ $json.subreddit.description }}",
"subreddit_member_count": "={{ $json.subreddit.member_count }}"
},
"schema": [
{
"id": "type",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "type",
"defaultMatch": false
},
{
"id": "title",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "title",
"defaultMatch": false
},
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "url",
"defaultMatch": false
},
{
"id": "created_at",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "created_at",
"defaultMatch": false
},
{
"id": "subreddit_id",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "subreddit_id",
"defaultMatch": false
},
{
"id": "subreddit_alias",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "subreddit_alias",
"defaultMatch": false
},
{
"id": "subreddit_url",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "subreddit_url",
"defaultMatch": false
},
{
"id": "subreddit_description",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "subreddit_description",
"defaultMatch": false
},
{
"id": "comment_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "comment_count",
"defaultMatch": false
},
{
"id": "vote_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "vote_count",
"defaultMatch": false
},
{
"id": "text",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "text",
"defaultMatch": false
},
{
"id": "comments",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "comments",
"defaultMatch": false
},
{
"id": "subreddit_member_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "subreddit_member_count",
"defaultMatch": false
},
{
"id": "post_id",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "post_id",
"defaultMatch": false
},
{
"id": "word",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "word",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring"
}
},
"typeVersion": 1
},
{
"id": "161c4a0f-5b7e-463b-8731-8b9f4569562c",
"name": "Insert LinkedIn post ",
"type": "n8n-nodes-base.dataTable",
"position": [
-368,
400
],
"parameters": {
"columns": {
"value": {
"url": "={{ $json.url }}",
"text": "={{ $json.text }}",
"type": "={{ $json['@type'] }}",
"word": "={{ $('Get word\\'s list').item.json.word }}",
"post_id": "={{ $json.urn.value }}",
"created_at": "={{ $json.created_at }}",
"vote_count": "={{ $json.reactions[0].count }}",
"comment_count": "={{ $json.comment_count }}"
},
"schema": [
{
"id": "type",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "type",
"defaultMatch": false
},
{
"id": "title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "title",
"defaultMatch": false
},
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "url",
"defaultMatch": false
},
{
"id": "created_at",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "created_at",
"defaultMatch": false
},
{
"id": "subreddit_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_id",
"defaultMatch": false
},
{
"id": "subreddit_alias",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_alias",
"defaultMatch": false
},
{
"id": "subreddit_url",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_url",
"defaultMatch": false
},
{
"id": "subreddit_description",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_description",
"defaultMatch": false
},
{
"id": "comment_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "comment_count",
"defaultMatch": false
},
{
"id": "vote_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "vote_count",
"defaultMatch": false
},
{
"id": "text",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "text",
"defaultMatch": false
},
{
"id": "comments",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "comments",
"defaultMatch": false
},
{
"id": "subreddit_member_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_member_count",
"defaultMatch": false
},
{
"id": "post_id",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "post_id",
"defaultMatch": false
},
{
"id": "word",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "word",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring"
}
},
"typeVersion": 1
},
{
"id": "13d26f5f-7303-4ae7-b6ae-4b3d59952b7a",
"name": "Insert Instagram post",
"type": "n8n-nodes-base.dataTable",
"position": [
-368,
624
],
"parameters": {
"columns": {
"value": {
"url": "={{ $json.url }}",
"text": "={{ $json.text }}",
"type": "={{ $json[\"@type\"] }}",
"word": "={{ $('Get word\\'s list').item.json.word }}",
"post_id": "={{ $json.id }}",
"created_at": "={{ $json.created_at }}",
"vote_count": "={{ $json.retweet_count }}",
"comment_count": "={{ $json.reply_count }}"
},
"schema": [
{
"id": "type",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "type",
"defaultMatch": false
},
{
"id": "title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "title",
"defaultMatch": false
},
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "url",
"defaultMatch": false
},
{
"id": "created_at",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "created_at",
"defaultMatch": false
},
{
"id": "subreddit_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_id",
"defaultMatch": false
},
{
"id": "subreddit_alias",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_alias",
"defaultMatch": false
},
{
"id": "subreddit_url",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_url",
"defaultMatch": false
},
{
"id": "subreddit_description",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_description",
"defaultMatch": false
},
{
"id": "comment_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "comment_count",
"defaultMatch": false
},
{
"id": "vote_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "vote_count",
"defaultMatch": false
},
{
"id": "text",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "text",
"defaultMatch": false
},
{
"id": "comments",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "comments",
"defaultMatch": false
},
{
"id": "subreddit_member_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_member_count",
"defaultMatch": false
},
{
"id": "post_id",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "post_id",
"defaultMatch": false
},
{
"id": "word",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "word",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring"
}
},
"typeVersion": 1
},
{
"id": "c5a56796-dd48-440a-923f-7fd3a4ffc434",
"name": "Insert X post",
"type": "n8n-nodes-base.dataTable",
"position": [
-368,
848
],
"parameters": {
"columns": {
"value": {
"url": "={{ $json.url }}",
"text": "={{ $json.text }}",
"type": "={{ $json[\"@type\"] }}",
"word": "={{ $('Get word\\'s list').item.json.word }}",
"post_id": "={{ $json.id }}",
"created_at": "={{ $json.created_at }}",
"vote_count": "={{ $json.like_count }}",
"comment_count": "={{ $json.comment_count }}"
},
"schema": [
{
"id": "type",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "type",
"defaultMatch": false
},
{
"id": "title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "title",
"defaultMatch": false
},
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "url",
"defaultMatch": false
},
{
"id": "created_at",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "created_at",
"defaultMatch": false
},
{
"id": "subreddit_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_id",
"defaultMatch": false
},
{
"id": "subreddit_alias",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_alias",
"defaultMatch": false
},
{
"id": "subreddit_url",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_url",
"defaultMatch": false
},
{
"id": "subreddit_description",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_description",
"defaultMatch": false
},
{
"id": "comment_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "comment_count",
"defaultMatch": false
},
{
"id": "vote_count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "vote_count",
"defaultMatch": false
},
{
"id": "text",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "text",
"defaultMatch": false
},
{
"id": "comments",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "comments",
"defaultMatch": false
},
{
"id": "subreddit_member_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_member_count",
"defaultMatch": false
},
{
"id": "post_id",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "post_id",
"defaultMatch": false
},
{
"id": "word",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "word",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring"
}
},
"typeVersion": 1
},
{
"id": "11713917-d244-4d96-abfc-160f67143a01",
"name": "Update Reddit post details",
"type": "n8n-nodes-base.dataTable",
"position": [
256,
32
],
"parameters": {
"columns": {
"value": {
"text": "={{ $json.text }}"
},
"schema": [
{
"id": "type",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "type",
"defaultMatch": false
},
{
"id": "title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "title",
"defaultMatch": false
},
{
"id": "url",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "url",
"defaultMatch": false
},
{
"id": "created_at",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "created_at",
"defaultMatch": false
},
{
"id": "subreddit_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_id",
"defaultMatch": false
},
{
"id": "subreddit_alias",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_alias",
"defaultMatch": false
},
{
"id": "subreddit_url",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_url",
"defaultMatch": false
},
{
"id": "subreddit_description",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_description",
"defaultMatch": false
},
{
"id": "comment_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "comment_count",
"defaultMatch": false
},
{
"id": "vote_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "vote_count",
"defaultMatch": false
},
{
"id": "text",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "text",
"defaultMatch": false
},
{
"id": "comments",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "comments",
"defaultMatch": false
},
{
"id": "subreddit_member_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_member_count",
"defaultMatch": false
},
{
"id": "post_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "post_id",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"filters": {
"conditions": [
{
"keyName": "post_id",
"keyValue": "={{ $json.id }}"
}
]
},
"options": {},
"operation": "update",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring Posts"
}
},
"typeVersion": 1
},
{
"id": "36dfff36-e33d-4d00-a7d8-003fc99825ca",
"name": "Convert comments to the string",
"type": "n8n-nodes-base.code",
"position": [
256,
224
],
"parameters": {
"jsCode": "const MAX_LEN = 0; \n\nfunction toArrayMaybe(json) {\n if (Array.isArray(json)) return json;\n if (Array.isArray(json?.comments)) return json.comments;\n if (typeof json === 'string') {\n try {\n const parsed = JSON.parse(json);\n if (Array.isArray(parsed)) return parsed;\n if (Array.isArray(parsed?.comments)) return parsed.comments;\n } catch (_) {}\n }\n if (typeof json?.data === 'string') {\n try {\n const parsed = JSON.parse(json.data);\n if (Array.isArray(parsed)) return parsed;\n } catch (_) {}\n }\n return null;\n}\n\nfunction getIncomingComments(items) {\n const looksLikeSingleComment =\n items.length > 1 ||\n (items[0]?.json && items[0].json['@type'] === '@reddit_comment');\n if (looksLikeSingleComment) {\n return items\n .map(i => i.json)\n .filter(v => v && typeof v === 'object');\n }\n const payload = items[0]?.json;\n const arr = toArrayMaybe(payload);\n if (arr) return arr;\n return [];\n}\n\nfunction formatDate(unix) {\n if (!unix && unix !== 0) return null;\n const date = new Date(unix * 1000);\n return date.toLocaleString('ru-RU', {\n year: 'numeric', month: '2-digit', day: '2-digit',\n hour: '2-digit', minute: '2-digit', second: '2-digit'\n });\n}\n\nfunction transformComment(comment) {\n if (!comment || comment.is_deleted || !comment.text) return null;\n return {\n author: comment.author?.name || '[deleted]',\n created_at_unix: comment.created_at,\n created_at: formatDate(comment.created_at),\n text: comment.text,\n replies: (comment.replies || [])\n .map(transformComment)\n .filter(Boolean),\n };\n}\n\nfunction stringifySafe(obj) {\n const s = JSON.stringify(obj);\n if (MAX_LEN > 0 && s.length > MAX_LEN) {\n return s.slice(0, MAX_LEN - 3) + '...';\n }\n return s;\n}\n\nconst allComments = getIncomingComments(items);\n\nconst topLevel = allComments.filter(\n c => c && typeof c.parent_id === 'string' && c.parent_id.startsWith('t3_')\n);\n\nconst byPost = {};\nfor (const c of topLevel) {\n const postId = c.parent_id;\n const t = transformComment(c);\n if (!t) continue;\n if (!byPost[postId]) byPost[postId] = [];\n byPost[postId].push(t);\n}\n\nconst out = Object.entries(byPost).map(([post_id, comments]) => {\n return {\n json: {\n post_id,\n comments_count: comments.length,\n comments_json: stringifySafe(comments)\n }\n };\n});\n\nreturn out.length ? out : [{ json: { post_id: null, comments_count: 0, comments_json: '[]' } }];"
},
"typeVersion": 2
},
{
"id": "29671c8b-fd0b-4970-9324-5e43072f1158",
"name": "Update Reddit post comments",
"type": "n8n-nodes-base.dataTable",
"position": [
448,
224
],
"parameters": {
"columns": {
"value": {
"comments": "={{ $json.comments_json }}"
},
"schema": [
{
"id": "type",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "type",
"defaultMatch": false
},
{
"id": "title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "title",
"defaultMatch": false
},
{
"id": "url",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "url",
"defaultMatch": false
},
{
"id": "created_at",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "created_at",
"defaultMatch": false
},
{
"id": "subreddit_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_id",
"defaultMatch": false
},
{
"id": "subreddit_alias",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_alias",
"defaultMatch": false
},
{
"id": "subreddit_url",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_url",
"defaultMatch": false
},
{
"id": "subreddit_description",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_description",
"defaultMatch": false
},
{
"id": "comment_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "comment_count",
"defaultMatch": false
},
{
"id": "vote_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "vote_count",
"defaultMatch": false
},
{
"id": "text",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "text",
"defaultMatch": false
},
{
"id": "comments",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "comments",
"defaultMatch": false
},
{
"id": "subreddit_member_count",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "subreddit_member_count",
"defaultMatch": false
},
{
"id": "post_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "post_id",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"filters": {
"conditions": [
{
"keyName": "post_id",
"keyValue": "={{ $json.post_id }}"
}
]
},
"options": {},
"operation": "update",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "B9xklN5LC5Yv67oC",
"cachedResultUrl": "/projects/KcvI5ipbOFN8ryQN/datatables/B9xklN5LC5Yv67oC",
"cachedResultName": "Brand Motitoring Posts"
}
},
"typeVersion": 1
},
{
"id": "5d0d8f1b-d5f3-47b5-91ef-1a8dc8a2fbad",
"name": "Convert LN comments to the string",
"type": "n8n-nodes-base.code",
"position":
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.
gmailOAuth2openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n workflow automates brand monitoring across social media platforms (Reddit, LinkedIn, X, and Instagram) using the AnySite API. It searches posts mentioning your defined keywords, stores results in n8n Data Tables, analyzes engagement and sentiment, and generates a…
Source: https://n8n.io/workflows/10251/ — 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.
Automates SaaS operations by consolidating user management, AI-driven support triage, analytics, and billing into one unified system. User signups flow through registration, support requests route via
Top Branch Workflow A The Market Intelligence: Patrols the Market: Runs hourly to scrape competitor rates for future days. Gathers Intel: If prices spike, it instantly checks event announcements to se
Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.
This workflow serves as a comprehensive "Workflow Nodes SEO & Documentation Generator". It uses AI to analyze, rename, and document n8n workflows, offering a streamlined way to optimize workflow reada
This is an automated blog post generation system that: Researches topics using AI agents and web search tools Writes complete blog posts with proper SEO structure Generates custom images for each post