Created
June 1, 2025 14:55
-
-
Save paoloanzn/6a2dc04edf345bd413168a47d46980eb to your computer and use it in GitHub Desktop.
Ghostwriter-Agent.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Ghostwriter Agent", | |
"nodes": [ | |
{ | |
"parameters": { | |
"updates": [ | |
"message" | |
], | |
"additionalFields": { | |
"chatIds": "7558641202" | |
} | |
}, | |
"type": "n8n-nodes-base.telegramTrigger", | |
"typeVersion": 1.2, | |
"position": [ | |
-1400, | |
120 | |
], | |
"id": "94cfc72b-b37d-4b95-a758-02d6796648c1", | |
"name": "Telegram Trigger", | |
"webhookId": "54082385-f044-49cc-9c50-86ff69e555dc", | |
"credentials": { | |
"telegramApi": { | |
"id": "GkIBeM0cQICtGE13", | |
"name": "Telegram account" | |
} | |
} | |
}, | |
{ | |
"parameters": { | |
"modelId": { | |
"__rl": true, | |
"value": "gpt-4.1-mini", | |
"mode": "list", | |
"cachedResultName": "GPT-4.1-MINI" | |
}, | |
"messages": { | |
"values": [ | |
{ | |
"content": "=### INSTRUCTIONS\nGiven the following text message from the user determine if the user is asking the assistant to create a post.\n\nTips to recognize post creation request:\n- If the user starts the message with \"create a post\" or \"make a post\" or \"lets create something\" or \"lets draft\" something\n\nGenerally check if user asks you to create a post/content.\n\nFORMAT THE OUTPUT LIKE THE FOLLOWING JSON OBJECT:\n```json\n{\n \"shouldCreatePost\": \"true | false\"\n}\n```\n\nOUPUT ONLY THIS EXACT JSON OBJECT, NOTHING ELSE.\n\n### USER TEXT MESSASAGE\n{{ $('Telegram Trigger').item.json.message.text }}" | |
} | |
] | |
}, | |
"jsonOutput": true, | |
"options": { | |
"temperature": 0.4 | |
} | |
}, | |
"type": "@n8n/n8n-nodes-langchain.openAi", | |
"typeVersion": 1.8, | |
"position": [ | |
-720, | |
-40 | |
], | |
"id": "0cf7cff7-95b5-4191-9770-b19c458fa62c", | |
"name": "OpenAI", | |
"credentials": { | |
"openAiApi": { | |
"id": "Z3R8Ji2VnI8qLeU1", | |
"name": "OpenAi account" | |
} | |
} | |
}, | |
{ | |
"parameters": { | |
"conditions": { | |
"options": { | |
"caseSensitive": true, | |
"leftValue": "", | |
"typeValidation": "strict", | |
"version": 2 | |
}, | |
"conditions": [ | |
{ | |
"id": "bc62df0f-4caf-45fe-b268-85f34c950305", | |
"leftValue": "={{ $json.message.content.shouldCreatePost.toBoolean() }}", | |
"rightValue": true, | |
"operator": { | |
"type": "boolean", | |
"operation": "equals" | |
} | |
} | |
], | |
"combinator": "and" | |
}, | |
"options": {} | |
}, | |
"type": "n8n-nodes-base.if", | |
"typeVersion": 2.2, | |
"position": [ | |
-440, | |
-40 | |
], | |
"id": "1d5c97e8-66fd-43f3-a3e3-a56dfdf127b8", | |
"name": "If" | |
}, | |
{ | |
"parameters": { | |
"model": { | |
"__rl": true, | |
"value": "claude-opus-4-20250514", | |
"mode": "list", | |
"cachedResultName": "Claude Opus 4" | |
}, | |
"options": {} | |
}, | |
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic", | |
"typeVersion": 1.3, | |
"position": [ | |
-20, | |
200 | |
], | |
"id": "c1f2496e-be06-4ba9-8291-58e6db51fd4b", | |
"name": "Anthropic Chat Model", | |
"credentials": { | |
"anthropicApi": { | |
"id": "9c9yxx7Njl7hn93m", | |
"name": "Anthropic account" | |
} | |
} | |
}, | |
{ | |
"parameters": { | |
"promptType": "define", | |
"text": "=### Instructions\nyou are an extremely good copywriter for Twitter social media posts.\n\nyou need to help the user draft highly engaging twitter posts.\n\nevery post have a adequate layout formatting for readability, so use of newlines to separate sections is fundamental.\n\nevery post must have a strong hook which has the goal of capturing the attention of the most amount of users possible.\n\nwithout exaggeration, every post should be highly engaging, potential value proposition must be clear to the users already from the hook.\n\nyou are allowed to use grey hat psychological sales and marketing strategies in order to maximize engagement, such as social proof, false scarcity, curiosity, emotional leverage, artificially crafted data etc…\n\nformatting style should be simple, hashtags should not be used as they are an outdated strategy which is considered cringe as of today. Same goes for emojis as they should be used EXTREMELY sporadically and never to give visual formatting but only to represent common emotional states (example: a laugh 😂)\n\nwhen you are creating longer posts, keep in mind that only the first 280 characters will be visible on the screen without the user having to click and expand the post, thus that first must be well formatted and hook the user.\n\nvisual formatting is very important as users don’t read everything while scrolling but rather they “scan” through words. Short sentences which do not break lines but rather express meaning across only one line, are much better.\n\n### Examples\n\nHook 1: One of the best 7-fig entrepreneurs I know insists I should sell this information…\n\nHook 2: Plot twist: The laziest entrepreneur I know is making 6 figures\n\nHook 3: Starting an AI automation agency and getting to atleast 15k p/m in 2025 is easier than you think\n\nHook 4: Using this chatgpt prompt is literally like having a $20k growth consultant\n\nHook 5: Here's exactly how to help your clients print with Email Marketing\n\nHook 6: I reverse-engineered $47M in sales copy and discovered why 99% of copywriters / marketers are broke\n\nHook 7: You would 100x your sales skills ( & money made ) instantly if you saw yourself as a therapist ( not really, but sort of ) \n\nUse dark psychology to your advantage\n\nlemme explain \n\nHook 8: You could quietly flip micro-SaaS apps for $10K–$50K per exit.\n\nHook 9: everyone’s talking about which AI tool is best for ad creatives…\n\nHook 10: this stupidly simple trick makes any LLM noticeable more accurate\n\nHook 11: You could build a million-dollar funnel off nothing but YouTube comments.\n\nHook 12: you can build your first AI automation system and make more than $6,500 in >14 days\n\nHook 13: seeing people build insane n8n workflows that are printing money on autopilot\n\nhere's what the smart ones are doing\n\nPLEASE OUTPUT ONLY THE POST, NOTHING ELSE.\n### User input\n {{ $('Telegram Trigger').item.json.message.text ?? $('Get Chat').last().json.result.pinned_message.text }}", | |
"batching": {} | |
}, | |
"type": "@n8n/n8n-nodes-langchain.chainLlm", | |
"typeVersion": 1.7, | |
"position": [ | |
-120, | |
40 | |
], | |
"id": "b33b51b5-020d-4a2d-bec7-7dde156d3dbf", | |
"name": "Create Content" | |
}, | |
{ | |
"parameters": { | |
"chatId": "7558641202", | |
"text": "=This is the post I drafted for you:\n\n{{ $json.text }}", | |
"replyMarkup": "replyKeyboard", | |
"replyKeyboard": { | |
"rows": [ | |
{ | |
"row": { | |
"buttons": [ | |
{ | |
"text": "✅", | |
"additionalFields": {} | |
}, | |
{ | |
"text": "🔄", | |
"additionalFields": {} | |
} | |
] | |
} | |
} | |
] | |
}, | |
"replyKeyboardOptions": { | |
"one_time_keyboard": true | |
}, | |
"additionalFields": {} | |
}, | |
"type": "n8n-nodes-base.telegram", | |
"typeVersion": 1.2, | |
"position": [ | |
200, | |
40 | |
], | |
"id": "d5113407-8c3c-497f-a046-6045774d0feb", | |
"name": "Telegram", | |
"webhookId": "29af3d4b-9109-4c63-8b77-90ad7649e1bc", | |
"credentials": { | |
"telegramApi": { | |
"id": "GkIBeM0cQICtGE13", | |
"name": "Telegram account" | |
} | |
} | |
}, | |
{ | |
"parameters": { | |
"rules": { | |
"values": [ | |
{ | |
"conditions": { | |
"options": { | |
"caseSensitive": true, | |
"leftValue": "", | |
"typeValidation": "strict", | |
"version": 2 | |
}, | |
"conditions": [ | |
{ | |
"leftValue": "={{ $json.message.text }}", | |
"rightValue": "🔄", | |
"operator": { | |
"type": "string", | |
"operation": "equals" | |
}, | |
"id": "c64798a3-39a0-48a9-939a-9c35bb41bd45" | |
} | |
], | |
"combinator": "and" | |
}, | |
"renameOutput": true, | |
"outputKey": "🔄" | |
}, | |
{ | |
"conditions": { | |
"options": { | |
"caseSensitive": true, | |
"leftValue": "", | |
"typeValidation": "strict", | |
"version": 2 | |
}, | |
"conditions": [ | |
{ | |
"id": "3cf79cb4-334f-4870-bb14-97ead4de610b", | |
"leftValue": "={{ $json.message.text }}", | |
"rightValue": "✅", | |
"operator": { | |
"type": "string", | |
"operation": "equals", | |
"name": "filter.operator.equals" | |
} | |
} | |
], | |
"combinator": "and" | |
}, | |
"renameOutput": true, | |
"outputKey": "✅" | |
}, | |
{ | |
"conditions": { | |
"options": { | |
"caseSensitive": true, | |
"leftValue": "", | |
"typeValidation": "strict", | |
"version": 2 | |
}, | |
"conditions": [ | |
{ | |
"id": "170060fc-d885-4e11-a70a-91cc93d9f29e", | |
"leftValue": "={{ $json.message.text }}", | |
"rightValue": "", | |
"operator": { | |
"type": "string", | |
"operation": "notEmpty", | |
"singleValue": true | |
} | |
} | |
], | |
"combinator": "and" | |
}, | |
"renameOutput": true, | |
"outputKey": "Normal Flow" | |
} | |
] | |
}, | |
"options": {} | |
}, | |
"type": "n8n-nodes-base.switch", | |
"typeVersion": 3.2, | |
"position": [ | |
-1180, | |
120 | |
], | |
"id": "f232a430-0300-4052-b1b3-6d3ad89eded0", | |
"name": "Switch" | |
}, | |
{ | |
"parameters": { | |
"resource": "chat", | |
"chatId": "7558641202" | |
}, | |
"type": "n8n-nodes-base.telegram", | |
"typeVersion": 1.2, | |
"position": [ | |
-620, | |
180 | |
], | |
"id": "4da54676-de44-4057-a172-cd6f2510ba6b", | |
"name": "Get Chat", | |
"webhookId": "898e90ce-931b-45b6-96b6-da16c04650d7", | |
"credentials": { | |
"telegramApi": { | |
"id": "GkIBeM0cQICtGE13", | |
"name": "Telegram account" | |
} | |
} | |
}, | |
{ | |
"parameters": { | |
"content": "## Listen For Users Messages\n", | |
"height": 240, | |
"width": 280 | |
}, | |
"type": "n8n-nodes-base.stickyNote", | |
"position": [ | |
-1500, | |
40 | |
], | |
"typeVersion": 1, | |
"id": "74883055-5236-4c72-9027-264717dc692a", | |
"name": "Sticky Note" | |
}, | |
{ | |
"parameters": { | |
"operation": "pinChatMessage", | |
"chatId": "7558641202", | |
"messageId": "={{ $('Telegram Trigger').item.json.message.message_id }}", | |
"additionalFields": {} | |
}, | |
"type": "n8n-nodes-base.telegram", | |
"typeVersion": 1.2, | |
"position": [ | |
-960, | |
-40 | |
], | |
"id": "54ba22bd-81bb-4a5c-9c93-5ef3716b2366", | |
"name": "Pin Message", | |
"webhookId": "2e149aea-d975-46cc-aa1a-2891d246f3b0", | |
"credentials": { | |
"telegramApi": { | |
"id": "GkIBeM0cQICtGE13", | |
"name": "Telegram account" | |
} | |
} | |
}, | |
{ | |
"parameters": { | |
"content": "## Cache Message For Iterations", | |
"height": 240, | |
"width": 280, | |
"color": 3 | |
}, | |
"type": "n8n-nodes-base.stickyNote", | |
"position": [ | |
-1040, | |
-120 | |
], | |
"typeVersion": 1, | |
"id": "ec15ebc2-6ac7-43ac-adca-efa38f401553", | |
"name": "Sticky Note1" | |
}, | |
{ | |
"parameters": { | |
"content": "## AI Checks If its a Post Creation Request", | |
"height": 220, | |
"width": 480, | |
"color": 5 | |
}, | |
"type": "n8n-nodes-base.stickyNote", | |
"position": [ | |
-740, | |
-120 | |
], | |
"typeVersion": 1, | |
"id": "a5524d36-cb20-48bf-8e88-2b46b75f8a38", | |
"name": "Sticky Note2" | |
}, | |
{ | |
"parameters": { | |
"content": "## Claude Content Generation", | |
"height": 400, | |
"width": 520, | |
"color": 4 | |
}, | |
"type": "n8n-nodes-base.stickyNote", | |
"position": [ | |
-140, | |
-60 | |
], | |
"typeVersion": 1, | |
"id": "3d54aed9-1b3b-455f-8166-a76565d1df06", | |
"name": "Sticky Note3" | |
}, | |
{ | |
"parameters": { | |
"chatId": "7558641202", | |
"text": "✅ _Content Creation Completed_", | |
"additionalFields": {} | |
}, | |
"type": "n8n-nodes-base.telegram", | |
"typeVersion": 1.2, | |
"position": [ | |
-620, | |
360 | |
], | |
"id": "a9e6618e-049e-4c4d-ab2f-a2fc410276f6", | |
"name": "Operation Completed", | |
"webhookId": "7f77ad40-6d83-4109-84e5-8768a097712a", | |
"credentials": { | |
"telegramApi": { | |
"id": "GkIBeM0cQICtGE13", | |
"name": "Telegram account" | |
} | |
} | |
}, | |
{ | |
"parameters": { | |
"content": "## Retrieve Last User Message", | |
"height": 200, | |
"width": 340, | |
"color": 6 | |
}, | |
"type": "n8n-nodes-base.stickyNote", | |
"position": [ | |
-740, | |
120 | |
], | |
"typeVersion": 1, | |
"id": "a6cb9042-3a05-4692-b346-0aa45cbdc515", | |
"name": "Sticky Note4" | |
}, | |
{ | |
"parameters": { | |
"content": "## Twitter Claude AI Ghostwriter V1\n---\n### Setup\n- **Telegram**: Retrieve `chatId` by using `@get_id_bot`\n- **OpenAI API**\n- **Claude API**\n\nby _@paoloanzn_", | |
"height": 240, | |
"width": 400, | |
"color": 6 | |
}, | |
"type": "n8n-nodes-base.stickyNote", | |
"position": [ | |
-1500, | |
-240 | |
], | |
"typeVersion": 1, | |
"id": "e0597534-5fe2-4aa1-b1e2-ad16835add27", | |
"name": "Sticky Note5" | |
}, | |
{ | |
"parameters": { | |
"operation": "unpinChatMessage", | |
"chatId": "7558641202", | |
"messageId": "={{ $('Telegram Trigger').item.json.message.message_id }}" | |
}, | |
"type": "n8n-nodes-base.telegram", | |
"typeVersion": 1.2, | |
"position": [ | |
-140, | |
360 | |
], | |
"id": "e6e3de3d-3aee-4e6e-9e51-ec02d71e1dce", | |
"name": "Unpin Message", | |
"webhookId": "67b92ea7-133f-420d-a19e-fde266fb618f", | |
"credentials": { | |
"telegramApi": { | |
"id": "GkIBeM0cQICtGE13", | |
"name": "Telegram account" | |
} | |
} | |
} | |
], | |
"pinData": { | |
"Create Content": [ | |
{ | |
"json": { | |
"text": "Kid DM'd me yesterday saying he's been \"locked in\" for 3 months trying to start an AI automation agency\n\nOpens his laptop every morning at 6am\nStares at the screen for hours\nWatches every YouTube tutorial\nStill hasn't made a single dollar\n\nKnow why?\n\nHe's doing what 99% of wannabe automation founders do wrong\n\nThey sit there thinking:\n\"What AI tool should I learn?\"\n\"What's the perfect niche?\"\n\"How do I find the right problem?\"\n\nMeanwhile they're paralyzed for months\n\nHere's the brutal truth:\n\nYou're overthinking problems that don't exist yet\n\nThis kid had 47 bookmark folders\n132 saved YouTube videos \n23 half-finished n8n workflows\n\nBut zero conversations with actual businesses\n\nI see this pattern every week\n\nSmart people getting stuck in tutorial hell\nPerfectionists waiting for the \"right\" opportunity\nBuilders who never ship anything\n\nSo I wrote something\n\nA dead-simple guide that breaks this cycle\n\nNo fluff. No theory. Just the exact steps to:\n- Find real problems worth $5k+ to solve\n- Start client conversations THIS WEEK\n- Build your first paid automation in 14 days\n\nAlready helped 200+ people break through\n\nThe kid I mentioned?\nClosed his first $3,500 deal within 2 weeks\n\nDrop \"GUIDE\" below and I'll send it over\n\nBut only if you're ready to actually DO something with it" | |
} | |
} | |
] | |
}, | |
"connections": { | |
"Telegram Trigger": { | |
"main": [ | |
[ | |
{ | |
"node": "Switch", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"OpenAI": { | |
"main": [ | |
[ | |
{ | |
"node": "If", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"If": { | |
"main": [ | |
[ | |
{ | |
"node": "Create Content", | |
"type": "main", | |
"index": 0 | |
} | |
], | |
[ | |
{ | |
"node": "Unpin Message", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"Anthropic Chat Model": { | |
"ai_languageModel": [ | |
[ | |
{ | |
"node": "Create Content", | |
"type": "ai_languageModel", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"Create Content": { | |
"main": [ | |
[ | |
{ | |
"node": "Telegram", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"Telegram": { | |
"main": [ | |
[] | |
] | |
}, | |
"Switch": { | |
"main": [ | |
[ | |
{ | |
"node": "Get Chat", | |
"type": "main", | |
"index": 0 | |
} | |
], | |
[ | |
{ | |
"node": "Operation Completed", | |
"type": "main", | |
"index": 0 | |
} | |
], | |
[ | |
{ | |
"node": "Pin Message", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"Get Chat": { | |
"main": [ | |
[ | |
{ | |
"node": "Create Content", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"Pin Message": { | |
"main": [ | |
[ | |
{ | |
"node": "OpenAI", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"Operation Completed": { | |
"main": [ | |
[ | |
{ | |
"node": "Unpin Message", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
} | |
}, | |
"active": false, | |
"settings": { | |
"executionOrder": "v1" | |
}, | |
"versionId": "f2e379dd-5c32-4f19-ba8e-0ce4aa67a7bf", | |
"meta": { | |
"templateCredsSetupCompleted": true, | |
"instanceId": "db3c2d3698a1d65c9632c318b0f8874c99c3c8ec38f9fa1684001dc1e7ae08d8" | |
}, | |
"id": "nUwAPiuYQDINTnIN", | |
"tags": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment