π¬ Generate social media images from briefs with Google Gemini and Gmail
β‘ 21 views Β· π¬ Content Creation & Video
Description
Quick Overview
This workflow collects an image brief via an n8n form, uses Google Gemini to turn it into an art-directed prompt and generate an image, logs the prompt to Google Sheets, and emails the finished image (or a failure notice) to the requester via Gmail.
How it works
- Receives an image request through an n8n Form that captures the requesterβs email, intended use, description, and a selected visual style.
- Uses the Google Gemini chat model to rewrite the rough brief into a single detailed 40β70 word image-generation prompt with composition, lighting, palette, mood, and the chosen style.
- Sends the art-directed prompt to Google Gemini Image generation and outputs the generated image as binary data.
- If image generation fails, sends a Gmail message to the requester explaining that the image could not be generated.
- If image generation succeeds, appends a log entry to a Google Sheets spreadsheet.
- Emails the generated image as a Gmail attachment to the requester, including the exact prompt used in the message body.
Setup
- Add credentials for Google Gemini (PaLM) API, Google Sheets OAuth, and Gmail OAuth.
- Select the target Google Sheets spreadsheet and sheet/tab in the logging step (for example, a tab named βImagesβ).
- Open the form URL, submit a test request, and confirm emails send successfully and the generated image arrives as an attachment.
π Nodes Used
Google Sheets, Gmail, Basic LLM Chain, n8n Form Trigger, Google Gemini Chat Model, Google Gemini
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File