Email Automation
Turn TikTok trends into Instagram and Facebook posts with Apify, Gemini, and PostWire
On a schedule, it handles email with Google Gemini using Gmail, Google Sheets, Post Wire, Apify.
What it does
## Post on the trend your niche is watching this week Every morning Apify collects the top TikTok videos for your hashtags, Gemini finds the trend that repeats in them and writes a post for it, Nano Banana draws the image and PostWire publishes it on Instagram and Facebook. ### How it works 1. Every morning at 7:00 runs Scrape TikTok with Apify for the hashtags in Trend settings. 2. Keep popular recent videos drops old and small videos and Skip videos already used drops the ones seen on earlier days. The 15 most watched go to Gemini. 3. Spot the trend with Gemini names the trend, the videos it comes from, a caption per network and the brief for the image. 4. Nano Banana image (Gemini) draws the picture and Post to Instagram and Facebook (PostWire) publishes it with each caption. 5. Log the trend writes the trend, its source videos and the post links in Google Sheets. When no trend fits, the image fails or a network refuses, Log the problem and Email me the fix say what to fix. If Apify fails, Email me that Apify failed. ### Setup 1. Install the verified PostWire node, create an account at postwire.io, connect your networks and paste your API key into a PostWire API credential. 2. Copy your Apify API token into a Bearer Auth credential in the Apify node. The free Apify plan covers a daily run. 3. Add a Google Gemini credential to both Gemini nodes, connect Gmail and pick a sheet with the columns date, trend, why, sources, status, links and note in both Sheets nodes. 4. Fill in Trend settings. ### Customize Change the hashtags, minimum views or image style in Trend settings.
The steps
- Every morning at 7:00
- Trend settings
- Scrape TikTok with Apify
- Keep popular recent videos
- Skip videos already used
- Most watched first
- Keep the top 15
- Bundle the videos
- Email me that Apify failed
- Spot the trend with Gemini
- Read the trend
- Is there a trend?
- Nano Banana image
- Post to Instagram and Facebook
20 steps in total.
Similar automations
Email AutomationRewrite top Instagram posts for LinkedIn, Facebook and Bluesky with Apify and OpenAI19 stepsSocial Media PublishingTurn one video into native TikTok, Instagram and YouTube posts with PostWire4 stepsEmail AutomationWrite SEO WordPress posts from Google Sheets with Perplexity, OpenAI and PostWire19 stepsEmail AutomationPost weekday car care tips to Facebook and Instagram with Perplexity and GPT Image14 steps