hey sadas
Shared 12/13/2025
10 views
Visual Workflow
JSON Code
{
"meta": {
"instanceId": "c5b40416b9270555b886d37c3f8de7ccec2b39f5afd9535c118b0c954715ddcd",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "a22fc7dc-e88c-4635-a8c8-32da0c4c50a8",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1664,
1744
],
"parameters": {},
"typeVersion": 1
},
{
"id": "01041b95-1839-423c-8e71-a20b976ad7df",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
528,
1648
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b436d79c-8106-4b3c-b422-3580962d8db5",
"operator": {
"type": "object",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{$json}}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "5e494baf-2fc9-477e-acb0-829f7f8b2df5",
"name": "Find documents",
"type": "n8n-nodes-base.mongoDb",
"position": [
-1008,
1744
],
"parameters": {
"options": {
"projection": "{\n \"tweet_id\": 1,\n \"_id\": 0\n }"
},
"collection": "x_posting"
},
"credentials": {
"mongoDb": {
"id": "sSEWEOg86CXtMrbk",
"name": "MongoDB dziura_online"
}
},
"retryOnFail": false,
"typeVersion": 1.2,
"alwaysOutputData": true
},
{
"id": "8ea313ef-3807-405e-b7f4-7daccc3916ed",
"name": "Aggregate1",
"type": "n8n-nodes-base.aggregate",
"position": [
-832,
1744
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "tweet_id"
}
]
}
},
"typeVersion": 1
},
{
"id": "a3073653-2ec3-4c8a-81c3-dd5fb96ba530",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-1664,
1904
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "57450a24-fbf1-4c6f-a024-e0841878b49b",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
-1504,
2000
],
"parameters": {
"jsCode": "// Force to Kyiv timezone\nconst now = new Date();\n\n// Format to Kyiv and extract hour\nconst formatter = new Intl.DateTimeFormat('en-GB', {\n timeZone: 'Europe/Kyiv',\n hour: 'numeric',\n hour12: false\n});\n\nconst hour = parseInt(formatter.format(now), 10);\n\n// Active hours: 07:00–23:59\nif (hour < 7 || hour >= 24) {\n return [{ json: { value: false } }];\n}\n\n// Probability (~28%)\nif (Math.random() < 1) {\n return [{ json: { value: true } }];\n} else {\n return [{ json: { value: false } }];\n}\n"
},
"typeVersion": 2
},
{
"id": "0dfb71e9-166f-48c6-9cf2-0ebc0b3652b8",
"name": "If1",
"type": "n8n-nodes-base.if",
"position": [
-1360,
1904
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7b85bd0c-3413-402f-8e6b-85235023fd46",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.value }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "3b53b2d9-0d04-400d-b5cb-ecec00c8aae4",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"position": [
-1216,
2000
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f5c7528d-6c4b-4534-a0d6-7a723fdfcdc4",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
944,
1824
],
"webhookId": "40c6d879-bac3-4c55-8fd7-3f5c78e3e4e7",
"parameters": {
"amount": 3
},
"typeVersion": 1.1
},
{
"id": "d62d9293-856f-47b7-abf4-a0f486a6e412",
"name": "If5",
"type": "n8n-nodes-base.if",
"position": [
720,
1872
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8310c6d9-2fa2-492b-8d9a-472ba8139197",
"operator": {
"type": "number",
"operation": "lt"
},
"leftValue": "={{ $('Keyword/Community List').item.json.failure }}",
"rightValue": 3
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ae58ebef-bf7d-41b9-b772-3b4124826927",
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-1312,
2704
],
"parameters": {
"inputSource": "passthrough"
},
"typeVersion": 1.1
},
{
"id": "4da417bc-a3bd-4ae2-9751-d61836a40fc6",
"name": "If2",
"type": "n8n-nodes-base.if",
"position": [
192,
1728
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b436d79c-8106-4b3c-b422-3580962d8db5",
"operator": {
"type": "object",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{$json}}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "52264cef-7941-4825-b0a3-790491dab54d",
"name": "Get dataset items",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
48,
1728
],
"parameters": {
"resource": "Datasets",
"datasetId": "={{ $json.defaultDatasetId }}"
},
"credentials": {
"apifyApi": {
"id": "LKxE1K3WlUTW3184",
"name": "Apify Canopy"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "08eb1634-5940-4293-9e95-20f2eed0c5a9",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1904,
1888
],
"parameters": {
"color": 5,
"width": 832,
"height": 256,
"content": "## Schedule trigger\nEdit timezone!!\n\nRuns from 7am to midnight\nbased on your time zone. \n\nThe code allows to mimic \nyour natural posting time"
},
"typeVersion": 1
},
{
"id": "b107774e-640f-45de-a94d-25aa931923ff",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-688,
1488
],
"parameters": {
"color": 6,
"width": 192,
"height": 432,
"content": "## 👇A list of keywords/communities to search\n\nYou have to specify them in the node\n"
},
"typeVersion": 1
},
{
"id": "53aba075-2526-4a50-b57a-2a2ffb442fce",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
1248
],
"parameters": {
"color": 4,
"width": 352,
"height": 848,
"content": "## Apify X (Twitter) scrapping\n\n\n### Its very important that you must have Apify community node installed befor pasting the JSON\n\nApify scrappers that extract tweets based on keywords or search within specific communities\n\nYou can only have one actor active.\nEither Community search actor or Search actor based on where you want to search for posts. \n\nYou have to turn on depended filters\n\n\n\n\n\n\n\n\n\n\n"
},
"typeVersion": 1
},
{
"id": "c232340c-35ae-4a29-9684-74bff53dfbc3",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1056,
1488
],
"parameters": {
"color": 3,
"width": 192,
"height": 432,
"content": "## Mongo DB\n\nYou have to connect your mongo DB account to store already replied tweets.\n\nThe node fetches already replied tweets\n"
},
"typeVersion": 1
},
{
"id": "b8fd6bec-072b-41ac-a228-2698ddace41a",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
336,
1248
],
"parameters": {
"color": 2,
"width": 166,
"height": 848,
"content": "## Filters tweets\n\nFeel free to edit filters\n\nNote: same filter works for both, community and search Apify actors. But since you can filter search actor output by providing some parameters to the API call some filters can be duplicated. So just make sure they match"
},
"typeVersion": 1
},
{
"id": "e31ca9a9-0a5e-4c4e-9a5d-cccd5c79fac3",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
624,
1744
],
"parameters": {
"color": 3,
"width": 800,
"height": 432,
"content": "## Retry section\nIf no tweets meet our criteria, try the loop again, selection of another random keyword from the list. If 4 retries with no results, then send a message to telegram that it was unsuccessful. You have to specify telegram chat ID to send messages to"
},
"typeVersion": 1
},
{
"id": "e7907eef-e685-4e95-8afc-2cfb9b236d26",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-896,
2704
],
"parameters": {
"text": "={{ $json.data }}",
"batching": {},
"messages": {
"messageValues": [
{
"message": "You are an X reply generator. Analyze posts and create punchy, natural replies that sound like a sharp friend texting—not a content marketer.\n\nINPUT FORMAT\nJSON with current time + post array:\n{\n \"time_now\": \"ISO 8601 timestamp\",\n \"data\": [{\"post_id\", \"screen_name\", \"tweet_text\", \"media\", \"created_at\", \"tweet_likes\", \"tweet_retweets\", \"tweet_replies\", \"tweet_views\", \"user_followers_count\"}]\n}\n\nFILTERING (Exclude before scoring)\nSkip posts that are:\n- Giveaways/contests requiring actions (\"Comment X to win\")\n- Pure promotional spam\n- No meaningful content (empty/emoji-only)\n- Mismatched media that prevents coherent reply\n\nSCORING (After filtering)\n1. Velocity: (likes + RTs + replies*2) / hours_since_posted\n2. Authority: log10(followers) * (total_engagement / followers)\n3. Timing: +3 if <6h old, +2 if velocity >10/h, +1 if <24h\n4. Opportunity: 1-5 (5=invites discussion, 1=closed statement)\nTotal: (Velocity*0.4) + (Authority*0.3) + (Timing*0.2) + (Opportunity*0.1)\nPick highest scoring post >3.0 threshold.\n\nREPLY RULES\nLength: 40-80 chars ideal. Never exceed 100. Brevity wins.\n\nVoice: Sarcastic, dry, observational. Like texting a clever friend. Zero hype, zero bot cheerfulness.\n\nStructure: Statement-only. Complete thought. No questions unless the original post literally asks something AND you add a unique angle (5% of cases max).\n\nBANNED PATTERNS:\n- Rhetorical questions (especially \"[Topic]? That's [reaction]\")\n- Colons for dramatic reveals (\"Big Tech: where your life vanishes\")\n- Starting with \"So\" / \"Ah\" / \"Well\"\n- \"[Concept] as [metaphor]? [Reaction].\" format\n- Mirror questions that restate the post\n- Generic \"wild/crazy/interesting\" reactions\n- Emoji (unless critical)\n- Hashtags\n- Exclamation marks (except rare emphasis)\n\nSTYLE MIXING\nMatch post tone but add edge:\n- Bold claims → Undercut with dry reality check\n- Humble brags → Call it out with light snark\n- Rants → Distill to punchy truth\n- Questions → Answer directly, skip meta-commentary\n- Hype → Deflate with grounded take\n\nMedia: Only reference if it makes reply wittier. Don't force it.\n\nOUTPUT\n{\"selected_tweet_id\": \"id\", \"screen_name\": \"name\", \"reply\": \"text\"}"
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "9774955c-89c6-45ea-9ec3-5255f8f66507",
"name": "OpenRouter Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-912,
2896
],
"parameters": {
"model": "anthropic/claude-3.5-haiku",
"options": {
"responseFormat": "json_object"
}
},
"credentials": {
"openRouterApi": {
"id": "EYm3FrdMghPKTGNR",
"name": "OpenRouter account"
}
},
"typeVersion": 1
},
{
"id": "7982bfb1-6fb6-4a39-bcb6-ac37025b330c",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-800,
2880
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{ \n \"selected_tweet_id\": \"tweet_id_here\",\n \"screen_name\": \"author_screen_name\",\n \"reply\": \"your_generated_reply_here\"\n}"
},
"typeVersion": 1.3
},
{
"id": "e2e73cf0-b7f0-445c-8777-1d1d109248cc",
"name": "Create Tweet",
"type": "n8n-nodes-base.twitter",
"onError": "continueErrorOutput",
"position": [
-544,
2704
],
"parameters": {
"text": "={{ $json.output.reply }}",
"additionalFields": {
"inReplyToStatusId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.output.selected_tweet_id }}"
}
}
},
"credentials": {
"twitterOAuth2Api": {
"id": "uKEf5bOiG9Pze02J",
"name": "X account (MaxDziura)"
}
},
"typeVersion": 2
},
{
"id": "f8032e0f-fc18-42a3-aedd-6a8670f52767",
"name": "OpenRouter Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-816,
3008
],
"parameters": {
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "EYm3FrdMghPKTGNR",
"name": "OpenRouter account"
}
},
"typeVersion": 1
},
{
"id": "3b8f52b8-b72d-4139-8c1a-1cdd3fe3a3f9",
"name": "Send a success reply",
"type": "n8n-nodes-base.telegram",
"position": [
-320,
2608
],
"webhookId": "4511ad2c-7344-4978-a5eb-a145d66c458c",
"parameters": {
"text": "=🟢 Posted a reply successfully\n\nhttps://x.com/{{ $('Basic LLM Chain').item.json.output.screen_name }}/status/{{ $('Basic LLM Chain').item.json.output.selected_tweet_id }}\n\n<code>{{ $('Basic LLM Chain').item.json.output.reply }}</code>\n",
"chatId": "1141664203",
"additionalFields": {
"parse_mode": "HTML",
"appendAttribution": false,
"disable_notification": true
}
},
"credentials": {
"telegramApi": {
"id": "AtAlsXWrlRSRFpDS",
"name": "Twitter bot @horraybot"
}
},
"typeVersion": 1.2
},
{
"id": "0d4e91a8-c9cc-4484-8c4d-1696c70f1112",
"name": "Send a failed reply",
"type": "n8n-nodes-base.telegram",
"position": [
-320,
2816
],
"webhookId": "4511ad2c-7344-4978-a5eb-a145d66c458c",
"parameters": {
"text": "=🔴 Posted a reply unsuccessfully due to X (Twitter) API limitation, (17 posts a day for free tier)\n\nhttps://x.com/{{ $('Basic LLM Chain').item.json.output.screen_name }}/status/{{ $('Basic LLM Chain').item.json.output.selected_tweet_id }}\n\n<code>{{ $('Basic LLM Chain').item.json.output.reply }}</code>\n",
"chatId": "1141664203",
"additionalFields": {
"parse_mode": "HTML",
"appendAttribution": false,
"disable_notification": true
}
},
"credentials": {
"telegramApi": {
"id": "AtAlsXWrlRSRFpDS",
"name": "Twitter bot @horraybot"
}
},
"typeVersion": 1.2
},
{
"id": "de4f664f-30ac-43bb-940b-a57c38a16e34",
"name": "parse reply",
"type": "n8n-nodes-base.set",
"position": [
-96,
2704
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "0c5f816e-b877-4fd6-8503-bdef0343079d",
"name": "tweet_id",
"type": "string",
"value": "={{ $('Basic LLM Chain').item.json.output.selected_tweet_id }}"
},
{
"id": "94ae6af6-9e8c-44e1-b53e-eea2a133cc8e",
"name": "screen_name",
"type": "string",
"value": "={{ $('Basic LLM Chain').item.json.output.screen_name }}"
},
{
"id": "6da73fce-869a-4c13-b3c3-3602d7ba55c9",
"name": "reply",
"type": "string",
"value": "={{ $('Basic LLM Chain').item.json.output.reply }}"
},
{
"id": "11bd3d58-f53d-410c-bfe0-b1259d41a1fb",
"name": "tweet_url",
"type": "string",
"value": "=https://x.com/{{ $('Basic LLM Chain').item.json.output.screen_name }}/status/{{ $('Basic LLM Chain').item.json.output.selected_tweet_id }}"
},
{
"id": "c5241ce8-609b-46f1-9360-cbf5d779953b",
"name": "date",
"type": "string",
"value": "={{ $now.format('HH:mm; dd.MM.yyyy')}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "12b26da7-60d0-43ec-b98e-c52c06ad941d",
"name": "Insert documents",
"type": "n8n-nodes-base.mongoDb",
"position": [
80,
2704
],
"parameters": {
"fields": "=tweet_id, screen_name, reply, tweet_url, date",
"options": {
"dateFields": ""
},
"operation": "insert",
"collection": "x_posting"
},
"credentials": {
"mongoDb": {
"id": "sSEWEOg86CXtMrbk",
"name": "MongoDB dziura_online"
}
},
"typeVersion": 1.2
},
{
"id": "155ffbbf-d1e9-4aa0-9d1a-5657c1bf9109",
"name": "modify tweet data",
"type": "n8n-nodes-base.set",
"position": [
-1072,
2704
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "310097a1-1356-4c9c-b5d5-1c4e944aba61",
"name": "time_now",
"type": "string",
"value": "={{ $now }}"
},
{
"id": "2d7f2ada-72ef-4bad-936d-5eeb90bd4e38",
"name": "data",
"type": "array",
"value": "={{ $json.data }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d15b9708-1dde-4452-a07c-d568a7161c1e",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1648,
1600
],
"webhookId": "e2353116-ed7b-4d40-a10a-a889f507052d",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "AtAlsXWrlRSRFpDS",
"name": "Twitter bot @horraybot"
}
},
"typeVersion": 1.2
},
{
"id": "68f81ffe-38d1-45e8-ba3a-31f508eef8e8",
"name": "If3",
"type": "n8n-nodes-base.if",
"position": [
-1424,
1600
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d837eb25-886e-450c-9145-7a1e483d630e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.text }}",
"rightValue": "/reply"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "deaf71c4-ac94-4bfc-abb0-ead8bdf2ae11",
"name": "No Operation, do nothing1",
"type": "n8n-nodes-base.noOp",
"position": [
-1280,
1424
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4498072b-6f17-4ea2-86e7-5cb248d287cd",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1680,
1424
],
"parameters": {
"color": 4,
"width": 576,
"height": 336,
"content": "## Telegram trigger\n\nYou can trigger the workflow manually via /reply\nYou need to setup bot credential for this"
},
"typeVersion": 1
},
{
"id": "bb59a2d7-54c1-435a-a0bc-e332fd8d4245",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1120,
2496
],
"parameters": {
"color": 3,
"width": 192,
"height": 384,
"content": "## Add current date\n\nso the LLM better understand the trending tweets"
},
"typeVersion": 1
},
{
"id": "6231b74e-fa42-4b9b-8842-35acf1c38b18",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
2496
],
"parameters": {
"width": 368,
"height": 656,
"content": "## LLM tweets processing "
},
"typeVersion": 1
},
{
"id": "c214621e-0edb-4707-a23e-d3f435136b63",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
2496
],
"parameters": {
"color": 6,
"height": 560,
"content": "## Provide status message to telegram\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nYou have to specify telegram chat ID"
},
"typeVersion": 1
},
{
"id": "33fb63a4-7555-4012-9dbd-7ea0ac9f5d93",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
2496
],
"parameters": {
"color": 4,
"width": 150,
"height": 560,
"content": "## Reply to the post\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nNote: official twitter API has limitations. You cna post about 17 times a day before limits apply"
},
"typeVersion": 1
},
{
"id": "97c87c4b-5d65-457c-9621-b2d2776208dc",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
2496
],
"parameters": {
"width": 480,
"height": 384,
"content": "## Saving reply to databse to avoid duplications"
},
"typeVersion": 1
},
{
"id": "d2771474-358d-4a14-b078-53a47544cdb1",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
1488
],
"parameters": {
"color": 3,
"width": 150,
"height": 432,
"content": "## Check if there are results\n\nBased on your query and parameters the APIs may return no results"
},
"typeVersion": 1
},
{
"id": "8cfdb5eb-d752-4f30-ae29-49bb70c017ee",
"name": "Sticky Note14",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
816
],
"parameters": {
"color": 6,
"width": 1248,
"height": 912,
"content": "## Analyze tweet media, Send tweet data to Sub workflow\n\n### Double check it triggers the execution workflow\n\n\nMake sure you set the gemini node corrrectly\nI recommend setting 2 gemini accounts, one for image analysys, one for video\nSo you can stay better within free limits"
},
"typeVersion": 1
},
{
"id": "27ff3426-92a3-4661-bf5a-eecfc39fc69b",
"name": "Sticky Note16",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2480,
1072
],
"parameters": {
"width": 4016,
"height": 1216,
"content": "# 👇👇👇\n# You have to specify your own data/create credentials to use the workflow properly:\n\n### Find the newest version at https://dziura.online/automation\n### Documentation and usage guide https://docs.google.com/document/d/13okk16lkUOgpbeahMcdmd7BuWkAp_Lx6kQ8BwScbqZk/edit?usp=sharing\n\n\n### * Telegram bot https://t.me/BotFather\n### * Telegram chat id to send status messages to\n### * Mongo DB database to save replies (connection tutorial link https://youtu.be/gB76VdlpX7Y?si=bw_LHLTkXEk8LFO0)\n### * Its very important that you must have Apify community node installed before pasting the JSON. Just paste it over\n### Apify Account. I use:\n### https://apify.com/api-ninja/x-twitter-advanced-search actor for scrapping X (Twitter) posts and\n### https://apify.com/api-ninja/x-twitter-community-search-post-scraper for community posts scraping\n### * Open Router, or any LLM to process tweets https://openrouter.ai/. Grok3 proven to be working well\n### * X (twitter) API for automatic posting https://developer.x.com\n"
},
"typeVersion": 1
},
{
"id": "02794393-ccbd-4069-8044-0ce2f5742273",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1440,
2352
],
"parameters": {
"color": 5,
"width": 1872,
"height": 912,
"content": "# Execution workflow\n\n\nGenerating a reply and posting on X, send status to telegram chat, save reply to mongo db"
},
"typeVersion": 1
},
{
"id": "bb2d9c30-dc43-4230-83f0-2a4ea1800ee7",
"name": "Community filter",
"type": "n8n-nodes-base.filter",
"position": [
368,
1664
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "abda82ba-a65f-4af9-b5dc-c91a27d7c993",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.text.length }}",
"rightValue": 60
},
{
"id": "e269fa10-d9e1-4398-95a9-18f393408bad",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.author.followers }}",
"rightValue": 500
},
{
"id": "f2d57a64-ad49-453b-ad04-8d4b7d03c5be",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ !$('Aggregate1').item.json.tweet_id.includes($json.id) }}",
"rightValue": "="
},
{
"id": "bb6e7ed7-c9e5-4454-8f7c-6fea447a9f9b",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.replyCount }}",
"rightValue": 3
},
{
"id": "6681f28a-8904-4869-84e7-5b479b092ec2",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.likeCount }}",
"rightValue": 80
},
{
"id": "38e16cbc-2ec1-4087-95a3-af0ccee0a005",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.lang }}",
"rightValue": "en"
},
{
"id": "70719339-978b-472b-b3fc-98620fd42c28",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.viewCount }}",
"rightValue": 100
}
]
}
},
"typeVersion": 2.2,
"alwaysOutputData": true
},
{
"id": "cd8ba8c8-d539-46ee-8697-51c0a2f7c33b",
"name": "Community search actor",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
-96,
1632
],
"parameters": {
"actorId": {
"__rl": true,
"mode": "id",
"value": "upbwCMnBATzmzcaNu"
},
"customBody": "={\n \"communityIds\": [\n \"{{ $json.randomized_item }}\"\n ],\n \"numberOfTweets\": 40\n}"
},
"credentials": {
"apifyApi": {
"id": "LKxE1K3WlUTW3184",
"name": "Apify Canopy"
}
},
"typeVersion": 1
},
{
"id": "91907fab-1c64-4d9a-8fcb-e39739a876be",
"name": "Keyword/Community List",
"type": "n8n-nodes-base.set",
"position": [
-640,
1744
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={\n \"keyword_community_list\": [\n \"1472105760389668865\",\n \"1699807431709041070\",\n \"1808786876314026197\",\n \"1488952693443997701\",\n \"1489422448332197888\",\n \"1471580197908586507\",\n \"1493446837214187523\",\n \"1922373276812066890\",\n \"1473276439172722693\",\n \"1506800881525829633\",\n \"1733132808745283911\",\n \"1783990533192651232\",\n \"1488663855127535616\",\n \"1471178821906821122\",\n \"1949327364858822928\",\n \"1892177256048447870\",\n \"1521855238277414913\",\n \"(\\\"BuildInPublic\\\" OR \\\"BuildingInPublic\\\" OR \\\"Build in public\\\" OR \\\"building startup\\\" OR \\\"startup founder\\\")\",\n \"(\\\"StartupJourney\\\" OR \\\"IndieHacker\\\" OR \\\"MakerStory\\\" OR \\\"progress update\\\" OR \\\"Startup Life\\\")\",\n \"(\\\"SaaS\\\" OR \\\"SaaSGrowth\\\" OR \\\"SaaSTips\\\" OR \\\"TechStartup\\\" OR \\\"B2BSaaS\\\" OR \\\"ProductLaunch\\\" OR \\\"saas founder\\\" OR \\\"software as a service\\\")\",\n \"(\\\"Entrepreneur\\\" OR \\\"Entrepreneur Mindset\\\" OR \\\"StartupLife\\\" OR \\\"Entrepreneur Goals\\\" OR \\\"Entrepreneur Mindset\\\" OR \\\"Entrepreneur Goals\\\" OR \\\"entrepreneurship\\\")\",\n \"(\\\"AI\\\" OR \\\"Artificial Intelligence\\\" OR \\\"AIStartup\\\" OR \\\"Machine Learning\\\" OR \\\"Innovation\\\" OR \\\"TechTrends\\\" OR \\\"ai tools\\\")\",\n \"(\\\"Business Strategy\\\" OR \\\"Growth Hacking\\\" OR \\\"Digital Marketing\\\" OR \\\"Business Insights\\\" OR \\\"ScaleUp\\\" OR \\\"Business Mentor\\\" OR \\\"Networking\\\")\",\n \"(\\\"Tech Community\\\" OR \\\"Startup Community\\\" OR \\\"Entrepreneurship Life\\\" OR \\\"EntrepreneurshipLife\\\" OR \\\"Success Stories\\\" OR \\\"SuccessStories\\\" OR \\\"BusinessTips\\\" OR \\\"Business Tips\\\")\",\n \"(\\\"EntrepreneurialSpirit\\\" OR \\\"build in public saas\\\" OR \\\"startup journey\\\" OR \\\"indie hacker story\\\" OR \\\"ai startup founder\\\")\",\n \"(\\\"ai startup founder\\\" OR \\\"saas growth tips\\\" OR \\\"entrepreneur mindset\\\" OR \\\"tech startup life\\\" OR \\\"how to build saas\\\" OR \\\"startup advice\\\")\",\n \"(\\\"building in public tips\\\" OR \\\"saas marketing\\\" OR \\\"entrepreneur struggles\\\")\",\n \"(\\\"VibeCoding\\\" OR \\\"#VibeCode\\\" OR \\\"AI Coding\\\" OR \\\"AICoding\\\" OR \\\"AIAssistedCoding\\\" OR \\\"Code With AI\\\" OR \\\"LLMCoding\\\" OR \\\"LLM Coding\\\")\",\n \"(\\\"Vercel\\\" OR \\\"VPS\\\" OR \\\"hetzner\\\" OR \\\"netlify\\\" OR \\\"coolify\\\" OR \\\"Github\\\" OR \\\"gitlab\\\")\",\n \"(\\\"CodeLLM\\\" OR \\\"n8n\\\" OR \\\"zapier\\\" OR \\\"make.com\\\" OR \\\"nocode\\\" OR \\\"no-code\\\")\",\n \"(\\\"nextJS\\\" OR \\\"JS\\\" OR \\\"TS\\\" OR \\\"swiftUI\\\" OR \\\"React native\\\" OR \\\"expo\\\")\",\n \"(\\\"DevTools\\\" OR \\\"Code Automation\\\" OR \\\"AISaaS\\\" OR \\\"SaaSAutomation\\\" OR \\\"SaaS Automation\\\" OR \\\"SaaSwithAI\\\")\",\n \"(\\\"Open Source\\\" OR \\\"Build With AI\\\" OR \\\"Public Code\\\" OR \\\"Code In Public\\\" OR \\\"Founder Vibes\\\" OR \\\"Innovator Mindset\\\" OR \\\"Tech Pioneer\\\" OR \\\"Startup Automation\\\")\"\n\n ],\n \"failure\": {{ $runIndex === 0 ? 0 : ($json.failure || 0) }}\n}"
},
"typeVersion": 3.4
},
{
"id": "57cc9710-cbd3-4799-8da8-7d0140123cd5",
"name": "Randomized community, keyword",
"type": "n8n-nodes-base.set",
"position": [
-448,
1744
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "1c216d43-8f92-4a73-bd6e-b85368fb1b84",
"name": "randomized_item",
"type": "string",
"value": "={{ $json.keyword_community_list.randomItem() }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "95731b9f-cad5-445e-8cd7-0db53ec78fc1",
"name": "If4",
"type": "n8n-nodes-base.if",
"position": [
-288,
1744
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6f1f27b9-5a72-42b3-bee1-e23e30c648f6",
"operator": {
"type": "string",
"operation": "regex"
},
"leftValue": "={{ $json.randomized_item }}",
"rightValue": "\\d{19}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4eded2f9-d7c0-4ec1-87e8-bda11757d506",
"name": "Sticky Note15",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
1488
],
"parameters": {
"color": 5,
"width": 320,
"height": 432,
"content": "## Get randomized items, route to the right API\n\n\nSet and check random item from user input list of keywords or communities. Check if it matches community ID regex, route to the right either to community search, or to search by keyword actor"
},
"typeVersion": 1
},
{
"id": "9242b66b-52c5-43a2-92f3-35cd740105a9",
"name": "Sticky Note17",
"type": "n8n-nodes-base.stickyNote",
"position": [
-864,
1488
],
"parameters": {
"color": 2,
"width": 166,
"height": 432,
"content": "## Aggregate posted reply to a unified list "
},
"typeVersion": 1
},
{
"id": "8b281787-2cb7-4047-b706-9d4907cfaea3",
"name": "Send a scraping failure message",
"type": "n8n-nodes-base.telegram",
"position": [
944,
1968
],
"webhookId": "4511ad2c-7344-4978-a5eb-a145d66c458c",
"parameters": {
"text": "=🔴 Parsed search unsuccessfully. Failed after 4 retries\n\nclick /reply to try again\n",
"chatId": "1141664203",
"additionalFields": {
"parse_mode": "HTML",
"appendAttribution": false,
"disable_notification": true
}
},
"credentials": {
"telegramApi": {
"id": "AtAlsXWrlRSRFpDS",
"name": "Twitter bot @horraybot"
}
},
"typeVersion": 1.2
},
{
"id": "ee2b6bf3-8c52-4a2c-b169-d962f4284b20",
"name": "Increment Failure Counter",
"type": "n8n-nodes-base.set",
"position": [
1216,
1984
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "increment-failure-counter",
"name": "failure",
"type": "number",
"value": "={{ $('Keyword/Community List').item.json.failure +1 }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5fb27fa4-2d5c-450f-a9c1-749b8f172256",
"name": "Search keyword actor",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
-96,
1824
],
"parameters": {
"actorId": {
"__rl": true,
"mode": "id",
"value": "0oVSlMlAX47R2EyoP"
},
"customBody": "={\n \"contentLanguage\": \"en\",\n \"contentQuestionMarks\": false,\n \"engagementHasEngagement\": false,\n \"engagementMinLikes\": 100,\n \"engagementMinReplies\": 5,\n \"engagementMinRetweets\": 0,\n \"mediaHasHashtags\": false,\n \"mediaHasLinks\": false,\n \"mediaHasMentions\": false,\n \"mediaNewsOnly\": false,\n \"mediaSafeContentOnly\": false,\n \"numberOfTweets\": 20,\n \"query\": {{ $json.randomized_item.toJsonString() }},\n \"timeWithinTime\": \"2d\",\n \"tweetTypes\": [\n \"original\"\n ],\n \"tweetTypesExclude\": [\n \"retweets\",\n \"quotes\",\n \"replies\",\n \"self_threads\"\n ],\n \"usersBlueVerifiedOnly\": true,\n \"usersVerifiedOnly\": false\n}"
},
"credentials": {
"apifyApi": {
"id": "LKxE1K3WlUTW3184",
"name": "Apify Canopy"
}
},
"typeVersion": 1
},
{
"id": "200a4d1a-ae58-4ab3-b82d-ea99e72ddb3b",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
1056,
1328
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a4b73711-2604-499b-98c3-f11435a8d745",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ \"media\" in $json.extendedEntities}}",
"rightValue": ""
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bc7583a5-f95c-4e0f-a868-20cfd90b2a5c",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.extendedEntities.media[0].type }}",
"rightValue": "photo"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b2c8a71c-8057-42d4-94be-7b9d149a9fc3",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.extendedEntities.media[0].type }}",
"rightValue": "video"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3373ff13-bd98-48cf-9677-3d7bb5013d07",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.extendedEntities.media[0].type }}",
"rightValue": "animated_gif"
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "a86379bc-1957-48f2-9867-aed3a9977ebd",
"name": "Analyze video",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"onError": "continueErrorOutput",
"position": [
1312,
1440
],
"parameters": {
"text": "What's in this video?. Output limitation is 500 characters",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "video",
"operation": "analyze",
"videoUrls": "={{ $json.extendedEntities.media[0].video_info.variants[1].url }}"
},
"credentials": {
"googlePalmApi": {
"id": "wO1igjcBuMXWuu2n",
"name": "#2Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "4f6ef1fb-c082-43b1-9d10-070198d498d6",
"name": "Analyze image",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"onError": "continueErrorOutput",
"position": [
1312,
1296
],
"parameters": {
"text": "What's in this image? Output limitation is 500 characters",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "image",
"imageUrls": "={{ $json.extendedEntities.media[0].media_url_https }}",
"operation": "analyze"
},
"credentials": {
"googlePalmApi": {
"id": "zX9jv8OkVjCL0xiW",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "3fcbe910-101d-4ed1-a075-d5952e102ba5",
"name": "Wait1",
"type": "n8n-nodes-base.wait",
"position": [
1536,
1408
],
"webhookId": "729fe7cd-698d-4af2-a5c4-68dabfb7e02d",
"parameters": {
"amount": 12
},
"typeVersion": 1.1
},
{
"id": "bfc213fd-17f6-40a8-b85f-beeac5b137c7",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
784,
1232
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "a75f5855-c9b3-4d66-a575-a7b5f7f01b3a",
"name": "Analyze gif",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"onError": "continueErrorOutput",
"position": [
1312,
1600
],
"parameters": {
"text": "What's in this video?. Output limitation is 500 characters",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "video",
"operation": "analyze",
"videoUrls": "={{ $json.extendedEntities.media[0].video_info.variants[0].url }}"
},
"credentials": {
"googlePalmApi": {
"id": "wO1igjcBuMXWuu2n",
"name": "#2Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "26863a14-1033-46d7-86b9-8e0e82b774ee",
"name": "Text tweet, Set media to None",
"type": "n8n-nodes-base.set",
"position": [
1584,
1136
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": " {\n \"content\": {\n \"parts\": [\n {\n \"text\": \"null\"\n }\n ]\n }\n }"
},
"typeVersion": 3.4
},
{
"id": "43a78a52-1713-4106-8624-387ef026fb10",
"name": "Set tweet data",
"type": "n8n-nodes-base.set",
"position": [
1696,
1408
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a2b5edfc-0e25-4492-bc6f-69e12e42cddb",
"name": "id",
"type": "string",
"value": "={{ $('Loop Over Items').item.json.id \n}}"
},
{
"id": "2d24a106-0404-4dc3-977e-97281311af0d",
"name": "screen_name",
"type": "string",
"value": "={{ $('Loop Over Items').item.json.author.userName }}"
},
{
"id": "0e403383-bddf-4739-bc6a-9cf5cf299236",
"name": "user_followers_count",
"type": "number",
"value": "={{ $('Loop Over Items').item.json.author.followers }}"
},
{
"id": "bfe1a4a3-5b37-4bc0-a174-2262393c50ba",
"name": "created_at",
"type": "string",
"value": "={{ $('Loop Over Items').item.json.createdAt }}"
},
{
"id": "6434ee6b-7e9b-4a82-b2a0-a504e61767ae",
"name": "tweet_text",
"type": "string",
"value": "={{ $('Loop Over Items').item.json.text.replace(/\\s*https?:\\/\\/\\S+$/, '') }}\n"
},
{
"id": "1be34d36-9e2b-4491-9fb0-c33b5ea20f20",
"name": "media",
"type": "string",
"value": "={{ $json.content.parts[0].text }}"
},
{
"id": "2e43111a-7963-4f20-b6e1-2d0986ac2551",
"name": "tweet_likes",
"type": "number",
"value": "={{ $('Loop Over Items').item.json.likeCount }}"
},
{
"id": "1b856625-d214-4700-b37b-8d56649af3b9",
"name": "tweet_retweets",
"type": "number",
"value": "={{ $('Loop Over Items').item.json.retweetCount }}"
},
{
"id": "afb5df07-042f-4b51-880c-201061cae0be",
"name": "tweet_views",
"type": "string",
"value": "={{ $('Loop Over Items').item.json.viewCount }}"
},
{
"id": "490aa9a3-65ff-4f33-bfe7-97c8bf6b8436",
"name": "tweet_replies",
"type": "number",
"value": "={{ $('Loop Over Items').item.json.replyCount }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "cf46ebbf-c4fd-4aac-a183-1df6496a25c2",
"name": "Execute Workflow1",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
1168,
1120
],
"parameters": {
"options": {},
"workflowId": {
"__rl": true,
"mode": "list",
"value": "p6jNHdPnJaA9DHSQ",
"cachedResultName": "Reply posting on X (Main)"
},
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "8de9fe88-c8de-437c-a547-eaffefb18c94",
"name": "Aggregate2",
"type": "n8n-nodes-base.aggregate",
"position": [
976,
1168
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "a0eaf09a-f611-4a81-965f-add95e081da2",
"name": "Send start execution",
"type": "n8n-nodes-base.telegram",
"position": [
-1232,
1648
],
"webhookId": "4511ad2c-7344-4978-a5eb-a145d66c458c",
"parameters": {
"text": "Starting parsing X (Twitter)\n",
"chatId": "1141664203",
"additionalFields": {
"parse_mode": "HTML",
"appendAttribution": false,
"disable_notification": true
}
},
"credentials": {
"telegramApi": {
"id": "AtAlsXWrlRSRFpDS",
"name": "Twitter bot @horraybot"
}
},
"typeVersion": 1.2
},
{
"id": "6051ac01-ff4b-4c58-87a2-8979a54e34c1",
"name": "HTTP advanced search",
"type": "n8n-nodes-base.httpRequest",
"position": [
-544,
256
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/tweet/advanced_search",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "queryType",
"value": "Top"
},
{
"name": "query",
"value": "={{ $json.randomized_item }} + \" min_faves:20 min_replies:3 within_time:2d lang:en filter:blue_verified -filter:nativeretweets -filter:retweets\"}} "
}
]
}
},
"typeVersion": 4.2
},
{
"id": "229d2e30-eeab-4034-8405-5a9f854f437a",
"name": "HTTP community search",
"type": "n8n-nodes-base.httpRequest",
"position": [
-544,
32
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/community/tweets",
"options": {},
"jsonQuery": "={{ $json.toJsonString() }}",
"sendQuery": true,
"specifyQuery": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "3h740AAHAvubu5Pq",
"name": "twitterapi.io"
}
},
"typeVersion": 4.2
},
{
"id": "ff0bf675-e0e5-4083-8d06-696a60936730",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
-384,
160
],
"parameters": {
"options": {},
"fieldToSplitOut": "tweets"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"If": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
],
[
{
"node": "If5",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Find documents",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"If2": {
"main": [
[
{
"node": "Community filter",
"type": "main",
"index": 0
}
],
[
{
"node": "If5",
"type": "main",
"index": 0
}
]
]
},
"If3": {
"main": [
[
{
"node": "Send start execution",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing1",
"type": "main",
"index": 0
}
]
]
},
"If4": {
"main": [
[
{
"node": "Community search actor",
"type": "main",
"index": 0
}
],
[
{
"node": "Search keyword actor",
"type": "main",
"index": 0
}
]
]
},
"If5": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a scraping failure message",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Increment Failure Counter",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Set tweet data",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Text tweet, Set media to None",
"type": "main",
"index": 0
}
],
[
{
"node": "Analyze image",
"type": "main",
"index": 0
}
],
[
{
"node": "Analyze video",
"type": "main",
"index": 0
}
],
[
{
"node": "Analyze gif",
"type": "main",
"index": 0
}
]
]
},
"Aggregate1": {
"main": [
[
{
"node": "Keyword/Community List",
"type": "main",
"index": 0
}
]
]
},
"Aggregate2": {
"main": [
[
{
"node": "Execute Workflow1",
"type": "main",
"index": 0
}
]
]
},
"Analyze gif": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
],
[
{
"node": "Text tweet, Set media to None",
"type": "main",
"index": 0
}
]
]
},
"parse reply": {
"main": [
[
{
"node": "Insert documents",
"type": "main",
"index": 0
}
]
]
},
"Create Tweet": {
"main": [
[
{
"node": "Send a success reply",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a failed reply",
"type": "main",
"index": 0
}
]
]
},
"Analyze image": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
],
[
{
"node": "Text tweet, Set media to None",
"type": "main",
"index": 0
}
]
]
},
"Analyze video": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
],
[
{
"node": "Text tweet, Set media to None",
"type": "main",
"index": 0
}
]
]
},
"Find documents": {
"main": [
[
{
"node": "Aggregate1",
"type": "main",
"index": 0
}
]
]
},
"Set tweet data": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Create Tweet",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Aggregate2",
"type": "main",
"index": 0
}
],
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Community filter": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "If3",
"type": "main",
"index": 0
}
]
]
},
"Get dataset items": {
"main": [
[
{
"node": "If2",
"type": "main",
"index": 0
}
]
]
},
"modify tweet data": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Send a failed reply": {
"main": [
[
{
"node": "parse reply",
"type": "main",
"index": 0
}
]
]
},
"HTTP advanced search": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Search keyword actor": {
"main": [
[
{
"node": "Get dataset items",
"type": "main",
"index": 0
}
]
]
},
"Send a success reply": {
"main": [
[
{
"node": "parse reply",
"type": "main",
"index": 0
}
]
]
},
"Send start execution": {
"main": [
[
{
"node": "Find documents",
"type": "main",
"index": 0
}
]
]
},
"HTTP community search": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Community search actor": {
"main": [
[
{
"node": "Get dataset items",
"type": "main",
"index": 0
}
]
]
},
"Keyword/Community List": {
"main": [
[
{
"node": "Randomized community, keyword",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model1": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Basic LLM Chain",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Increment Failure Counter": {
"main": [
[
{
"node": "Keyword/Community List",
"type": "main",
"index": 0
}
]
]
},
"Randomized community, keyword": {
"main": [
[
{
"node": "If4",
"type": "main",
"index": 0
}
]
]
},
"Text tweet, Set media to None": {
"main": [
[
{
"node": "Set tweet data",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "modify tweet data",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Find documents",
"type": "main",
"index": 0
}
]
]
}
}
}