Post to Discord from Codex
Codex can post to Discord channels through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your Discord server in Postiz, then say which channel and what to send. Codex writes the message, attaches uploaded media, and schedules it, so release notes and reminders land in Discord on time.
Please make sure there is always a human in the loop.
Last updated: September 2026
How do I post to Discord from Codex?
Set up Codex once with the Postiz skill or the Postiz MCP server, connect Discord 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 release notes to the
#announcements Discord channel at 10am
Codex: Done! Your Discord post is scheduled.Discord-Specific Features
Channel Messaging
Send messages directly to any Discord channel. Target announcements, general chat, or dedicated content channels.
Media Attachments
Attach images, videos, and files to your Discord messages. Share rich content with your community automatically.
Scheduled Messages
Schedule Discord messages for specific times. Perfect for announcements, event reminders, and timed content drops.
Bot Integration
Works through your Discord bot connection. Post messages as your bot to any server and channel it has access to.
Community Updates
Automate recurring community updates, changelogs, and newsletters. Keep your Discord server engaged on autopilot.
Multi-Channel
Post to different channels with different messages. Customize content for each channel in your Discord server.
How does Codex post to Discord?
You describe what you want in plain language and Codex handles the Postiz calls for you. Here is how a typical conversation goes.
Find Your Discord Integration
Ask Codex whether your Discord account is connected. It also checks which options the platform supports.
Example conversation
> Is my Discord account connected to Postiz?
Codex: Yes — your Discord account is connected
and ready. Want me to post something?Get Your Channel ID
Find the Discord channel ID where you want to post. In Discord, enable Developer Mode, then right-click the channel and copy its ID.
Example conversation
> Draft a Discord post about our new
feature launch
Codex: Here's a draft for Discord:
"We just shipped something big..."
Want me to add media and schedule it?Create Your Message
Schedule a Discord message with your content, optional media attachments, and the target channel ID.
Example conversation
> Yes — add screenshot.png and schedule
it for tomorrow at 9am
Codex: Done! Scheduled on Discord for
tomorrow at 9:00 AM.Discord Settings Reference
Mention any of these in plain language and Codex sets them for you. These are the options every Discord message can carry.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "discord" |
channel | string | Discord channel ID to post to |
Common Configurations
Ask Codex for any of these common Discord messaging scenarios and it applies the matching settings.
Announcement Channel Message
Just ask
> Post it with: Announcement Channel Message
Codex: Got it. Applying:
channel: 123456789012345678Message with Media Attachment
Example
> Post "Excited to announce our new feature!" to
Discord and LinkedIn tomorrow at 9am, then schedule
a daily tip on Discord every weekday at 10am
Codex: Done! Scheduled:
- Discord + LinkedIn: tomorrow 9:00 AM
- Daily tips on Discord: Mon-Fri 10:00 AMScheduled Weekly Update
Example
> What's scheduled on Discord this week?
Codex: 6 posts on Discord: 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 Posting
Example
> What's scheduled on Discord this week?
Codex: 6 posts on Discord: 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 Discord 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 Discord 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 Discord"Discord Messaging 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 Discord about our
new feature launch, schedule for
tomorrow at 9am"
Codex: I'll handle that.
Found your Discord 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 Discord
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 Discord 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 Discord + 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 Discord
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>
# Discord Settings
channel (required channel ID)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 Discord 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 Discord integration, identifies the right channel, and sends your message with any attachments.
Claude Code
> Send an announcement to our Discord
#releases channel that v2.0 is live,
attach the changelog screenshot
Claude: Done! Scheduled on Discord for
tomorrow at 9:00 AM.Can Codex post to Discord and other platforms at once?
Schedule the same announcement to Discord and other platforms in a single command. Each platform gets its own settings.
Example
> What's scheduled on Discord this week?
Codex: 6 posts on Discord: 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 Discord?
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 Discord.
Prompts for Discord
> Send the release notes from CHANGELOG.md to the #announcements
Discord channel at 10am
$ codex exec "Post 'Deploy finished for v2.4' with ./build/summary.png
to the #dev-updates Discord channel now"
> $postiz Schedule a Monday 9am reminder in #general
for the next four weeksWhat Discord rules should Codex follow?
These are the Discord limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.
- ✓channel is required and holds the Discord channel ID; Codex resolves #channel-name through postiz integrations:settings.
- ✓Discord messages are limited to 2,000 characters; ask Codex to split longer updates.
- ✓Postiz posts through the Postiz bot, so the bot must have access to the target channel.
- ✓Images, video, and files go through postiz upload before they are attached.
Codex and Discord FAQ
How do I post to Discord 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 Discord in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the Discord settings, uploads any media, and schedules the post.
How does Codex know which Discord channel to post in?
Postiz lists the channels the Postiz bot can see on your server through postiz integrations:settings. Codex matches the channel name in your prompt, like #announcements, to its channel ID and puts it in the required channel setting. If the bot lacks access to a channel, Codex will not find it and asks.
Can Codex attach files or images to a Discord message?
Yes. Codex uploads the file with postiz upload and attaches the returned URL to the message; raw paths and external links are not accepted by the publishing pipeline. Images, video, and documents work. Keep the text under Discord's 2,000-character limit, or ask Codex to split it into several messages.
Can Codex post to Discord on a schedule without me watching?
Yes. Postiz stores scheduled Discord 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 Discord 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 Discord. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your Discord login itself never leaves Postiz.
Is posting to Discord 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 Discord; see the ChatGPT guide for that setup.
Related Codex and Discord 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 Slack from Codex
→Slack settings, prompts, and rules for Codex.
Post to Telegram from Codex
→Telegram settings, prompts, and rules for Codex.
Post to Twitch from Codex
→Twitch settings, prompts, and rules for Codex.
Post to Kick from Codex
→Kick settings, prompts, and rules for Codex.
Discord channel on Postiz
→How Postiz connects to Discord, 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 Discord
Install Postiz Agent and automate your Discord community messaging with AI-powered scheduling and publishing.