Goal:
Creating a fully automated system for generating trending video content that saves hours of manual work and ensures a stable flow of viral content for social networks.
Scope of application:
For bloggers — regular content without effort
For SMM agencies — scaling video production
For business — viral marketing based on current trends
For arbitrageurs — a quick launch of advertising creatives
This automation is a complete system for automatically creating viral videos using Google Veo3 and publishing them on social networks. The system automatically receives current trends, generates a topic and a prompt for videos, creates videos via AI, saves results to Google Sheets and publishes them on TikTok.
Detailed automation architecture
Purpose: Entry point to start automation
Settings:
Purpose: Gets trending topics from Google Trends
HTTP Request settings:
What we get: An array of trending_searches with current trending queries that are used to generate video ideas.
Purpose: AI selects one of the trending topics and creates a short video topic
Connected components:
Prompt:
You're an AI agent who should generate me a topic for a viral video made on Google veo3.
Describe the topic briefly in English - two or three words, without comments. Here are the current trending topics from which you should choose one: {{$json.trending_searches [1] .query}}, {{$json.trending_searches [2] .query}}, {{$json.trending_searches [3] .query}}, {{$json.trending_searches [4] .query}}, {{$json.trending_searches [5] .query}}, {{$json.trending_searches [6] .query}}, {{$json.trending_searches [7] .query}}, {{$json.trending_searches [8] .query}} {$json.trending_searches [9] .query}}, {{$json.trending_searches [10] .query}}, {{$json.trending_searches [11] .query}}
Input data: Trending topics from positions 1-11 from SerpAPI results.
The result: A short topic in English (2-3 words) based on current trends.
Purpose: AI creates a detailed Google Veo3 prompt based on the chosen topic
Connected components:
Input data:
{{$json.output}}
(Topic generated by the previous node)
System prompt:
You are an AI designed to create a veo of 3 texts for a video to create a viral social media video on a given topic. The prompt should describe one 8-second frame. Indicate that you are shooting with a selfie stick held by the character. There should only be one main character to whom you give a random name.
Here is an example of an assignment
A cinematic shot of Chris (a 28-year-old man, large muscles, toned, athletic, wearing a sleeveless shirt) shooting a selfie video in an empty zoo. Chris yells emotionally: I snuck into the zoo to prove that penguins are friendly. The camera quickly moves to a group of penguins who are playing and looking cute.
Make sure that the length of your output is similar to the example. Let one sentence start with the character's name, followed by a dialogue sentence.
Generate a prompt in English.
Prompt structure:
The result: A detailed English prompt for Veo3, ready for creating a viral video.
Purpose: Saves the generated prompt to Google Sheets for tracking
Google Sheets settings:
Table structure:
Prompt
Status
URL
[AI prompt]
todo
[empty]
Purpose: Sends a video creation request via the Veo3 API
HTTP Request settings:
What's going on:
The result:
{
“status”: “IN_QUEUE”,
“request_id”: “dab5d6d9-F5d1-4a17-8cfb-3a18ff367e30",
“response_url”:” ... “,
“status_url”:” ... “,
“queue_position”: 0
}
STEP 5: WAITING AND CHECKING STATUS
Purpose: Pause before checking the generation status
Settings:
Purpose: Checks if the video is ready
HTTP Request settings:
Possible statuses:
Purpose: Checks status and decides what to do next
Condition:
{{$json.status}} equals “COMPLETED”
Logic:
It is important: A Wait → Check → If loop is created.
Purpose: Downloads the finished video
HTTP Request settings:
The result:
{
“video”: {
“url”: "https://v3.fal.media/files/penguin/fKiVQAHafyY5hvWC585eU_output.mp4 “,
“content_type”: “video/mp4",
“file_name”: "output.mp4 “,
“file_size”: 2661251
}
}
6.2 Update the table - Add video to the table
Purpose: Updates the status and adds the video URL to Google Sheets
Google Sheets settings:
The result is in the table:
Prompt
Status
URL
[AI prompt]
done
[video URL]
Purpose: Sets account IDs for various social platforms
JSON configuration:
{
“blotato_api_key”: “”,
“instagram_id”: “”,
“youtube_id”: “”,
“tiktok_id”: “”,
“facebook_id”: “”,
“facebook_page_id”: “”,
“threads_id”: “”,
“twitter_id”: “”,
“linkedin_id”: “”,
“pinterest_id”: “”,
“pinterest_board_id”: “”,
“bluesky_id”: “”,
“video_caption”: “{{$ ('Theme Generation') .item.json.output}}”
}
It is important: Fill in your real account IDs and the Blotato API key for the publication to work.
You can get them in the Settings section in Blotato https://my.blotato.com/settings
Purpose: Uploads videos to Blotato for publication
HTTP Request settings:
The result: Blotato returns the internal URL of the uploaded video for use in posts.
Purpose: Creates and publishes a TikTok post
HTTP Request settings:
JSON Body:
{
“post”: {
“target”: {
“targetType”: “tiktok”,
“isYourBrand”: false,
“DisabledDuet”: false,
“PrivacyLevel”: “PUBLIC_TO_EVERYONE”,
“IsaiGenerated”: false,
“DisabledStitch”: false,
“DisabledComments”: false,
“isBrandedContent”: false
},
“content”: {
“text”: “{{$ ('Set Accounts') .item.json.video_caption}}”,
“platform”: “tiktok”,
“MediaURLS”: ["{{$json.url}}"]
},
“accountID”: “{{$ ('Set Accounts') .item.json.tiktok_id}}”
}
}
Post settings:
Main stream:
Video waiting cycle: 6. Create a video → Wait 7. Wait → Verification 8. Verification → If 9. If (False) → Wait (repeat the cycle) 10. If (True) → Get the video
Publication: 11. Get the video → Add video to the table 12. Add video to the table → Set Accounts 13. Set Accounts → Upload 14. Upload → TIKTOK
AI Connections:
In a node Set Accounts enter real IDs:
Create a table with columns:
This automation turns current trends into ready-made viral videos for TikTok in 5-10 minutes!
You can always get a JSON file and instructions in video format by joining our unique Automation club.