Telegram Content Pack Factory avatar

Telegram Content Pack Factory

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Telegram Content Pack Factory

Telegram Content Pack Factory

Generate ready-to-post social media content packs from topics and send them to Telegram for review. Creates hooks, scripts, captions, hashtags and AI images via FLUX. Supports TikTok, Instagram, YouTube Shorts and LinkedIn with multi-language output. Results stored in dataset and Key-Value Store.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

Hayder Al-Khalissi

Hayder Al-Khalissi

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

8 hours ago

Last modified

Share

What does Telegram Content Pack Factory do?

Telegram Content Pack Factory is an Apify Actor that generates social content packs from topics you provide and delivers them to Telegram for approval. You give it a list of topics (e.g. "AI automation for small business"), choose platform (TikTok, Instagram, YouTube Shorts, LinkedIn), language (English, German, Arabic), and style—then the Actor produces hooks, script points, captions, hashtags, and AI-generated images for each post and sends a digest to your Telegram chat with previews and links. It does not scrape websites or render video; it creates ready-to-use content for social posts and stores everything in Apify Dataset and Key-Value Store (plus optional ZIP). The easiest way to try it is to set topics, telegramBotToken, telegramChatId, and a FLUX endpoint URL in the input and run the Actor.

What can Telegram Content Pack Factory do?

  • Generate multiple content packs — One or more topics × packs per topic × posts per pack (hooks, bullet/scene scripts, captions, hashtags).
  • Generate images via FLUX — Calls your own or a third-party FLUX-compatible HTTP endpoint to create one image per post; supports PNG or base64 JSON responses and optional auth headers.
  • Deliver to Telegram — Sends one digest message per pack to your Telegram bot chat: pack title, preview image, list of hooks, links to the Apify dataset and optional ZIP. Optional inline buttons (Approve / Regenerate / Reject / Export ZIP) for future webhook integration.
  • Store everything in Apify — Each post is saved as a Dataset item; images and pack summaries go to the default Key-Value Store; optional ZIP per pack when enabled.
  • Multi-language and multi-platform — Supports English, German, and Arabic output; targets TikTok, Instagram, YouTube Shorts, or LinkedIn with platform-appropriate hooks and captions.
  • Control cost and speed — Set packs per topic, posts per pack, and max concurrency for image generation to fit your budget and timeline.

Remember the Apify platform: this Actor runs on Apify, so you get monitoring, API access, scheduling, and integrations (e.g. n8n, Make) out of the box. You can trigger runs programmatically, inspect results in the Console, and download datasets in JSON, CSV, Excel, or HTML.

What data can Telegram Content Pack Factory produce?

DataDescription
HookOne-line hook per post for the chosen platform and language.
Script5–8 (or 3–6) bullet/scene points per post.
CaptionShort caption text per post.
HashtagsPlatform-relevant hashtags per post.
ImageOne generated image per post (via your FLUX endpoint), stored in Key-Value Store.
Image promptThe prompt used to generate each image (stored in the dataset).
Pack summaryJSON summary per pack (topic, packId, post count, refs) in Key-Value Store.
ZIPOptional ZIP per pack containing scripts, captions, and images.

How to use Telegram Content Pack Factory to generate social content

  1. Create a Telegram bot — In Telegram, open @BotFather, create a new bot, and copy the token. Get your chat ID (e.g. send /start to your bot, then call https://api.telegram.org/bot<TOKEN>/getUpdates and read message.chat.id, or use @userinfobot).
  2. Prepare a FLUX endpoint — You need an HTTP endpoint that accepts POST with { "prompt", "width", "height", "seed?" } and returns either a binary image (Content-Type: image/png) or JSON { "imageBase64", "mimeType" }. Use your own service or a compatible API.
  3. Open the Actor input — Click the Input tab on this Actor’s detail page. Fill in topics (e.g. ["AI automation for small business"]), telegramBotToken, telegramChatId, fluxEndpoint, and leave imageMode as endpoint. Adjust packsPerTopic, postsPerPack, language, platform, and stylePreset as needed.
  4. Run the Actor — Start the run from the Console or via the Apify API. The Actor will generate packs, call your FLUX endpoint for each image, save results to the default Dataset and Key-Value Store, and send one Telegram digest per pack.
  5. Check results — In Apify Console, open the run’s Dataset for post records and Key-Value Store for packs/<packId>.json, images/..., and optionally zips/<packId>.zip. In Telegram you’ll see the digest messages with preview and links.

How much does it cost to run Telegram Content Pack Factory?

Cost depends on Apify compute and storage plus any external APIs you use.

  • Apify — You pay for compute time and storage (Dataset + Key-Value Store). Use the Pricing section on the Actor page to see current rates. Fewer topics, packs, and posts mean lower cost.
  • Telegram — The Telegram Bot API is free within normal usage limits.
  • FLUX endpoint — Your own or third-party image API; cost varies by provider and number of images (topics × packsPerTopic × postsPerPack).

To reduce cost while testing: set packsPerTopic to 1, postsPerPack to 2–3, and maxConcurrency to 1–2. You can scale up once you’re happy with the output.

Input

Telegram Content Pack Factory has the following input options. Click the Input tab on this Actor’s detail page for the full schema and tooltips.

InputRequiredDescription
topicsYesList of topics (e.g. ["AI automation", "Productivity tips"]).
telegramBotTokenYesYour Telegram bot token from @BotFather.
telegramChatIdYesChat or channel ID where digests are sent.
fluxEndpointYes (if imageMode=endpoint)URL of your FLUX-compatible image API.
packsPerTopicNo (default: 1)Number of packs per topic (1–10).
postsPerPackNo (default: 6)Number of posts per pack (1–30).
languageNo (default: en)Output language: en, de, or ar.
platformNo (default: tiktok)Target: tiktok, instagram, youtube_shorts, linkedin.
stylePresetNo (default: clean_minimal)Image style: e.g. clean_minimal, luxury, photoreal.
brandNoOptional object: name, colors[], tone.
imageModeNo (default: endpoint)endpoint (use FLUX URL) or local (not enabled in this build).
fluxEndpointAuthHeaderNoe.g. Authorization: Bearer YOUR_KEY.
approvalModeNo (default: inline_buttons)inline_buttons or digest_only.
zipOnApproveNo (default: true)Create a ZIP per pack in Key-Value Store.
maxConcurrencyNo (default: 2)Max concurrent image requests (1–10).

Output

The Actor writes to the default Dataset and default Key-Value Store. You can download the dataset in JSON, CSV, Excel, or HTML from the run page or via the Apify API.

Dataset — One item per post, for example:

{
"topic": "AI automation for small business",
"packId": "AI-automation-pack-0-1739800000000",
"postIndex": 0,
"hook": "You need to see this: AI automation for small business",
"script": ["[en] Scene 1/5: ...", "[en] Scene 2/5: ..."],
"caption": "Quick take on AI automation for small business. Save this.",
"hashtags": ["#AIautomationforsmallbusiness", "#content", "#tiktok"],
"imageFiles": ["images/AI-automation-pack-0-1739800000000/0.png"],
"imagePrompts": ["You need to see this: ... clean minimal style..."],
"createdAt": "2025-02-17T12:00:00.000Z"
}

Key-Value Store:

  • packs/<packId>.json — Pack summary (topic, packId, post count, post refs).
  • images/<packId>/<postIndex>.png — Generated image files.
  • zips/<packId>.zip — Optional; pack ZIP (scripts, captions, images) when zipOnApprove is true.

Use the Apify storage API or Console to get public URLs for images and ZIPs.

FLUX endpoint contract (image generation)

When imageMode is endpoint, the Actor sends POST requests to your fluxEndpoint.

Request body (JSON):

{
"prompt": "Your image prompt text",
"width": 1024,
"height": 1024,
"seed": 42
}

Response — Either:

  1. Binary imageContent-Type: image/png (or other image/*), body = raw image bytes.
  2. JSONContent-Type: application/json, body: { "imageBase64": "<base64>", "mimeType": "image/png" }.

Optional auth: set fluxEndpointAuthHeader to a raw header line (e.g. Authorization: Bearer YOUR_KEY).

How to connect the FLUX endpoint

This Actor does not run FLUX itself. You provide an HTTP endpoint that generates images from a text prompt. Follow these steps to connect one.

Step 1: Choose a FLUX-compatible service

You need an API that:

  • Accepts POST requests with a JSON body: { "prompt": "...", "width": 1024, "height": 1024, "seed": optional }.
  • Returns either:
    • Binary image — response Content-Type: image/png (or image/jpeg) and body = raw image bytes, or
    • JSONContent-Type: application/json and body: { "imageBase64": "<base64 string>", "mimeType": "image/png" }.

Options:

OptionWhat to do
ReplicateUse a FLUX model (e.g. black-forest-labs/flux-schnell or FLUX Pro). Get your API token from replicate.com/account. You may need a small wrapper that converts Replicate’s API to the request/response format above, or use Replicate’s webhook/HTTP API if it matches.
Fal.aiRun a FLUX model on fal.ai. Get an API key and use their image generation endpoint. This Actor supports fal natively — see "Using fal.ai" below.
Google Imagen / GeminiUse Vertex AI Imagen or Google AI image generation. This Actor supports Google natively — see "Using Google Imagen / Gemini Image API" and "Using Nano Banana 2" below.
RunPod / Modal / your serverDeploy a FLUX inference server (e.g. ComfyUI or a minimal FastAPI/Flask app) that exposes a POST route accepting prompt, width, height, seed and returning PNG bytes or { imageBase64, mimeType }.
Apify FLUX ActorIf an Apify Actor exists that runs FLUX and exposes an HTTP endpoint or webhook, use that URL as fluxEndpoint (and any auth it needs in fluxEndpointAuthHeader).
Local testFor local runs only: use the mock server in this repo — run node scripts/mock-flux-server.cjs and set fluxEndpoint to http://localhost:3333/.

If your provider returns image URL instead of binary/base64, you need a small proxy (e.g. a serverless function or Apify Actor) that: receives the Actor’s POST, calls the provider, downloads the image, then responds with either raw PNG bytes or { imageBase64, mimeType }.

Step 2: Get the endpoint URL and (if needed) auth

  • URL — The full URL your service expects for “generate image”, e.g. https://api.example.com/v1/generate or https://your-server.run.app/generate. It must be reachable from the internet (Apify runs in the cloud).
  • Auth — If the API requires a key or token, you will paste one header line in the Actor input (Step 3).

Step 3: Fill the Actor input

  1. Open this Actor on Apify (Console or Store).
  2. Go to the Input tab.
  3. In Image generation:
    • Image mode — leave as Endpoint (HTTP API).
    • FLUX endpoint URL — paste your endpoint URL (e.g. https://api.example.com/generate).
    • Endpoint auth header (optional) — if your API needs auth, add one line, e.g. Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_KEY. Leave blank if the endpoint is public.
  4. Fill Topics and Telegram delivery (bot token, chat ID) as usual, then run the Actor.

Step 4: Verify it works

  • Run the Actor with Posts per pack set to 1 or 2 for a quick test.
  • If the FLUX endpoint is wrong or the response format is invalid, the run will fail with an error like FLUX endpoint 4xx/5xx: ... or Unsupported FLUX response Content-Type.
  • Check your endpoint’s logs to confirm it receives POSTs with prompt, width, height and that it returns either binary PNG or the JSON shape above.

Summary

Actor input fieldWhat to put
Image modeEndpoint (HTTP API)
FLUX endpoint URLYour service URL (e.g. https://api.example.com/generate)
Endpoint auth headerOne header line if required (e.g. Authorization: Bearer KEY), or leave empty

The Actor will send one POST per generated image; the number of images is topics × packsPerTopic × postsPerPack. Use Max concurrency to limit parallel requests to your endpoint.

Using fal.ai as your FLUX endpoint

fal.ai does not show a single “endpoint URL” on the Fast FLUX docs because they emphasize the JavaScript client. You can still use fal via REST with the following.

  1. Get an API key
    Create one at fal.ai/dashboard/keys.

  2. Use this endpoint URL in the Actor

    • Synchronous (request waits until the image is ready):
      https://fal.run/fal-ai/flux/schnell
    • Or FLUX.1 schnell:
      https://fal.run/fal-ai/flux-1/schnell
    • Other models (e.g. dev):
      https://fal.run/fal-ai/flux/dev
  3. Set the auth header in the Actor
    In Endpoint auth header (optional) enter exactly (replace with your key):
    Authorization: Key YOUR_FAL_KEY
    Note: fal uses Key, not Bearer.

  4. Paste in the Actor input

    • FLUX endpoint URL: https://fal.run/fal-ai/flux/schnell
    • Endpoint auth header: Authorization: Key YOUR_FAL_KEY

This Actor automatically sends a fal-compatible request body (prompt, image_size: { width, height }, seed) and handles fal’s response format (image URL in images[0].url) by downloading the image. No proxy needed.

Using Google Imagen / Gemini Image API

You can use Vertex AI Imagen or Google AI (Gemini) image generation as your endpoint. The Actor detects URLs containing aiplatform.googleapis.com or generativelanguage.googleapis.com and sends the Imagen/Gemini predict format; it then reads the response from predictions[0].bytesBase64Encoded and mimeType.

Vertex AI Imagen

  1. Enable the Vertex AI API and Imagen in your Google Cloud project.
  2. Endpoint URL — Use the predict URL for your model, for example:
    https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/publishers/google/models/imagen-3.0-generate-002:predict
    Replace REGION (e.g. us-central1), PROJECT_ID, and the model name as needed (e.g. imagen-3.0-fast-generate-001, imagen-4.0-generate-001).
  3. Auth — Use a Bearer token (e.g. from Application Default Credentials or a service account). In Endpoint auth header set:
    Authorization: Bearer YOUR_ACCESS_TOKEN
    For Apify, you can use a secret that runs gcloud auth print-access-token or store a short-lived token; for production, consider a serverless proxy that adds the token.
  4. Paste FLUX endpoint URL and Endpoint auth header in the Actor input and run.

Google AI (Gemini) image API

If your endpoint is under generativelanguage.googleapis.com (e.g. Google AI Studio / Gemini image generation), use that full predict URL as FLUX endpoint URL and set Endpoint auth header to your API key, for example:
x-goog-api-key: YOUR_GOOGLE_AI_API_KEY
(or the header name your API expects).

Using Nano Banana 2 (Gemini 2.5 Flash Image)

Nano Banana 2 is Google’s Gemini 2.5 Flash Image model. This Actor supports it via the same Google AI endpoint. For best results:

  1. FLUX endpoint URL:
    https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent
  2. Endpoint auth header:
    x-goog-api-key: YOUR_GOOGLE_AI_API_KEY
    (use a Google AI API key or Google Cloud API key with Generative Language API enabled).
  3. Style preset: Choose Nano Banana 2 in the input. This preset uses prompts tuned for Gemini 2.5 Flash Image (clear, descriptive, natural-language style).

No proxy or extra setup is required; the Actor sends the correct generateContent request and reads the image from candidates[0].content.parts[].inlineData.

Notes

  • The Actor maps width and height to Imagen's aspect ratio (1:1, 3:4, 4:3, 9:16, 16:9). Exact pixel dimensions are not sent; Imagen chooses resolution (e.g. 1K/2K) per its API.
  • If you get 403, check that the project has Imagen enabled and that the token or API key has the right permissions.

Tips and advanced options

  • Telegram digest — Each pack gets one message: title, one preview image, hooks list, and links to the dataset and ZIP (if enabled). With approvalMode inline_buttons, the message includes Approve / Regenerate / Reject / Export ZIP buttons; in v1 these require an external webhook to handle clicks (e.g. n8n or Make triggering a new run).
  • Local modeNot enabled in this build. If you set imageMode to local, the Actor fails with a clear message; use imageMode endpoint and a fluxEndpoint instead. No ML dependencies are installed.
  • Integrations — Use the Apify API or an Apify node in n8n or Make to trigger runs. For button callbacks (Approve/Regenerate etc.), you need a webhook that receives Telegram callback_query events and can start a new Actor run with the right input.
  • Cost control — Lower packsPerTopic, postsPerPack, or maxConcurrency to reduce compute and image API usage.

FAQ and support

  • Use cases — Content teams and marketers who need batches of social post ideas (hooks, scripts, captions, images) delivered to Telegram for review, without building their own pipeline. Data is stored in Apify for further use via API or integrations.
  • API — You can run this Actor via the Apify API and fetch the Dataset and Key-Value Store results programmatically.
  • Integrations — Apify connects to n8n, Make, Zapier, and others; use the Apify node or HTTP request to trigger this Actor and pass input.
  • Feedback — If you run into issues or have feature ideas, use the Issues tab on this Actor’s page or contact the maintainer. We’re open to feedback and improvements.
  • Disclaimer — Use your Telegram bot and FLUX endpoint in line with Telegram’s and your image provider’s terms of service. The Actor does not scrape private user data; it only uses the credentials and endpoints you provide to generate and deliver content.