Quick Overview
This workflow runs every weekday morning to research a locally relevant car care tip with Perplexity, generate a square image with OpenAI GPT Image, and publish the post to Facebook and Instagram via PostWire, while logging outcomes and sources to Google Sheets and emailing you if anything fails.
How it works
- Runs every weekday at 9:00 on a schedule trigger.
- Reads previously posted tips from Google Sheets and compiles a list of past topics to avoid repeats.
- Uses Perplexity to research one season- and city-relevant car care tip, returning a topic, verified facts, an image prompt, and platform-specific captions with citations.
- Stops if the generated topic is empty or already exists in the Google Sheets log.
- Uses OpenAI GPT Image to generate a 1024×1024 image and publishes the image with the Facebook and Instagram captions through PostWire.
- Appends a “posted” row to Google Sheets when all platforms succeed, or logs partial/failure details and sends a Gmail alert with what to fix.
Setup
- Create and connect a PostWire account (with Facebook Page and Instagram connected) and add your PostWire API credentials in n8n.
- Add Perplexity credentials and an OpenAI credential with access to GPT Image generation.
- Set up a Google Sheet with columns for date, topic, status, links, sources, and note, then select the correct document and sheet in the Google Sheets nodes.
- Connect a Gmail account in n8n and set the recipient email plus your shop details (shop name, city, services, and offer) in the workflow’s settings fields.