Quick overview
This workflow generates an AI-written LinkedIn post about business automation and AI using Groq models, audits and optimizes it through multiple review passes, validates the final output, and automatically publishes it to LinkedIn, with Telegram notifications for execution errors or failed validations.
How it works
- Runs on a schedule (or manually) to start the post creation process.
- Uses Groq (via LangChain agents) to generate a LinkedIn post following a defined structure, length, emoji, and tone requirements.
- Audits the generated post with Groq to score it against specific LinkedIn criteria, then parses the audit JSON for downstream steps.
- Performs a marketing evaluation and then optimizes the post with Groq to produce a final JSON containing the hook, CTA, and the optimized post text.
- Validates the optimizer’s JSON, quality score, and required formatting (including minimum length and a final question), then publishes the post to LinkedIn if it passes.
- If validation fails, sends a Telegram message with the failure reason, waits one minute, and runs a second generation→audit→marketing→optimization→validation pass before attempting LinkedIn publishing again.
- If the workflow execution errors at any point, sends the error details to Telegram.
Setup
- Add a Groq credential and ensure each Groq Chat Model node points to an available Groq model in your account.
- Add LinkedIn credentials and confirm the target LinkedIn account permissions for the two “Create a post” actions.
- (Optional) Add Telegram credentials and replace
YOUR_TELEGRAM_CHAT_ID in both Telegram messages to receive validation and error notifications.
- Adjust the schedule interval in the schedule trigger and customize the post prompts to match your audience, offer, and language.
Customization
- je changerais par open ia pour une meilleur performance
Additional info
on peut toujour remplacer le model par un plus performant comme open ia ou antropic