Create trending Instagram content with AI image creation
Workflow Description
Automated workflow for creating visually engaging Instagram content using AI image generation on a recurring schedule. Processes trend data from Postgres, manages batch operations, and distributes posts across Instagram, Facebook, and Telegram seamlessly.
How it works
- 1.Schedule automated execution at predefined intervals
- 2.Query database for trending topics and split into manageable batches
- 3.Generate optimized content descriptions using OpenAI language models
- 4.Create high-quality images with AI image generation
- 5.Publish finalized content to Instagram and Facebook accounts
- 6.Send confirmation notifications via Telegram
Use cases
- Generate daily Instagram posts consistently without manual intervention
- Produce images aligned with current trending topics for maximum engagement
- Manage multi-platform social media campaigns from a single automation
Requirements
- Valid OpenAI API credentials with image generation access
- Facebook and Telegram authentication configured in n8n
- Postgres database containing content topics and relevant keywords
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (44)
If media status is finished
If
If media status is finished1
If
Telegram
Set
Telegram1
Set
Telegram2
Set
Loop Over Items
Split In Batches
Schedule Trigger1
Schedule Trigger
Telegram Params
Set
Instagram params
Set
Sticky Note2
Sticky Note
Rapid Api params
Set
filter the image content
Code
get top trends on instagram #blender3d
HTTP Request
get top trends on instagram #isometric
HTTP Request
merge the array content
Merge
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
Check Data on Database Is Exist
Postgres
If Data is Exist
If
Sticky Note9
Sticky Note
send error message to telegram
Set
insert data on db
Postgres
Analyze Image and give the content
OpenAI
Analyze Content And Generate Instagram Caption
OpenAI
Sticky Note
Sticky Note
Prepare data on Instagram
Facebook Graph Api
Check Status Of Media Before Uploaded
Facebook Graph Api
Publish Media on Instagram
Facebook Graph Api
Check status of post
Facebook Graph Api
Sticky Note1
Sticky Note
Sticky Note10
Sticky Note
filter the image content-2
Code
Sticky Note11
Sticky Note
Replicate params
Set
Generate image on flux
HTTP Request
Sticky Note12
Sticky Note
Sticky Note13
Sticky Note
Sticky Note14
Sticky Note
Sticky Note15
Sticky Note
Sticky Note16
Sticky Note