Google Sheets to X and Facebook, posts ready daily
Posting “today’s festival” content sounds simple until you’re the one hunting for dates, rewriting captions, generating an image, uploading it twice, and still missing the 8:00 AM window.
Marketing managers feel it when consistency slips. A community organizer feels it when posts look rushed. And agencies running cultural calendars for clients know the pain of doing the same task every morning. This sheets social posting automation turns that daily scramble into a predictable system.
You’ll see how the workflow pulls festivals from Google Sheets, uses Gemini to generate culturally aware copy and images, then publishes to X and Facebook automatically (with backup posting built in).
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets to X and Facebook, posts ready daily
flowchart LR
subgraph sg0["Everyday Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Get Today's Date"]
n1@{ icon: "mdi:database", form: "rounded", label: "Fetch Data of Matched Date", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "Structured Posts", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Generate Posts", pos: "b", h: 48 }
n4@{ icon: "mdi:play-circle", form: "rounded", label: "Everyday Trigger", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/x.dark.svg' width='40' height='40' /></div><br/>Post to X"]
n6@{ icon: "mdi:cog", form: "rounded", label: "Aggregate", pos: "b", h: 48 }
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge"]
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Generate Image"]
n9@{ icon: "mdi:robot", form: "rounded", label: "Prompt Generator", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Convert base64 to Image"]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Media ID for X"]
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Post on X via HTTP if other .."]
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/facebook.svg' width='40' height='40' /></div><br/>Post to Facebook"]
n14@{ icon: "mdi:brain", form: "rounded", label: "Prompt generator model", pos: "b", h: 48 }
n15@{ icon: "mdi:robot", form: "rounded", label: "Structured prompts", pos: "b", h: 48 }
n16@{ icon: "mdi:brain", form: "rounded", label: "Post Generator Model", pos: "b", h: 48 }
n7 --> n6
n6 --> n5
n6 --> n13
n6 --> n12
n8 --> n10
n3 --> n7
n4 --> n0
n0 --> n1
n9 --> n3
n9 --> n8
n2 -.-> n3
n11 --> n7
n15 -.-> n9
n16 -.-> n3
n14 -.-> n9
n10 --> n11
n10 --> n13
n1 --> n9
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n4 trigger
class n2,n3,n9,n15 ai
class n14,n16 aiModel
class n1 database
class n8,n11,n12,n13 api
class n0,n10 code
classDef customIcon fill:none,stroke:none
class n0,n5,n7,n8,n10,n11,n12,n13 customIcon
The Problem: Daily cultural posts become a manual grind
If you post festival content regularly, you already know the awkward part: the work isn’t “creative,” it’s repetitive. You check the calendar, search for the right festival name, rewrite a description so it fits X, rewrite it again so it sounds natural on Facebook, then scramble for a decent image. Half the time, the image is the real bottleneck, because you need something vibrant and relevant, not a generic stock photo. Miss a morning? Now you’re behind, and the next day feels heavier.
It adds up fast. And the small failures are usually what kill momentum.
- Copy-pasting between platforms invites small mistakes, like wrong dates or mismatched festival names.
- Image creation takes “just a few minutes” until you do it every day and realize it’s an hour a week.
- You end up posting later than planned, which means weaker reach and less predictable engagement.
- When a credential expires or an upload fails, you often don’t notice until someone tells you.
The Solution: Google Sheets → Gemini → X + Facebook publishing
This workflow turns your Google Sheet into a daily publishing engine. Every morning at 8:00 AM, n8n checks today’s date, pulls the matching festival row (date, festival name, description), then asks Gemini to generate two things: an image prompt that matches the festival’s cultural context, and platform-ready copy that fits the tone and constraints of X and Facebook. Next, it renders an image via an HTTP request to Gemini, converts it into the right binary format for social uploads, and attaches it to the posts. Finally, it publishes to X and Facebook, while still keeping a backup HTTP method ready if X’s primary posting route fails.
The workflow starts with a scheduled trigger and a date lookup in Google Sheets. From there, Gemini generates structured outputs for prompts and post copy (so you don’t get chaotic formatting). The result is a complete post package: image + caption for X, and image + caption for Facebook, published without you babysitting it.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you publish one festival post per day to two platforms. Manually, it’s usually about 10 minutes to find/confirm the festival details, about 20 minutes to write and adjust captions for X and Facebook, plus another 20 minutes to generate or source an image and upload it twice. Call it about 50 minutes a day. With this workflow, you spend maybe 10 minutes once a week maintaining the Google Sheet, and the daily run happens on schedule while Gemini generates the copy and image in the background.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store your festival calendar rows.
- Google Gemini API for image + copy generation.
- Google AI Studio API key (get it from Google AI Studio).
Skill level: Intermediate. You’ll connect credentials, confirm scopes, and test one full run end-to-end.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Daily schedule trigger at 8:00 AM. n8n runs automatically, so you’re not relying on someone remembering to post before the day gets messy.
Date matching and festival lookup in Google Sheets. The workflow computes the current date, then retrieves the row(s) that match, using your sheet as the single source of truth.
Gemini generates structured prompts and platform copy. It creates an image prompt plus separate captions for X and Facebook, and parses the output into a predictable schema so your posts don’t come out scrambled.
Image rendering, upload, and publishing. An HTTP request renders the festival image, code converts it into the right format, then the workflow publishes to X and Facebook. If the X publish node fails, a backup HTTP method can still push the post through.
You can easily modify the writing style and hashtag strategy to match your brand voice based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the workflow to start automatically each morning so it can look up festivals for the current date.
- Add and open Daily Schedule Start.
- Set the trigger rule to run at 8 AM by configuring Trigger At Hour to
8. - Keep the workflow timezone consistent with your account settings (this workflow uses
Asia/Kolkata).
Step 2: Connect Google Sheets
Fetch festival rows for the current date so the AI prompts are generated from your dataset.
- Open Compute Current Date and confirm the JavaScript builds
dd/mm/yyyyformatted dates. - Open Retrieve Festival Rows and select your spreadsheet in Document using
[YOUR_ID]. - Set Sheet to
Sheet1(or your actual sheet name). - Under Filters, set Lookup Column to
Dateand Lookup Value to{{ $json.date }}. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Retrieve Festival Rows.
⚠️ Common Pitfall: Ensure the date format in your sheet matches dd/mm/yyyy, otherwise Retrieve Festival Rows will return no results.
Step 3: Set Up AI Prompt Generation
Build AI prompts that will generate the festival image and multi-platform social copy.
- Open Create AI Prompts and keep the instruction text as-is to generate both image and post prompts.
- Confirm the prompt uses festival fields via expressions like
{{ $json["Name of the Festival"] }},{{ $json["Date"] }}, and{{ $json["Description"] }}. - Prompt Model Engine is connected as the language model for Create AI Prompts — Credential Required: Connect your
googlePalmApicredentials in Prompt Model Engine. - Prompt Schema Parser is the output parser for Create AI Prompts — add credentials to Prompt Model Engine (not the parser) if needed.
- Verify Prompt Schema Parser uses the JSON schema example that includes
image_gen_promptandpost_gen_prompt.
Parallel Execution: Create AI Prompts outputs to both Draft Social Posts and Render Festival Image in parallel.
Step 4: Generate Images and Social Copy
Create a festival image with Gemini and generate platform-specific copy for X, Instagram, Facebook, and LinkedIn.
- Open Render Festival Image and set URL to
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent. - Ensure the JSON Body uses
{{ JSON.stringify($json.output.image_gen_prompt) }}and add your API key in the query parameterkeyas[CONFIGURE_YOUR_API_KEY]. - Open Decode Image Binary and keep the code that maps the image base64 into binary
data. - Open Upload Media to X and set URL to
https://api.x.com/2/media/uploadwith Content Typemultipart-form-data. - Credential Required: Connect your
oAuth2Apicredentials in Upload Media to X. - Open Draft Social Posts and keep the prompt text with expressions like
{{ $json.output.post_gen_prompt.x_prompt }}. - Post Model Engine is connected as the language model for Draft Social Posts — Credential Required: Connect your
googlePalmApicredentials in Post Model Engine. - Post Schema Parser is the output parser for Draft Social Posts — add credentials to Post Model Engine (not the parser) if needed.
Parallel Execution: Decode Image Binary outputs to both Upload Media to X and Publish to Facebook in parallel, while Draft Social Posts produces the copy stream.
Step 5: Consolidate and Publish Posts
Merge the media and text outputs, then publish to X and Facebook with a backup X request.
- Keep Combine Media and Copy connected to both Upload Media to X and Draft Social Posts.
- Open Consolidate Payload and ensure it aggregates output and data fields.
- Open Publish to X and set Text to
{{ $json.output[0].X.text }} {{ $json.output[0].X.call_to_action }} {{ $json.output[0].X.hashtags }}. - Set Attachments in Publish to X to
{{ $json.data[0].id }}. - Credential Required: Connect your
twitterOAuth2Apicredentials in Publish to X. - Open Backup X HTTP Post and confirm the JSON body uses
{{ $json.output[0].X.text }}and{{ $json.data[0].id }}. - Credential Required: Connect your
oAuth2Apicredentials in Backup X HTTP Post. - Open Publish to Facebook and set Node to your page ID (replace
[YOUR_ID]). - Set the Message query parameter to
{{ $json.output[0].Facebook.text }} {{ $json.output[0].Facebook.call_to_action }} {{ $json.output[0].Facebook.hashtags }}. - Credential Required: Connect your
facebookGraphApicredentials in Publish to Facebook.
Parallel Execution: Consolidate Payload outputs to Publish to X, Publish to Facebook, and Backup X HTTP Post in parallel.
Step 6: Test and Activate Your Workflow
Validate the full pipeline from data lookup to social publishing before enabling daily runs.
- Click Execute Workflow to run a manual test from Daily Schedule Start.
- Verify Retrieve Festival Rows returns at least one row for today’s date.
- Confirm Render Festival Image returns an image and Decode Image Binary exposes binary
data. - Check that Publish to X and Publish to Facebook receive the aggregated text and media IDs from Consolidate Payload.
- If successful, toggle the workflow to Active for daily posting.
Common Gotchas
- X OAuth credentials can expire or need specific permissions. If things break, check your n8n Credentials for the two separate X OAuth2 setups (media upload vs tweet posting) first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About an hour if you already have your APIs and accounts ready.
No. You will connect credentials and paste in an API key. The only “technical” part is verifying scopes for X and Facebook.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Gemini API costs, which depend on how many posts and images you generate.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and it’s straightforward. Change the Schedule Trigger from 8:00 AM to your preferred time zone and posting cadence. You can also tweak the Gemini prompt nodes (the prompt generation and post drafting parts) to enforce a brand voice, add a call-to-action, or change the hashtag style. If you want weekend-only or multiple daily posts, you’ll usually adjust the trigger plus the Google Sheets query logic so it selects the right rows.
Most of the time it’s a permissions issue or the sheet was moved. Reconnect your Google Sheets credential in n8n and confirm it still has access to the exact spreadsheet. Also check that your date format matches what the workflow expects (DD/MM/YYYY), because a mismatch can look like “no data found” even when the row is there.
If you self-host, there’s no execution limit (it mainly depends on your server and API rate limits). On n8n Cloud, the limit depends on your plan’s monthly executions, and this workflow is usually one execution per day unless you expand it. Practically, most teams run this daily and scale by adding more scheduled runs or looping through multiple rows when needed.
Often, yes, because this workflow has branching logic, structured AI parsing, and a backup HTTP posting path, which gets clunky (and expensive) in simpler automation tools. n8n also gives you the self-hosted route, which matters when you want predictable costs. That said, if you only need “new row in Sheets → send a draft to me,” Zapier or Make can be quicker. This one is meant to publish reliably, every day, with images attached. If you’re unsure, Talk to an automation expert and you’ll get a straight recommendation.
Once this is running, your festival calendar turns into dependable daily publishing. The workflow handles the repetitive parts, so you can spend your time on the campaigns that actually need you.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.