πŸ“± Automate product ad creation with Telegram, Fal.AI & Facebook posting

⚑ 1,063 views Β· πŸ“± Social Media & Email Marketing

πŸ’‘ Pro Tip β€” Heads up β€” if this workflow’s Instagram scraping breaks (it happens whenever Meta updates their frontend), ScraperNode is a community node that handles profiles, posts, reels, and comments without any HTML parsing.

View All Scrapers

Description

This workflow automates the entire process of creating and publishing social media ads β€” directly from Telegram.
By simply sending a product photo to your Telegram bot, the system analyzes the image, generates an AI-based advertising prompt, creates a marketing image via Fal.AI, writes an engaging Facebook/Instagram caption, and posts it automatically.

This template saves hours of manual work for marketers and small business owners who constantly need to design, write, and publish product campaigns. It eliminates repetitive steps like prompt writing, AI model switching, and post scheduling β€” letting you focus on strategy, not execution.

The workflow integrates seamlessly with Fal.AI for image generation, OpenAI Vision for image analysis, and the Facebook Graph API for automated publishing.
Whether you’re launching a 10.10 campaign or promoting a new product line, this template transforms your product photo into a ready-to-publish ad in just minutes.


Who’s it for

This workflow is designed for:


What problem does this solve

Manually creating ad images and captions is time-consuming and repetitive.
You need to:

  1. Edit the product photo.
  2. Write a creative brief or prompt.
  3. Generate an image in Fal.AI or Midjourney.
  4. Write a caption.
  5. Log into Facebook and post.

This workflow combines all five steps into one automation β€” triggered directly by sending a Telegram message.
It handles AI analysis, image creation, caption writing, and posting, removing human friction while maintaining quality and creative control.


What this workflow does

The workflow is divided into four main zones, color-coded inside the canvas:

🟩 Zone 1 – Product Image Analysis

πŸŸ₯ Zone 2 – Generate Ad Image Prompt

🟨 Zone 3 – Create Ad Image via Fal.AI

🟦 Zone 4 – Write Caption & Publish


Setup

Prerequisites

Steps

  1. Create a Telegram Bot and paste its token into n8n Credentials.
  2. Set up Fal.AI Credentials under HTTP Request β†’ Authentication.
  3. Connect your Facebook Page through Facebook Graph API credentials.
  4. In the HTTP Request node, set:
    • URL: https://fal.run/fal-ai/nano-banana
    • Auth: Bearer {{ $credentials.FalAI.apiKey }}
  5. Configure all LLM and Vision nodes using your OpenAI credentials.

Node settings

🟩 Analyze Image (OpenAI Vision)

{
  "model": "gpt-4o-mini",
  "input": [
    {
      "role": "user",
      "content": [
        { "type": "image_url", "image_url": "{{$json.image_url}}" },
        { "type": "text", "text": "Describe this product in detail for advertising context." }
      ]
    }
  ]
}

πŸŸ₯ Set Node – Prepare Fal.AI Body

{
  "prompt": {{ JSON.stringify(($json.ad_prompt || '').replace(/\r?\n/g, ' ')) }},
  "image_urls": [{{ JSON.stringify($json.image_url || '') }}],
  "num_images": 1,
  "output_format": "jpeg"
}

🟦 HTTP Request (Facebook Graph API)

{
  "method": "POST",
  "url": "https://graph.facebook.com/v19.0/me/photos",
  "body": {
    "caption": "{{ $json.caption_text }}",
    "url": "{{ $json.final_image_url }}",
    "access_token": "{{ $credentials.facebook.accessToken }}"
  }
}

How to customize the workflow


Troubleshooting

ProblemCauseSolution
Telegram message not triggeringWebhook misconfiguredReconnect Telegram Trigger
Fal.AI API errorInvalid JSON or tokenUse JSON.stringify() in Set node and check credentials
Facebook upload failsMissing permissionsEnsure Page Access Token has pages_manage_posts
LLM parser errorOutput not valid JSONAdd Structured Output Parser and enforce schema

⚠️ Security Notes


🏷️ Hashtags

#n8n #Automation #AIworkflow #FalAI #FacebookAPI #TelegramBot #nanobanana #NoCode #MarketingAutomation #SocialMediaAI #JaruphatJ #WorkflowTemplate #OpenAI #LLM #ProductAds #CreativeAutomation

Product Image

Alt text

Process Step

Alt text Alt text Alt text Alt text

πŸ”— Nodes Used

HTTP Request, Telegram, Telegram Trigger, Facebook Graph API, AI Agent, OpenAI Chat Model

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup