Quick overview
This workflow runs every 6 hours to find Hacker News front-page posts that link to GitHub repositories, generates Twitter/X and LinkedIn copy with OpenAI, queues and deduplicates drafts in Airtable, notifies you in Telegram for review, and then publishes to X and LinkedIn.
How it works
- Runs every 6 hours on a schedule.
- Downloads the Hacker News homepage and parses it to extract front-page submissions that link to GitHub.
- Checks Airtable for existing records matching each Hacker News post and keeps only items that have not been logged before.
- Fetches each new GitHub repository page, converts it to Markdown, and sends the details to OpenAI (gpt-4o-mini) to generate Twitter and LinkedIn posts in JSON.
- Validates the generated output and drops any items where the expected twitter/linkedin fields are missing.
- Creates a new Airtable record to store the source URL, title, and the drafted Twitter and LinkedIn content.
- Sends the drafts to a Telegram chat for review, waits five minutes, then posts to X (Twitter) and LinkedIn.
- Updates the Airtable record to mark the X and LinkedIn posts as published.
Setup
- Create an Airtable base/table with fields like Post, Title, Url, Tweet, LinkedIn, TDone, and LDone, add an Airtable Personal Access Token credential, and update the base/table IDs used in the Airtable steps.
- Add an OpenAI API key credential for the OpenAI (LangChain) step and keep or change the selected model (gpt-4o-mini).
- Add X (Twitter) OAuth credentials and set the posting account as needed.
- Add LinkedIn OAuth credentials and replace the hardcoded LinkedIn person URN with your own profile identifier.
- Create a Telegram bot, add its Bot API token credential, and update the Telegram chat ID to the destination you want for review messages.
- Adjust the schedule interval and the wait time if you want a different posting cadence or a longer review window.