Post to Telegram from Codex
Codex can post to Telegram channels and groups through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect Telegram in Postiz by adding the Postiz bot to your channel, then ask. Codex writes the message, attaches uploaded media, and schedules delivery for the time you specify.
Please make sure there is always a human in the loop.
Last updated: September 2026
How do I post to Telegram from Codex?
Set up Codex once with the Postiz skill or the Postiz MCP server, connect Telegram in Postiz, then ask. The whole setup takes a few minutes.
Setup, then just ask
# One-time setup, option A: Postiz skill + CLI
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key # or: postiz auth:login
# One-time setup, option B: Postiz MCP server (OAuth, no key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz
# Then just ask Codex:
> Send the launch announcement to my
Telegram channel tomorrow at 9am
Codex: Done! Your Telegram post is scheduled.Telegram-Specific Features
Channel Messaging
Post messages directly to your Telegram channels. Reach all subscribers with announcements, updates, and content.
Group Messaging
Send messages to Telegram groups. Keep your community engaged with scheduled posts and automated content delivery.
Bot-Powered
Powered by the Telegram Bot API via BotFather. Create a bot, add it to your channel or group, and start posting just by asking Codex.
Media Sharing
Share images, videos, and documents alongside your messages. Upload media through Postiz and include it in your Telegram posts.
Scheduled Messages
Schedule messages for optimal delivery times with ISO timestamps. Plan your Telegram content calendar in advance.
Minimal Config
Telegram uses a streamlined setup — once connected, Codex routes messages to the right channel automatically. No complex platform-specific settings required.
How does Codex post to Telegram?
You describe what you want in plain language and Codex handles the Postiz calls for you. Here is how a typical conversation goes.
Set Up Your Telegram Bot
Create a bot using BotFather on Telegram, then add it to your channel or group as an administrator. Connect it to Postiz through the dashboard and you are ready to go.
Example conversation
> Is my Telegram account connected to Postiz?
Codex: Yes — your Telegram account is connected
and ready. Want me to post something?Send Your First Message
Post a message to your Telegram channel or group. Codex handles the routing — no additional settings needed for basic text messages.
Example conversation
> Draft a Telegram post about our new
feature launch
Codex: Here's a draft for Telegram:
"We just shipped something big..."
Want me to add media and schedule it?Schedule Messages
Schedule Telegram messages for future delivery using ISO timestamps. Perfect for content calendars, announcements, and automated updates.
Example conversation
> Yes — add screenshot.png and schedule
it for tomorrow at 9am
Codex: Done! Scheduled on Telegram for
tomorrow at 9:00 AM.Telegram Settings Reference
Telegram uses a minimal configuration. Once your bot is connected, Codex routes messages to the right channel or group — there is nothing else to set.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "telegram" to identify the platform (if using settings) |
Telegram's simplicity is a feature — your bot token and channel/group association are configured once in the Postiz dashboard. After that, just use the integration ID to route messages.
Common Configurations
Copy-paste these commands for common Telegram posting scenarios.
Simple Channel Announcement
Example
> Post "Excited to announce our new feature!" to
Telegram and LinkedIn tomorrow at 9am, then schedule
a daily tip on Telegram every weekday at 10am
Codex: Done! Scheduled:
- Telegram + LinkedIn: tomorrow 9:00 AM
- Daily tips on Telegram: Mon-Fri 10:00 AMScheduled Morning Update
Example
> What's scheduled on Telegram this week?
Codex: 6 posts on Telegram: the announcement tomorrow
at 9:00 AM and daily tips Mon-Fri at 10:00 AM.
Want me to move or cancel any of them?Media Post with Caption
Example
> What's scheduled on Telegram this week?
Codex: 6 posts on Telegram: the announcement tomorrow
at 9:00 AM and daily tips Mon-Fri at 10:00 AM.
Want me to move or cancel any of them?Multi-Channel Broadcast
Example
> What's scheduled on Telegram this week?
Codex: 6 posts on Telegram: the announcement tomorrow
at 9:00 AM and daily tips Mon-Fri at 10:00 AM.
Want me to move or cancel any of them?What is Codex?
Codex is OpenAI's coding agent. It runs as the Codex CLI in your terminal (npm install -g @openai/codex), as an IDE extension, and in the cloud, and it can run shell commands and call MCP servers, which is how it drives Postiz. Codex is not ChatGPT: ChatGPT is the chat assistant on chatgpt.com and connects to Postiz differently (see the ChatGPT guide). For the full setup, start at the Codex + Postiz hub.
Terminal & IDE Native
Codex runs in your terminal or IDE. You type what you want in plain English and it handles Postiz for you — no extra configuration needed.
Autonomous Execution
Codex runs commands inside a sandbox with approval rules you control, and works through multi-step tasks like discovering channels, uploading media, and scheduling Telegram posts.
Parallel Tasks
Run multiple Codex tasks simultaneously. Schedule posts to different platforms in parallel while Codex handles other coding work.
How Postiz Works with Codex
Codex discovers Postiz two ways: the postiz skill, which it loads from .agents/skills or ~/.agents/skills and which you can invoke with $postiz, or the Postiz MCP server added with codex mcp add. Either way it learns the available tools and chains them for Telegram workflows.
- ✓Install the Postiz skill with npx skills add, or add the Postiz MCP server with codex mcp add
- ✓Codex loads skills from .agents/skills and reads SKILL.md to learn the Postiz CLI
- ✓Authenticate with POSTIZ_API_KEY or postiz auth:login; the MCP route uses OAuth instead
- ✓Codex runs commands in its sandbox and asks for approval based on your permission settings
- ✓Works alongside your coding tasks in parallel
Install Postiz
# Install the Postiz skill
npx skills add gitroomhq/postiz-agent
# Set your API key
export POSTIZ_API_KEY=your_api_key
# Or add the Postiz MCP server instead (OAuth, no API key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz
# Then ask, interactively or headless
codex "list my social media integrations"
codex exec "post today's changelog to Telegram"Telegram Posting with Codex
Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Just Ask Codex
Terminal and IDE integration
Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Codex CLI
$ codex "Post to Telegram about our
new feature launch, schedule for
tomorrow at 9am"
Codex: I'll handle that.
Found your Telegram integration.
Composing and scheduling the post.
Done! Your post is scheduled.
Post ID: abc-123Parallel Tasks
Multiple tasks at once
Codex can handle multiple tasks in parallel. Schedule posts to different platforms while it works on other coding tasks simultaneously.
Codex Parallel Tasks
# Run multiple posting tasks in parallel
$ codex "Schedule a post about our
launch to X for tomorrow 9am" &
$ codex "Write a LinkedIn article
about our new feature and schedule
for tomorrow noon" &
$ codex "Fix the bug in auth.ts"
# All three tasks run simultaneouslyWhy Codex + Postiz for Telegram
Codex's autonomous execution makes Postiz a natural fit. The agent reads the SKILL.md to understand every available command, then autonomously chains them together for Telegram messaging workflows.
- ✓Runs in your terminal or IDE — just type what you want
- ✓Autonomous execution in sandboxed environments
- ✓Parallel task support — post while coding
- ✓Reads SKILL.md for automatic command discovery
- ✓Cross-post to Telegram + other platforms in a single session
- ✓Powered by OpenAI's most capable models
SKILL.md (loaded by Codex from .agents/skills)
---
name: postiz
description: Social media automation
CLI for scheduling posts across
30+ platforms including Telegram
homepage: https://docs.postiz.com/public-api/introduction
---
# Loaded by Codex from .agents/skills
# Invoke explicitly with $postiz
# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>
# Telegram
# Minimal settings — integration ID
# handles channel/group routing.
# Bot setup via BotFather.Also Works with Claude Code
Postiz works with any AI agent that can run commands or call MCP tools — you ask, the agent does the work. That includes Anthropic's Claude Code: see the Claude Code Telegram guide, or the Postiz Agent page for any other agent.
Claude Code
by Anthropic
Claude reads the Postiz skill so it knows what it can do, then autonomously discovers your Telegram integration, composes your message, uploads any media if needed, and sends it to your channel or group.
Claude Code
> Send an announcement to my Telegram
channel about our new feature launch,
include the screenshot, schedule for 3pm
Claude: Done! Scheduled on Telegram for
tomorrow at 9:00 AM.Can Codex post to Telegram and other platforms at once?
Send a Telegram message and post to social media simultaneously. Each platform gets its own settings.
Example
> What's scheduled on Telegram this week?
Codex: 6 posts on Telegram: the announcement tomorrow
at 9:00 AM and daily tips Mon-Fri at 10:00 AM.
Want me to move or cancel any of them?What can I ask Codex to post on Telegram?
Codex takes plain-English prompts in an interactive session, as a one-off codex exec command, or through the $postiz skill. These are the kinds of prompts people type for Telegram.
Prompts for Telegram
> Send the launch announcement to my Telegram channel
tomorrow 9am with ./assets/banner.png
$ codex exec "Post a short summary of today's merged PRs to the
team Telegram group at 6pm"
> $postiz What's scheduled on Telegram this week?
Move the Wednesday post to 8amWhat Telegram rules should Codex follow?
These are the Telegram limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.
- ✓Text messages can be up to 4,096 characters; captions on photos or video are limited to 1,024 characters.
- ✓The Postiz bot must be an administrator of the channel or group it posts to.
- ✓No extra settings are required beyond the channel type, so Telegram is one of the simplest channels to automate.
- ✓Media goes through postiz upload before it is attached.
Codex and Telegram FAQ
How do I post to Telegram from Codex?
Install the Postiz skill with npx skills add gitroomhq/postiz-agent, or add the Postiz MCP server with codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic. Connect Telegram in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the Telegram settings, uploads any media, and schedules the post.
How does Postiz connect Codex to my Telegram channel?
Through the Telegram Bot API. You add the Postiz bot to your channel or group as an administrator when connecting Telegram in Postiz. After that, Codex only needs the channel name in your prompt; there are no extra required settings, so a Telegram post is usually the simplest one to automate.
Are there length limits for Telegram posts from Codex?
Yes. Telegram allows up to 4,096 characters for a text message and 1,024 characters for a caption on a photo or video. If your update is longer and includes media, ask Codex to send the media with a short caption and the full text as a second message.
Can Codex post to Telegram on a schedule without me watching?
Yes. Postiz stores scheduled Telegram posts and publishes them at the chosen time, so Codex does not need to stay open. For unattended runs, call codex exec with your prompt from a script or cron job. Keep a human reviewing the output, since Codex will publish exactly what it is told to publish.
Do I need a Postiz API key to post to Telegram from Codex?
Not with the MCP route. Run codex mcp login postiz and Codex signs in to your Postiz account over OAuth, so it only reaches channels you already connected, including Telegram. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your Telegram login itself never leaves Postiz.
Is posting to Telegram from Codex the same as posting from ChatGPT?
No. Codex is OpenAI's coding agent for your terminal and IDE, and it reaches Postiz through the Postiz skill or MCP server. ChatGPT is the chat assistant on chatgpt.com, which connects to Postiz as an app or custom MCP connector. Both can publish to Telegram; see the ChatGPT guide for that setup.
Related Codex and Telegram guides
Start at the Codex hub for setup, or jump to another platform Codex can post to through Postiz.
Codex + Postiz overview
→Setup, skill vs MCP comparison, codex exec automation, and FAQ for OpenAI Codex.
Post to Discord from Codex
→Discord settings, prompts, and rules for Codex.
Post to Slack from Codex
→Slack settings, prompts, and rules for Codex.
Post to X from Codex
→X settings, prompts, and rules for Codex.
Post to Whop from Codex
→Whop settings, prompts, and rules for Codex.
Telegram channel on Postiz
→How Postiz connects to Telegram, features, and setup outside of any agent.
Postiz MCP server
→The OAuth MCP endpoint Codex, ChatGPT, Claude, and Cursor can all connect to.
Postiz Agent CLI
→The postiz CLI and skill that any AI agent can drive from a shell.
Post to social media from ChatGPT
→The chat-app route, for when you are not in a terminal.
Postiz pricing
→7-day free trial, with MCP, CLI and API access on every plan.
Start posting to Telegram
Install Postiz Agent and automate your Telegram channel messaging with AI-powered scheduling and delivery.