Quick Overview
This workflow runs every morning, pulls recent Google News stories for your keywords, uses Google Gemini to pick one headline and write platform-specific commentary, generates an image with Gemini, publishes to LinkedIn, Bluesky, and Mastodon via PostWire, and logs results to Google Sheets with Gmail alerts.
How it works
- Runs every day at 8:00 and loads your news keywords, voice, and other settings.
- Reads a Google News RSS feed for each keyword, keeps only recent items, removes stories already seen in earlier executions, and selects the 10 newest.
- Sends the shortlist to Google Gemini to pick one story (or decide none are worth commenting on) and generate commentary for LinkedIn, Bluesky, and Mastodon plus an image prompt.
- If a story is selected, uses Google Gemini to generate an illustration and publishes the image with the platform-specific text to LinkedIn, Bluesky, and Mastodon using PostWire.
- Appends a “posted” entry with the story, take, and platform URLs to Google Sheets when all networks succeed.
- If a feed fails, no story is selected, image generation fails, or posting is only partially successful, logs the issue to Google Sheets and sends a Gmail email describing what to fix.
Setup
- Install the PostWire community node, create a PostWire account, connect your LinkedIn, Bluesky, and Mastodon accounts, and add your PostWire API key credential in n8n.
- Add Google Gemini credentials for both the text and image Gemini nodes.
- Add a Gmail credential and set the notification email address (and any other settings like keywords, language, and max age) in the workflow’s news settings.
- Connect Google Sheets credentials and select the target spreadsheet and sheet for both logging steps, ensuring it includes columns for date, story, link, take, status, links, and note.