Category: Automations › Social Media & Content · Best for: Founders posting from their phone · Platform: n8n · Steps: 19
What it does
Send a message to your Telegram bot, and it posts to your social media.
Automate the curation and sharing of trending GitHub discussions from Hacker News to Twitter and LinkedIn. This workflow leverages AI to generate engaging posts, streamlining your social media content creation and distribution.
Works with: Airtable, OpenAI, Telegram, Twitter, LinkedIn
What you get
- The n8n workflow file (
workflow.json), ready to import - This setup guide
- The list of fields to change for your own accounts (see Install below)
- Email support if you get stuck
Before you start
-
An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker:
docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678. -
Accounts and API keys for these services:
- Airtable personal access token: how to connect (used by Update X Status, Update L Status, Search Item, Create Item)
- LinkedIn app: how to connect (used by LinkedIn)
- X (Twitter) developer app: how to connect (used by X)
- OpenAI API key: how to connect (used by Generate Content)
- Telegram bot token from @BotFather: how to connect (used by Ping Me)
Install
- In n8n, click Create workflow (top right).
- Click the ⋯ menu → Import from file and choose
workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V. - Open each node with a red warning triangle and pick or create the matching credential from the list above.
- Point these fields at your own sheets, chats and accounts:
- Update X Status →
base: choose your own - Update X Status →
table: choose your own - Update L Status →
base: choose your own - Update L Status →
table: choose your own - Search Item →
base: choose your own - Search Item →
table: choose your own - Create Item →
base: choose your own - Create Item →
table: choose your own - Ping Me →
chatId: choose your own
- Update X Status →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). Schedule Trigger starts it. Trigger it once with real sample data.
- Click each node to check its output. A green tick means the step worked.
- Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.
Go live
Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.
How it works, step by step
- Schedule Trigger starts the workflow (Schedule).
- Crawl HN Home calls an external API (https://news.ycombinator.com/).
- Extract Meta reshapes the data for the next step.
- Search Item uses Airtable to search.
- Merge uses Merge.
- Filter Unposted Items reshapes the data for the next step.
- Visit GH Page calls an external API (={{ $json.url }}).
- Convert HTML To Markdown uses Markdown.
- Generate Content uses AI (OpenAI).
- Validate Generate Content reshapes the data for the next step.
- Filter Errored checks a condition and routes items accordingly.
- Create Item uses Airtable to create.
- Ping Me uses Telegram.
- Wait for 5 mins before posting pauses before continuing.
- X uses Twitter.
- LinkedIn uses LinkedIn.
- Update X Status uses Airtable to update.
- Update L Status uses Airtable to update.
- No Operation, do nothing uses No Op.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Automate the curation and sharing of trending GitHub discussions from Hacker News to Twitter and LinkedIn. This workflow leverages AI to generate engaging posts, streamlining your social media content creation and distribution.
I crawl Hacker News and extract Github links.
This is where the magic happens. I use the Github url extracted earlier and visit Github page to get more insights in the project being shared. Then I ask Chat GPT very nicely to help me get a Tweet and a LinkedIn post
One last magic trick, Send the generated Tweet and the post to the respective platforms.
Just pinging the owner that something is about to be posted and wait for 5 mins before final posting.
CHORE
Make sure we don't post the same content again.
Troubleshooting
- "Credentials not found": open the node and select your credential again.
- Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
- Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
- AI node errors: check your API key has billing enabled and the model name exists on your plan.
- Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.
Need help?
Reply to your Morning Method order email and we'll help you get it running.
© Morning Method