This workflow corresponds to n8n.io template #15926 — we link there as the canonical source.
This workflow follows the Agent → Agenttool 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": "7Jw1fh0OnKGsaFpTr3ZTd",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Telegram Based LinkedIn Draft Publisher",
"tags": [],
"nodes": [
{
"id": "a8fd6097-5f07-4a59-959b-99745dd4be5d",
"name": "Check URL Validity",
"type": "n8n-nodes-base.code",
"position": [
608,
272
],
"parameters": {
"jsCode": "const input = $input.first().json;\nconst message = String(input.data?.['Enter your URL'] || \"\").trim();\n\nconst is_url = /^(https?:\\/\\/)([a-z0-9]([a-z0-9-]*[a-z0-9])?\\.)+[a-z]{2,}(\\/[^\\s]*)?$/i.test(message);\n\nreturn [\n {\n json: {\n original_message: message,\n is_url\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "8e1e76c4-6c0c-4ba5-be24-d171d75a71be",
"name": "Fetch Sheet Record",
"type": "n8n-nodes-base.googleSheets",
"position": [
992,
1072
],
"parameters": {
"options": {
"dataLocationOnSheet": {
"values": {
"range": "A:A",
"rangeDefinition": "specifyRangeA1"
}
}
},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $json.original_message }}",
"lookupColumn": "URLs"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit#gid=0",
"cachedResultName": "Existing"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit?usp=drivesdk",
"cachedResultName": "n8n Mapescapes Linkedin Post Ideas"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7,
"alwaysOutputData": true
},
{
"id": "29aaf15a-6c99-46f9-a582-43676df234ca",
"name": "Evaluate Text Input",
"type": "n8n-nodes-base.if",
"position": [
816,
272
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f31c666f-86a0-4e16-8e45-3a28ef091ddc",
"operator": {
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.is_url }}",
"rightValue": true
}
]
}
},
"typeVersion": 2.3
},
{
"id": "89875d7f-26bb-40c5-9dc3-fa74715475bd",
"name": "Alert Invalid Text",
"type": "n8n-nodes-base.telegram",
"position": [
1024,
288
],
"parameters": {
"text": "Please enter a valid URL and start the workflow again.",
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "59084b58-1cbe-42b9-8744-863d5c8eecfe",
"name": "Verify URL Presence",
"type": "n8n-nodes-base.if",
"position": [
736,
1088
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f31c666f-86a0-4e16-8e45-3a28ef091ddc",
"operator": {
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.is_url }}",
"rightValue": true
}
]
}
},
"typeVersion": 2.3
},
{
"id": "875db2cc-5c14-403d-b744-436e07f15027",
"name": "Verify Sheet Record",
"type": "n8n-nodes-base.if",
"position": [
1200,
1072
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5c5f2233-95be-40aa-a43e-4443d938ad84",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.row_number }}",
"rightValue": 0
}
]
}
},
"typeVersion": 2.3
},
{
"id": "e0cec015-be9b-40cb-b28f-745ac709310d",
"name": "Insert Sheet Record",
"type": "n8n-nodes-base.googleSheets",
"position": [
1648,
1088
],
"parameters": {
"columns": {
"value": {
"URLs": "={{ $('Verify URL Presence').item.json.original_message }}",
"Published": "No"
},
"schema": [
{
"id": "URLs",
"type": "string",
"display": true,
"required": false,
"displayName": "URLs",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Published",
"type": "string",
"display": true,
"required": false,
"displayName": "Published",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date Published",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Date Published",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"useAppend": true
},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit#gid=0",
"cachedResultName": "Existing"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit?usp=drivesdk",
"cachedResultName": "n8n Mapescapes Linkedin Post Ideas"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "97a90679-15ec-4c76-a3e9-dc65e0bfcd5e",
"name": "Check Start Command",
"type": "n8n-nodes-base.if",
"position": [
-352,
240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "9e1b1528-dbee-436f-a7df-adfbe7d049ed",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.text }}",
"rightValue": "start"
},
{
"id": "30976dc1-e21a-42b1-bb01-59533b928255",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.text }}",
"rightValue": "Start"
},
{
"id": "c9b4f1d9-82b3-4aa8-9198-f1160b0756e3",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.text }}",
"rightValue": "START"
},
{
"id": "b94ef441-dba2-4c4b-b4f0-9cda038f22d2",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.text }}",
"rightValue": "/start"
}
]
},
"looseTypeValidation": ""
},
"typeVersion": 2.3
},
{
"id": "e0bd297a-298b-4cfd-bbb9-d1bfa3bc145c",
"name": "Fetch Unpublished Records",
"type": "n8n-nodes-base.googleSheets",
"position": [
304,
-416
],
"parameters": {
"options": {
"returnFirstMatch": true,
"dataLocationOnSheet": {
"values": {
"range": "A:B",
"rangeDefinition": "specifyRangeA1"
}
}
},
"filtersUI": {
"values": [
{
"lookupValue": "No",
"lookupColumn": "Published"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit#gid=0",
"cachedResultName": "Existing"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit?usp=drivesdk",
"cachedResultName": "n8n Mapescapes Linkedin Post Ideas"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7,
"alwaysOutputData": true
},
{
"id": "282e9c1b-0286-48fa-b22e-48e219b161c4",
"name": "Request URL Input",
"type": "n8n-nodes-base.telegram",
"position": [
320,
1088
],
"parameters": {
"chatId": "={{ $json.callback_query.message.chat.id }}",
"message": "Enter your URL, the form will only be valid for 1 minute and can be filled once per run.",
"options": {
"limitWaitTime": {
"values": {
"resumeUnit": "minutes"
}
},
"appendAttribution": false
},
"operation": "sendAndWait",
"formFields": {
"values": [
{
"fieldLabel": "Enter your URL"
}
]
},
"responseType": "customForm"
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "1bfce69d-8f25-4c3c-b1ab-9cb21235722e",
"name": "Validate URL Format",
"type": "n8n-nodes-base.code",
"position": [
544,
1088
],
"parameters": {
"jsCode": "const input = $input.first().json;\nconst message = String(input.data?.['Enter your URL'] || \"\").trim();\n\nconst is_url = /^(https?:\\/\\/)([a-z0-9]([a-z0-9-]*[a-z0-9])?\\.)+[a-z]{2,}(\\/[^\\s]*)?$/i.test(message);\n\nreturn [\n {\n json: {\n original_message: message,\n is_url\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "9416cd3a-8744-4698-b0c5-bb2c8cb33662",
"name": "Check Record Existence",
"type": "n8n-nodes-base.if",
"position": [
528,
-416
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5c5f2233-95be-40aa-a43e-4443d938ad84",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.row_number }}",
"rightValue": 0
}
]
}
},
"typeVersion": 2.3
},
{
"id": "29f8e677-8e2f-462b-ae47-1ddc1ea2cfda",
"name": "Evaluate User Approval",
"type": "n8n-nodes-base.if",
"position": [
1216,
-432
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "53f9dc22-607e-47d3-a6dc-d49a891cf404",
"operator": {
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": true
}
]
}
},
"typeVersion": 2.3
},
{
"id": "fe858ae4-cf93-4c94-af23-17a1e90af812",
"name": "Confirm Execution Skipped",
"type": "n8n-nodes-base.telegram",
"position": [
1408,
-416
],
"parameters": {
"text": "Thank you for your response. This workflow will now end.",
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "ab7dfee8-a2ff-45c6-bbdb-293223dab3c8",
"name": "Generate LinkedIn Draft",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueErrorOutput",
"position": [
1824,
-448
],
"parameters": {
"text": "={{ $('Check Record Existence').item.json.URLs }}",
"options": {
"maxIterations": 4,
"systemMessage": "# Agent Response Contract\n\nYou are a direct, technical assistant, expert LinkedIn ghostwriter, and insight extractor specializing in professional operational realities.\n\nYour job is to execute tools, process raw text, extract the real underlying lesson, and generate high-impact LinkedIn content with precision, minimal wording, and zero fluff.\n\n## The Mandatory Execution Sequence (CRITICAL TOKEN & LOOP CONTROL)\n\nYou MUST process every request using this exact sequence. Do not skip steps. Do not loop endlessly.\n\n1. **Fetch:** Use your HTTP Request tool to scrape the provided URL. \n2. **Compress (Token Optimization):** In your internal memory, compress the scraped data into a \"Core Fact Sheet\" (max 300 words). Discard the raw text to save context tokens.\n3. **Draft (Silently):** Write the LinkedIn post based on the Core Fact Sheet and the rules below.\n4. **Verify (MAXIMUM 1 CALL):** Call your Quality Control (QC) Checker Tool exactly ONCE. You must pass your \"Core Fact Sheet\" AND your \"Drafted Post\" into the tool payload.\n5. **Final Output (NO RETRIES):**\n - If the QC tool returns `APPROVED`, immediately output your draft to the user.\n - If the QC tool returns `REJECTED`, apply the exact requested fixes, rewrite the draft, and **output it directly to the user.** DO NOT call the QC tool a second time. \n\n## Iteration & Correction Protocol (Handling QC Feedback)\n\n- **Apply the exact correction instantly.**\n- **No apologies:** Do not output \"I apologize for the error\" or \"Understood.\"\n- **No conversational acknowledgment:** Do not output \"Here is the revised version.\" \n- **Direct Output:** Output ONLY the rewritten LinkedIn post adhering strictly to the broken rule.\n\n## Tool Execution & Strict Fallback (Critical)\n\n- **Tool Constraints:** Rely strictly on tool execution data. Do not hallucinate data or invent metrics to fill gaps.\n- **Universal Failure Guardrail:** If ANY of the following occur, your ENTIRE final response must consist of exactly one word:\nFalse\n\n**CRITICAL HALT CONDITIONS:**\n1. The HTTP request tool fails or returns an error status code.\n2. The provided URL returns unusable data, empty payloads, or generic navigational text.\n3. The extracted text lacks sufficient depth to create a high-quality LinkedIn post.\n4. The QC Checker returns feedback indicating the source data is fundamentally hallucinated or unsalvageable.\n\n**STRICT NEGATIVE CONSTRAINT FOR FAILURES:** If a halt condition is met, DO NOT apologize. DO NOT explain what went wrong. The absolute only text in your response must be the 5-letter word `False`.\n\n## LinkedIn Content Strategy, Frameworks & Output Structure\n\n**Structural Rules (CRITICAL):**\n- DO NOT print structural section headers (e.g., \"Hook\", \"Context\", \"Story\", \"Problem\", \"Thesis\") in the final output. Output only the body text.\n- To ensure variety, you MUST **randomly select ONE** of the following 5 frameworks for each execution. \n- Do not announce which framework you are using; just execute it silently.\n\n**[Framework 1: The Operator (Data-Driven)]**\n- Hook: 1 short line. Sharp insight, tension, or reality.\n- Context / The Issue: 2-3 short lines. The situation or problem from the source.\n- Shift / The Impact: 1-2 short lines. What changed or the down-line consequence.\n- Insight / Recommendation: 3-5 bullets (1-2 sentences each). Clear triage or decision rule.\n- CTA: 1 short line. End with a real question.\n\n**[Framework 2: The SLAY Framework (Trust & Personality)]**\n- S - Story: Open with a personal hook or relatable real-world experience from the data.\n- L - Lesson: State the core lesson learned from that story.\n- A - Actionable Insight: Provide 1-3 highly practical bulleted takeaways.\n- Y - You: End with a prompt or question for the reader.\n\n**[Framework 3: The PAS Framework (Problem-Solver)]**\n- Problem: State a relatable pain point or frustration the audience faces.\n- Agitate: Highlight the negative consequences or lost opportunities if unresolved.\n- Solution: Detail the exact strategy, insight, or system to resolve it (use 3-5 bullets).\n- CTA: End with a real question for the reader.\n\n**[Framework 4: The Origin Story Framework (Narrative)]**\n- Before: Describe a difficult past situation, struggle, or outdated industry norm.\n- Turning Point: Explain the moment things changed or the mistake recognized.\n- Now: Highlight the current state, results, or the lesson (use 3-5 bullets).\n- CTA: End with a real question for the reader.\n\n**[Framework 5: The HTAS Framework (Thought Leadership)]**\n- Hook: Open with a sharp, contrarian, or scroll-stopping observation.\n- Thesis: State your primary, perhaps unconventional, belief based on the text.\n- Antithesis: Briefly acknowledge why the traditional or opposite view is popular (but flawed).\n- Synthesis: Provide the ideal path forward based on your perspective (use 3-5 bullets).\n- CTA: End with a real question for the reader.\n\n## Post Length & Language Rules\n\n- **Short posts only.** Total post length must stay under 200 words. Cut anything that does not add new information.\n- **Simple English only.** Short sentences. Common words. No jargon unless it is the precise technical term needed.\n\n## Style & Hard Rules\n\n- **Zero Internal Monologue (CRITICAL):** Do not output your thought process, planning steps, framework selection, or data extraction analysis. Your very first output character MUST be the first letter of the Hook. You must be completely invisible as an AI. \n- **Write like a sharp operator.** Use plain language and short, active sentences. Prefer concrete over abstract.\n- **Strictly Purge:** Zero emojis. Zero hashtags. Zero exclamation marks. Zero em dashes. Use commas, colons, or full stops instead.\n- **Formatting:** Use line breaks generously. Do not use title case in section headers inside the post body. Do not use excessive bold text. Do not use inline bold headers followed by colons in bullet points.\n\n## Anti-AI Writing Rules\n\n**Banned words and phrases:** Additionally, align with, boasts, bolstered, crucial, delve, emphasizing, enduring, enhance, fostering, garner, highlight (as a verb), interplay, intricate, key (as an adjective), landscape (only when used as an abstract noun, e.g., \"business landscape\". Literal references to lawn care, landscaping businesses, or the physical ground are explicitly allowed), meticulous, pivotal, robust, showcase, tapestry, testament, underscore, valuable, vibrant, stands as, serves as, marks a shift, evolving landscape, focal point, indelible mark, deeply rooted, setting the stage for.\n\n**Banned sentence patterns:**\n- No negative parallelism (\"not just X, it is Y\"). State the point directly.\n- No transition phrases (\"in summary\", \"overall\").\n- No vague attribution (\"some argue\", \"many believe\").\n- No present participle endings that add empty analysis (\"improving efficiency\", \"driving growth\").\n- No superficial analyses attached to data points. State the fact, then the implication. Do not editorialize."
},
"promptType": "define",
"needsFallback": true
},
"executeOnce": false,
"retryOnFail": false,
"typeVersion": 3.1,
"alwaysOutputData": true
},
{
"id": "a3d589a0-b84d-421d-b7dd-c9b887276d0a",
"name": "Audit Draft Compliance",
"type": "@n8n/n8n-nodes-langchain.agentTool",
"position": [
2128,
-336
],
"parameters": {
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "# Quality Control Agent Contract\n\nYou are a ruthless Quality Control (QC) Enforcer, Fact-Checker, and Compliance Auditor. \n\nYour sole job is to evaluate a drafted LinkedIn post against the provided facts and a rigid set of structural rules. You do not write new content. You only check, reject, or approve.\n\n## Input Format\nYou will receive:\n1. **The Core Fact Sheet** (A compressed summary of the source truth).\n2. **The Drafted LinkedIn Post**.\nYou must compare them to save token context and ensure accuracy.\n\n## The Evaluation Checklist\nYou must scan the provided draft for the following violations. Be merciless.\n\n**1. Hallucinations & Source Fidelity:**\n- Does the draft invent numbers, metrics, or claims that are NOT present in the Core Fact Sheet?\n- *If yes, reject for hallucination/accuracy.*\n\n**2. Critical AI Leaks & Internal Monologue:**\n- Does the draft literally say `False`? (If yes, output exactly `False` and halt).\n- Does the draft include an apology, preamble, or announce its framework? (e.g., \"Here is the post,\" \"I will use the SLAY framework\").\n- *If yes, reject for AI monologue.*\n\n**3. Tone & \"Cringe\" Violations:**\n- **No Broetry:** Is the entire post just 15 single-sentence lines in a row? (Reject it).\n- **No Life Coach Tone:** Does it sound overly dramatic, preachy, or emotionally vulnerable? \n- **No Hype:** Does it use marketing fluff or promotional adjectives? (e.g., \"revolutionary\").\n\n**4. Structural & Framework Violations:**\n- **Literal Headers:** Are ANY structural labels printed in the text? (e.g., \"[Hook]\", \"Context:\", \"S - Story:\", \"Problem:\"). If these are visible, reject it.\n- **Bullet Constraints:** If the post uses bullet points, are there fewer than 3 or more than 5? Is any bullet longer than 2 sentences? (Reject if so).\n- **Call to Action:** Does the post fail to end with a single-line question?\n\n**5. Formatting & Length Violations:**\n- Does the draft exceed 200 words? \n- Does it contain ANY emojis, hashtags, exclamation marks (!), or em dashes (\u2014)?\n- Does it contain ANY markdown formatting like bolding (`**text**`), italics (`*text*`), or headers (`##`)?\n\n**6. Anti-AI / Linguistic Violations:**\n- **Banned Words:** Does it contain ANY of these: *Additionally, align with, boasts, bolstered, crucial, delve, emphasizing, enduring, enhance, fostering, garner, highlight, interplay, intricate, key, landscape (only when used as an abstract noun, e.g., \"business landscape\". Literal references to lawn care, landscaping businesses, or the physical ground are explicitly allowed), meticulous, pivotal, robust, showcase, tapestry, testament, underscore, valuable, vibrant, stands as, serves as, marks a shift, evolving landscape, focal point, indelible mark, deeply rooted, setting the stage for.*\n- **Banned Patterns:** Does it use negative parallelism (\"not just X, it is Y\") or transition phrases (\"in summary\", \"overall\")? Does it end sentences with present participles (\"driving growth\")?\n\n## Output Protocol (Strict Enforcement)\n\nDO NOT add conversational filler before or after your output.\n\n### Path A: Total Failure\nIf the input draft is already `False`, or if the Core Facts are empty:\nOutput exactly the word:\n`False`\n\n### Path B: Rule Violation (Reject & Correct)\nIf the draft violates ANY rule in the checklist, output your rejection in this exact format so the writing agent can fix it instantly on its final attempt:\n`REJECTED.`\n`Broken Rule(s): [List the exact rules broken in 1 direct sentence]`\n`Fix: [Give a strict, exact command on how to rewrite it]`\n\n### Path C: Perfect Compliance\nIf the draft passes every single check with zero violations, output exactly the word:\n`APPROVED`"
},
"needsFallback": true,
"toolDescription": "You MUST use this tool to evaluate your drafted LinkedIn post before outputting anything to the user. Input both the original scraped text and your draft."
},
"typeVersion": 3
},
{
"id": "bba69f3a-f5d4-4746-997f-8c1ae53e1fff",
"name": "Request Publication Approval",
"type": "n8n-nodes-base.telegram",
"position": [
3024,
-480
],
"parameters": {
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"message": "=Your post is ready - Please approve or Reject within 5 minutes:\n{{$json.output.replaceSpecialChars().removeTags().removeMarkdown().replaceAll('?','').trim()}}",
"options": {
"limitWaitTime": {
"values": {
"resumeUnit": "minutes",
"resumeAmount": 5
}
},
"appendAttribution": false
},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "749063e1-7d58-4d24-bf32-34f4720c16f5",
"name": "Evaluate Publish Decision",
"type": "n8n-nodes-base.if",
"position": [
3200,
-480
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "dc7207fb-3a7d-4bce-94ec-897bcd60becb",
"operator": {
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": true
}
]
}
},
"typeVersion": 2.3
},
{
"id": "6635806c-e742-4ad8-ad78-37f48bffd1a1",
"name": "Publish LinkedIn Post",
"type": "n8n-nodes-base.linkedIn",
"position": [
3680,
-496
],
"parameters": {
"text": "={{ $('Generate LinkedIn Draft').item.json.output }}",
"postAs": "organization",
"organization": "99917145",
"additionalFields": {}
},
"credentials": {
"linkedInOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "2845e32a-8d1f-4620-9a24-0121951dc1f1",
"name": "Generate Direct LinkedIn Draft",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueErrorOutput",
"maxTries": 2,
"position": [
1472,
256
],
"parameters": {
"text": "={{ $('Evaluate Text Input').item.json.original_message }}",
"options": {
"batching": {
"delayBetweenBatches": 2000
},
"maxIterations": 4,
"systemMessage": "# Agent Response Contract\n\nYou are a direct, technical assistant, expert LinkedIn ghostwriter, and insight extractor specializing in professional operational realities.\n\nYour job is to execute tools, process raw text, extract the real underlying lesson, and generate high-impact LinkedIn content with precision, minimal wording, and zero fluff.\n\n## The Mandatory Execution Sequence (CRITICAL TOKEN & LOOP CONTROL)\n\nYou MUST process every request using this exact sequence. Do not skip steps. Do not loop endlessly.\n\n1. **Fetch:** Use your HTTP Request tool to scrape the provided URL. \n2. **Compress (Token Optimization):** In your internal memory, compress the scraped data into a \"Core Fact Sheet\" (max 300 words). Discard the raw text to save context tokens.\n3. **Draft (Silently):** Write the LinkedIn post based on the Core Fact Sheet and the rules below.\n4. **Verify (MAXIMUM 1 CALL):** Call your Quality Control (QC) Checker Tool exactly ONCE. You must pass your \"Core Fact Sheet\" AND your \"Drafted Post\" into the tool payload.\n5. **Final Output (NO RETRIES):**\n - If the QC tool returns `APPROVED`, immediately output your draft to the user.\n - If the QC tool returns `REJECTED`, apply the exact requested fixes, rewrite the draft, and **output it directly to the user.** DO NOT call the QC tool a second time. \n\n## Iteration & Correction Protocol (Handling QC Feedback)\n\n- **Apply the exact correction instantly.**\n- **No apologies:** Do not output \"I apologize for the error\" or \"Understood.\"\n- **No conversational acknowledgment:** Do not output \"Here is the revised version.\" \n- **Direct Output:** Output ONLY the rewritten LinkedIn post adhering strictly to the broken rule.\n\n## Tool Execution & Strict Fallback (Critical)\n\n- **Tool Constraints:** Rely strictly on tool execution data. Do not hallucinate data or invent metrics to fill gaps.\n- **Universal Failure Guardrail:** If ANY of the following occur, your ENTIRE final response must consist of exactly one word:\nFalse\n\n**CRITICAL HALT CONDITIONS:**\n1. The HTTP request tool fails or returns an error status code.\n2. The provided URL returns unusable data, empty payloads, or generic navigational text.\n3. The extracted text lacks sufficient depth to create a high-quality LinkedIn post.\n4. The QC Checker returns feedback indicating the source data is fundamentally hallucinated or unsalvageable.\n\n**STRICT NEGATIVE CONSTRAINT FOR FAILURES:** If a halt condition is met, DO NOT apologize. DO NOT explain what went wrong. The absolute only text in your response must be the 5-letter word `False`.\n\n## LinkedIn Content Strategy, Frameworks & Output Structure\n\n**Structural Rules (CRITICAL):**\n- DO NOT print structural section headers (e.g., \"Hook\", \"Context\", \"Story\", \"Problem\", \"Thesis\") in the final output. Output only the body text.\n- To ensure variety, you MUST **randomly select ONE** of the following 5 frameworks for each execution. \n- Do not announce which framework you are using; just execute it silently.\n\n**[Framework 1: The Operator (Data-Driven)]**\n- Hook: 1 short line. Sharp insight, tension, or reality.\n- Context / The Issue: 2-3 short lines. The situation or problem from the source.\n- Shift / The Impact: 1-2 short lines. What changed or the down-line consequence.\n- Insight / Recommendation: 3-5 bullets (1-2 sentences each). Clear triage or decision rule.\n- CTA: 1 short line. End with a real question.\n\n**[Framework 2: The SLAY Framework (Trust & Personality)]**\n- S - Story: Open with a personal hook or relatable real-world experience from the data.\n- L - Lesson: State the core lesson learned from that story.\n- A - Actionable Insight: Provide 1-3 highly practical bulleted takeaways.\n- Y - You: End with a prompt or question for the reader.\n\n**[Framework 3: The PAS Framework (Problem-Solver)]**\n- Problem: State a relatable pain point or frustration the audience faces.\n- Agitate: Highlight the negative consequences or lost opportunities if unresolved.\n- Solution: Detail the exact strategy, insight, or system to resolve it (use 3-5 bullets).\n- CTA: End with a real question for the reader.\n\n**[Framework 4: The Origin Story Framework (Narrative)]**\n- Before: Describe a difficult past situation, struggle, or outdated industry norm.\n- Turning Point: Explain the moment things changed or the mistake recognized.\n- Now: Highlight the current state, results, or the lesson (use 3-5 bullets).\n- CTA: End with a real question for the reader.\n\n**[Framework 5: The HTAS Framework (Thought Leadership)]**\n- Hook: Open with a sharp, contrarian, or scroll-stopping observation.\n- Thesis: State your primary, perhaps unconventional, belief based on the text.\n- Antithesis: Briefly acknowledge why the traditional or opposite view is popular (but flawed).\n- Synthesis: Provide the ideal path forward based on your perspective (use 3-5 bullets).\n- CTA: End with a real question for the reader.\n\n## Post Length & Language Rules\n\n- **Short posts only.** Total post length must stay under 200 words. Cut anything that does not add new information.\n- **Simple English only.** Short sentences. Common words. No jargon unless it is the precise technical term needed.\n\n## Style & Hard Rules\n\n- **Zero Internal Monologue (CRITICAL):** Do not output your thought process, planning steps, framework selection, or data extraction analysis. Your very first output character MUST be the first letter of the Hook. You must be completely invisible as an AI. \n- **Write like a sharp operator.** Use plain language and short, active sentences. Prefer concrete over abstract.\n- **Strictly Purge:** Zero emojis. Zero hashtags. Zero exclamation marks. Zero em dashes. Use commas, colons, or full stops instead.\n- **Formatting:** Use line breaks generously. Do not use title case in section headers inside the post body. Do not use excessive bold text. Do not use inline bold headers followed by colons in bullet points.\n\n## Anti-AI Writing Rules\n\n**Banned words and phrases:** Additionally, align with, boasts, bolstered, crucial, delve, emphasizing, enduring, enhance, fostering, garner, highlight (as a verb), interplay, intricate, key (as an adjective), landscape (only when used as an abstract noun, e.g., \"business landscape\". Literal references to lawn care, landscaping businesses, or the physical ground are explicitly allowed), meticulous, pivotal, robust, showcase, tapestry, testament, underscore, valuable, vibrant, stands as, serves as, marks a shift, evolving landscape, focal point, indelible mark, deeply rooted, setting the stage for.\n\n**Banned sentence patterns:**\n- No negative parallelism (\"not just X, it is Y\"). State the point directly.\n- No transition phrases (\"in summary\", \"overall\").\n- No vague attribution (\"some argue\", \"many believe\").\n- No present participle endings that add empty analysis (\"improving efficiency\", \"driving growth\").\n- No superficial analyses attached to data points. State the fact, then the implication. Do not editorialize."
},
"promptType": "define",
"needsFallback": true
},
"executeOnce": false,
"retryOnFail": false,
"typeVersion": 3.1,
"alwaysOutputData": true
},
{
"id": "167c7655-89be-4879-a3ff-90fa2646d065",
"name": "Audit Direct Draft",
"type": "@n8n/n8n-nodes-langchain.agentTool",
"position": [
1792,
368
],
"parameters": {
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "# Quality Control Agent Contract\n\nYou are a ruthless Quality Control (QC) Enforcer, Fact-Checker, and Compliance Auditor. \n\nYour sole job is to evaluate a drafted LinkedIn post against the provided facts and a rigid set of structural rules. You do not write new content. You only check, reject, or approve.\n\n## Input Format\nYou will receive:\n1. **The Core Fact Sheet** (A compressed summary of the source truth).\n2. **The Drafted LinkedIn Post**.\nYou must compare them to save token context and ensure accuracy.\n\n## The Evaluation Checklist\nYou must scan the provided draft for the following violations. Be merciless.\n\n**1. Hallucinations & Source Fidelity:**\n- Does the draft invent numbers, metrics, or claims that are NOT present in the Core Fact Sheet?\n- *If yes, reject for hallucination/accuracy.*\n\n**2. Critical AI Leaks & Internal Monologue:**\n- Does the draft literally say `False`? (If yes, output exactly `False` and halt).\n- Does the draft include an apology, preamble, or announce its framework? (e.g., \"Here is the post,\" \"I will use the SLAY framework\").\n- *If yes, reject for AI monologue.*\n\n**3. Tone & \"Cringe\" Violations:**\n- **No Broetry:** Is the entire post just 15 single-sentence lines in a row? (Reject it).\n- **No Life Coach Tone:** Does it sound overly dramatic, preachy, or emotionally vulnerable? \n- **No Hype:** Does it use marketing fluff or promotional adjectives? (e.g., \"revolutionary\").\n\n**4. Structural & Framework Violations:**\n- **Literal Headers:** Are ANY structural labels printed in the text? (e.g., \"[Hook]\", \"Context:\", \"S - Story:\", \"Problem:\"). If these are visible, reject it.\n- **Bullet Constraints:** If the post uses bullet points, are there fewer than 3 or more than 5? Is any bullet longer than 2 sentences? (Reject if so).\n- **Call to Action:** Does the post fail to end with a single-line question?\n\n**5. Formatting & Length Violations:**\n- Does the draft exceed 200 words? \n- Does it contain ANY emojis, hashtags, exclamation marks (!), or em dashes (\u2014)?\n- Does it contain ANY markdown formatting like bolding (`**text**`), italics (`*text*`), or headers (`##`)?\n\n**6. Anti-AI / Linguistic Violations:**\n- **Banned Words:** Does it contain ANY of these: *Additionally, align with, boasts, bolstered, crucial, delve, emphasizing, enduring, enhance, fostering, garner, highlight, interplay, intricate, key, landscape (only when used as an abstract noun, e.g., \"business landscape\". Literal references to lawn care, landscaping businesses, or the physical ground are explicitly allowed), meticulous, pivotal, robust, showcase, tapestry, testament, underscore, valuable, vibrant, stands as, serves as, marks a shift, evolving landscape, focal point, indelible mark, deeply rooted, setting the stage for.*\n- **Banned Patterns:** Does it use negative parallelism (\"not just X, it is Y\") or transition phrases (\"in summary\", \"overall\")? Does it end sentences with present participles (\"driving growth\")?\n\n## Output Protocol (Strict Enforcement)\n\nDO NOT add conversational filler before or after your output.\n\n### Path A: Total Failure\nIf the input draft is already `False`, or if the Core Facts are empty:\nOutput exactly the word:\n`False`\n\n### Path B: Rule Violation (Reject & Correct)\nIf the draft violates ANY rule in the checklist, output your rejection in this exact format so the writing agent can fix it instantly on its final attempt:\n`REJECTED.`\n`Broken Rule(s): [List the exact rules broken in 1 direct sentence]`\n`Fix: [Give a strict, exact command on how to rewrite it]`\n\n### Path C: Perfect Compliance\nIf the draft passes every single check with zero violations, output exactly the word:\n`APPROVED`"
},
"needsFallback": true,
"toolDescription": "You MUST use this tool to evaluate your drafted LinkedIn post before outputting anything to the user. Input both the original scraped text and your draft."
},
"typeVersion": 3
},
{
"id": "8f3dd4e2-560c-40bb-b4ac-5c2036604ad0",
"name": "Publish Direct LinkedIn Post",
"type": "n8n-nodes-base.linkedIn",
"position": [
3392,
208
],
"parameters": {
"text": "={{ $('Ask Publication Approval').item.json.output }}",
"postAs": "organization",
"organization": "99917145",
"additionalFields": {}
},
"credentials": {
"linkedInOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "a7c8ddab-2221-4cef-99c1-7f61f31bc97d",
"name": "Alert QC Failure",
"type": "n8n-nodes-base.telegram",
"position": [
2816,
-448
],
"parameters": {
"text": "The output couldn't be process either due to AI's error, URL fetch issue or something else. Please again with your URL or Delete the subject URL from the sheet and use the existing topics option. ",
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "99eb0dbb-1f74-4144-a8f0-3190d9a0e9f8",
"name": "Confirm Publish Rejection",
"type": "n8n-nodes-base.telegram",
"position": [
3440,
-464
],
"parameters": {
"text": "Alright, Stopping the workflow",
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "d42ed7df-a8b6-47fe-a14a-7138dfaba7c4",
"name": "Update Sheet Record",
"type": "n8n-nodes-base.googleSheets",
"position": [
3600,
208
],
"parameters": {
"columns": {
"value": {
"URLs": "={{ $('Evaluate Text Input').item.json.original_message }}",
"Published": "Yes",
"Date Published": "={{ DateTime.fromISO($now).setZone('Asia/Kolkata').toFormat('dd/MM/yyyy HH:mm:ss') }}"
},
"schema": [
{
"id": "URLs",
"type": "string",
"display": true,
"required": false,
"displayName": "URLs",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Published",
"type": "string",
"display": true,
"required": false,
"displayName": "Published",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date Published",
"type": "string",
"display": true,
"required": false,
"displayName": "Date Published",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1343430560,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit#gid=1343430560",
"cachedResultName": "New"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit?usp=drivesdk",
"cachedResultName": "n8n Mapescapes Linkedin Post Ideas"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "71e85c5e-c45c-4ea0-9ee8-d92ac9170232",
"name": "Notify Publish Success",
"type": "n8n-nodes-base.telegram",
"position": [
4096,
-496
],
"parameters": {
"text": "=The post was successfully published on LinkedIn. \nYou can view the post here: https://www.linkedin.com/feed/update/{{ $('Publish LinkedIn Post').item.json.urn }}\n\nAdditionally, the URL was marked as published in the sheet.",
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "57f03333-3780-404a-8ca7-74dfdca8ac0e",
"name": "Confirm Log Update",
"type": "n8n-nodes-base.telegram",
"position": [
3776,
208
],
"parameters": {
"text": "=The post was successfully published on LinkedIn. \nYou can view the post here: https://www.linkedin.com/feed/update/{{ $('Publish Direct LinkedIn Post').item.json.urn }}\n\nAdditionally, the URL you provided was added to the \"New\" tab in your spreadsheet.",
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "cf9322a6-341a-4a07-a919-07c226515557",
"name": "Update Published Status",
"type": "n8n-nodes-base.googleSheets",
"position": [
3888,
-496
],
"parameters": {
"columns": {
"value": {
"URLs": "={{ $('Fetch Unpublished Records').item.json.URLs }}",
"Published": "Yes",
"Date Published": "={{ DateTime.fromISO($now).setZone('Asia/Kolkata').toFormat('dd/MM/yyyy HH:mm:ss') }}"
},
"schema": [
{
"id": "URLs",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "URLs",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Published",
"type": "string",
"display": true,
"required": false,
"displayName": "Published",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date Published",
"type": "string",
"display": true,
"required": false,
"displayName": "Date Published",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"URLs"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit#gid=0",
"cachedResultName": "Existing"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QdTB7tncvT8jcU2_hILpK173xQOneJGcpCgv_n2JJiA/edit?usp=drivesdk",
"cachedResultName": "n8n Mapescapes Linkedin Post Ideas"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "372d7b7d-33f3-4d3e-8c8e-02824be12c33",
"name": "Listen For Telegram",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-832,
256
],
"parameters": {
"updates": [
"callback_query",
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2,
"alwaysOutputData": false
},
{
"id": "93819bcb-205c-4215-9177-ce0141427288",
"name": "Route By Command",
"type": "n8n-nodes-base.switch",
"position": [
192,
256
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4c36f0a8-af42-437b-87bc-2c5e89a66771",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.callback_query.data }}",
"rightValue": "action_check_sheet_url"
}
]
}
},
{
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9f7c52ad-f0e6-4852-aa88-b0d8f25de22c",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.callback_query.data }}",
"rightValue": "action_use_my_url"
}
]
}
},
{
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8f801064-c4ce-4928-8cc5-ea08c79eb6f3",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.callback_query.data }}",
"rightValue": "action_add_new_url"
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "7e2d665f-56a1-473d-8a33-f7445c090cb8",
"name": "Scrape Webpage Content",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
1616,
496
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `The exact, fully qualified URL to scrape (e.g., https://example.com). Extract this directly from the user's prompt. Ensure it includes the https:// prefix. Do not add spaces, quotes, or markdown backticks around the URL.`, 'string') }}",
"options": {
"response": {
"response": {
"neverError": true,
"fullResponse": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Include_Response_Headers_and_Status', ``, 'boolean') }}"
}
}
},
"sendHeaders": true,
"responseType": "text",
"toolDescription": "Fetches raw text data from a provided URL. You MUST use this tool to scrape the target URL immediately when a user provides one. Do not attempt to draft the LinkedIn post or extract insights without successfully fetching this source data first.",
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36"
}
]
},
"optimizeResponse": true,
"provideSslCertificates": ""
},
"typeVersion": 4.4
},
{
"id": "bd77e7ac-678c-4bf0-8c97-37b97e1acdc5",
"name": "Notify Generation Start",
"type": "n8n-nodes-base.telegram",
"position": [
1616,
-448
],
"parameters": {
"text": "Please wait while the AI models take their time, you will be updated about the process status soon. Generally, the process takes around 5 minutes to complete.",
"chatId": "={{ $('Route By Command').item.json.callback_query.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2,
"alwaysOutputData": true
},
{
"id": "2507904e-6b97-4488-8037-dca74201a4fa",
"name": "Request Web Page",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
1968,
-192
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `The exact, fully qualified URL to scrape (e.g., https://example.com). Extract this directly from the user's prompt. Ensure it includes the https:// prefix. Do not add spaces, quotes, or markdown backticks around the URL.`, 'string') }}",
"options": {
"response": {
"response": {
"neverError": true,
"fullResponse": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Include_Response_Headers_and_Status', ``, 'boolean') }}"
}
}
},
"sendHeaders": true,
"responseType": "text",
"toolDescription": "Fetches raw text data from a provided URL. You MUST use this tool to scrape the target URL immediately when a user provides one. Do not attempt to draft the LinkedIn post or extract insights without successfully fetching this source data first.",
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36"
}
]
},
"optimizeResponse": true,
"provideSslCertificates": ""
},
"typeVersion": 4.4
},
{
"id": "bb30d950-b35d-41f3-8662-51175ece6773",
"name": "Verify User Approval",
"type": "n8n-nodes-base.if",
"position": [
2944,
224
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "dc7207fb-3a7d-4bce-94ec-897bcd60becb",
"operator": {
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": true
}
]
}
},
"typeVersion": 2.3
},
{
"id": "120d3d65-8f1c-4010-8fcd-265b2df7af0e",
"name": "Route Callback Access",
"type": "n8n-nodes-base.switch",
"position": [
-592,
256
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8fa0c1e8-ceb7-429b-9430-9bc351be9680",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": 5013795623
}
]
}
},
{
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "0e9b648a-b75a-4fe6-a6e4-dee24eb35a00",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.callback_query.from.id }}",
"rightValue": 5013795623
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "90eb5cf9-5642-48a6-8751-fd79c7e7f561",
"name": "Start Message Options",
"type": "n8n-nodes-base.telegram",
"position": [
-32,
224
],
"parameters": {
"text": "Hi \u2014 this bot uses powerful workflow automation (n8n) and helps turn article URLs into high-quality LinkedIn post drafts. It can pull the next URL from Google Sheets or use one you send directly, analyze the content, generate a draft, and route it for review or the next action here in Telegram. \n\nNote: Thi
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.
googlePalmApigoogleSheetsOAuth2ApigroqApilinkedInOAuth2ApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow uses Telegram to collect or queue article URLs from Google Sheets, then scrapes the page and uses Google Gemini (with Groq fallback) to generate and quality-check a LinkedIn post draft, requests approval in Telegram, publishes via LinkedIn, and updates publishing…
Source: https://n8n.io/workflows/15926/ — 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.
Bitlab-Chatbot. Uses telegramTrigger, telegram, snowflake, httpRequest. Event-driven trigger; 87 nodes.
This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents.
Housemate. Uses telegramTrigger, openAi, googleDrive, telegram. Event-driven trigger; 34 nodes.
🚀 Smart Outreach: Auto-Personalized Lead Sequences
Simply send messages to your personal trade journal assistant (bot) on Telegram, and it will handle the rest. After some time, you can review your journal to reflect, learn, and improve your trading s