AI Agents

Create trending Instagram content with AI image creation

44 nodes 214 133 Scheduled trigger
Download

Workflow Description

Comprehensive automation template that generates trending Instagram content using AI-powered image creation. Operates on a scheduled trigger, leverages OpenAI for image generation, stores data in Postgres, and publishes through Facebook. Includes batch processing and intelligent filtering to ensure content quality.

How it works

  1. 1.Activate scheduled trigger and call OpenAI to generate trending Instagram content ideas and images
  2. 2.Process generated images in batches using Split In Batches with conditional filtering for quality control
  3. 3.Store processed data in Postgres database and send notification alerts via Telegram
  4. 4.Publish finalized content to Facebook Graph API with result merging and logging

Use cases

  • Manage multiple Instagram accounts automatically with trend-responsive content and scheduled posting
  • Generate and distribute ad-ready images across social media channels with minimal manual intervention

Requirements

  • Valid API keys for OpenAI, Facebook Graph API, and Telegram Bot
  • Postgres database configured with tables for content logs and generated image metadata

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 214
Downloads 133

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