AI Agents

Create trending Instagram content with AI image creation

44 nodes 229 146 Scheduled trigger
Download

Workflow Description

Automation template that generates trend-aligned Instagram content using AI image generation, with scheduled publishing via Facebook. Extracts product data from a database, creates images using OpenAI, and distributes content in regular batches without manual intervention.

How it works

  1. 1.Execute on a predefined schedule automatically
  2. 2.Retrieve content and product data from Postgres database
  3. 3.Generate images and text using OpenAI based on current trends
  4. 4.Batch process content for systematic publication
  5. 5.Publish to Facebook and send notifications via Telegram

Use cases

  • Run consistent social media campaigns hands-free across channels
  • Generate multiple on-trend images daily or weekly at scale

Requirements

  • Active OpenAI API key and configured Telegram Bot token
  • Postgres database containing product and content data

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 229
Downloads 146

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