Quick overview
This workflow collects a source URL or text via an n8n Form, uses Google Gemini to generate LinkedIn, Instagram, and X draft posts plus an image idea in your brand voice, and appends the drafts to a Google Sheets spreadsheet.
How it works
- Receives a submission from an n8n Form with a Source URL and/or some idea text.
- If a URL is provided, it fetches the web page via HTTP and extracts the title and paragraph text from the HTML.
- Falls back to the submitted idea text when no URL is provided or when the page fetch fails, then checks that there is usable source text.
- If source text exists, sends the source, brand settings, and writing rules to Google Gemini to generate LinkedIn, Instagram, and X drafts plus an image idea.
- Parses the model response into structured fields and formats them into a single row with a Draft status.
- If no usable text is available, creates a row indicating the page could not be read and asks you to paste text in the form.
- Appends the resulting row to Google Sheets for review and manual publishing.
Setup
- Add a Google Gemini API credential and select the Gemini model used for generating the posts.
- Connect Google Sheets credentials, then select the target spreadsheet and sheet in the Google Sheets append step.
- Use an empty sheet (n8n creates the headers on the first run) or one with these exact headers: Date, Source, LinkedIn, Instagram, X, Image idea, Status.
- Update the Brand settings values (brand name, description, audience, voice, language, and call to action) to match your business.
- Execute the workflow once and use the generated form URL to submit a Source URL and/or idea text.
Requirements
- An n8n instance (cloud or self-hosted)
- A Google Gemini API key (the free tier is enough)
- A Google account with access to Google Sheets
Customization
- Change the Brand settings values to match your brand, audience, tone, language and call to action
- Edit the writing rules in the Write the posts step to change length, style or hashtags
- Swap the Gemini model for any other chat model supported by n8n
- Add or remove social networks by updating the output parser and the Prepare row step
- Replace the form trigger with a schedule or RSS trigger to generate drafts automatically