AI Agents

Create trending Instagram content with AI image creation

44 nodes 213 120 Scheduled trigger
Download

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. 1.Schedule automated execution at predefined intervals
  2. 2.Query database for trending topics and split into manageable batches
  3. 3.Generate optimized content descriptions using OpenAI language models
  4. 4.Create high-quality images with AI image generation
  5. 5.Publish finalized content to Instagram and Facebook accounts
  6. 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

Telegram Split In Batches Postgres OpenAI Facebook

Details

Trigger Scheduled trigger
Nodes 44
Apps 5
Views 213
Downloads 120

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (44)

/

If media status is finished

If

#1

If media status is finished1

If

#2

Telegram

Set

#3

Telegram1

Set

#4

Telegram2

Set

#5

Loop Over Items

Split In Batches

#6

Schedule Trigger1

Schedule Trigger

#7

Telegram Params

Set

#8

Instagram params

Set

#9

Sticky Note2

Sticky Note

#10

Rapid Api params

Set

#11

filter the image content

Code

#12

get top trends on instagram #blender3d

HTTP Request

#13

get top trends on instagram #isometric

HTTP Request

#14

merge the array content

Merge

#15

Sticky Note3

Sticky Note

#16

Sticky Note4

Sticky Note

#17

Sticky Note5

Sticky Note

#18

Sticky Note6

Sticky Note

#19

Sticky Note7

Sticky Note

#20

Sticky Note8

Sticky Note

#21

Check Data on Database Is Exist

Postgres

#22

If Data is Exist

If

#23

Sticky Note9

Sticky Note

#24

send error message to telegram

Set

#25

insert data on db

Postgres

#26

Analyze Image and give the content

OpenAI

#27

Analyze Content And Generate Instagram Caption

OpenAI

#28

Sticky Note

Sticky Note

#29

Prepare data on Instagram

Facebook Graph Api

#30

Check Status Of Media Before Uploaded

Facebook Graph Api

#31

Publish Media on Instagram

Facebook Graph Api

#32

Check status of post

Facebook Graph Api

#33

Sticky Note1

Sticky Note

#34

Sticky Note10

Sticky Note

#35

filter the image content-2

Code

#36

Sticky Note11

Sticky Note

#37

Replicate params

Set

#38

Generate image on flux

HTTP Request

#39

Sticky Note12

Sticky Note

#40

Sticky Note13

Sticky Note

#41

Sticky Note14

Sticky Note

#42

Sticky Note15

Sticky Note

#43

Sticky Note16

Sticky Note

#44