LLM Content Generation and Publishing: Google Gemini to Twitter & LinkedIn

This workflow automates content creation and social media publishing using Google Gemini. It generates stories and marketing copy, then formats and shares them on Twitter and LinkedIn. Key nodes include Chat Trigger for user requests, Condition for input validation, Memory Buffer Window for context retention, Tool Workflow nodes (Story, Marketing) for content generation, and Twitter/LinkedIn nodes for publishing. The Master Agent routes requests and manages publishing with robust error handling. To set up, install n8n by downloading from n8n.io for self-hosted or sign up at cloud.n8n.io for cloud hosting. Obtain a Google Gemini API key from Google Cloud Console (console.cloud.google.com) under 'APIs & Services' > 'Credentials' > 'Create Credentials' > 'API Key'. Enable the Gemini API. Get Twitter API credentials (API Key, Secret, Access Token, Secret) from developer.twitter.com and LinkedIn OAuth2 credentials from developer.linkedin.com. In n8n, import the workflow JSON, configure the Gemini Model node with the API key, Twitter node with Twitter credentials, and LinkedIn node with OAuth2 credentials. Set up the Chat Trigger node by copying its webhook URL for chat integration. Configure the Condition node to validate 'chatInput' for non-empty requests. Ensure the Memory Buffer Window node uses session_id. Test by sending a chat message via the webhook URL using Postman (e.g., {chatInput: 'Write a marketing post for a tech startup', sessionId: 'test123'}). Include 'publish' in a follow-up to test sharing. Verify outputs in the Analytics Logger node for content and publishing status. Check for errors in the Error Logger node; common issues include missing API keys (HTTP 401) or invalid inputs (INVALID_CONTENT_REQUEST). If authentication fails, re-generate credentials in respective portals. Deploy by activating the workflow in n8n’s interface. Monitor logs for issues like content length errors or API rate limits, ensuring valid credentials and input formats before live use.

$6.99

Workflow steps: 20

Integrated apps: chatTrigger, if, set

LLM Content Generation and Publishing: Google Gemini to Twitter & LinkedIn  preview