See llms.txt for all machine-readable content.

Back to Templates

Create human-approved Instagram posts with Gemini, Telegram, and Instagram

Created by

Created by: Buğra Şıkel || bugraskl
Buğra Şıkel

Last update

Last update 5 hours ago

Categories

Share


Quick Overview

This workflow collects an Instagram post request via an authenticated n8n form, uses Google Gemini to draft a caption from a submitted image and verified facts, sends the draft to Telegram for human approval, and publishes to Instagram via the Facebook Graph API only after approval.

How it works

  1. Receives a post request through an authenticated n8n form with a public HTTPS image URL, product name, verified facts, and an optional call to action.
  2. Validates the submission and downloads the image file from the provided URL.
  3. Sends the image and a guarded prompt to Google Gemini to generate a JSON draft containing a caption, five hashtags, a confidence score, and any risks.
  4. Applies deterministic checks (caption length, product-name inclusion, minimum confidence, banned phrases, risk flags, and exactly five unique hashtags) to decide whether the draft is eligible for review.
  5. If the draft passes, sends it to Telegram with a private approval link and pauses until a reviewer approves or rejects it.
  6. If approved, creates an Instagram media container and polls the Instagram Graph API until processing finishes.
  7. Publishes the post to Instagram, fetches the permalink, and confirms publication in Telegram, or reports rejection/processing delays back to Telegram without publishing.

Setup

  1. Configure Basic Auth for the request form and publish the workflow so requesters can access the production form URL.
  2. Add credentials for Google Gemini, Telegram, and Facebook Graph API (Meta) to the corresponding nodes.
  3. Update the brand settings, Telegram chat ID, Instagram user ID, Graph API version, model name, and moderation rules in the "Configure Brand and Channels" step.
  4. Use an Instagram professional account connected to a Facebook Page and ensure the submitted image URL is a publicly reachable HTTPS JPG/PNG/WebP that stays accessible while Meta processes the media container.