Automate Listmonk with Codex
Send email campaigns, manage mailing lists, configure templates and preview text, and automate newsletter delivery — all from the command line or through your AI agent.
Please make sure there is always a human in the loop.
Send a Listmonk Campaign in Seconds
Terminal
# Install the skill
npx skills add gitroomhq/postiz-agent
# Set your API key
export POSTIZ_API_KEY=your_api_key
# Find your Listmonk integration
postiz integrations:list
# Send an email campaign
postiz posts:create \
-c "Email body content..." \
--settings '{"subject":"Weekly Newsletter","preview":"This week in tech...","list":"list-1"}' \
-i "listmonk-id"Listmonk-Specific Features
Email Campaigns
Create and send email campaigns to your subscriber lists with rich HTML content, subject lines, and preview text.
Mailing Lists
Target specific subscriber lists by ID. Send campaigns to the right audience segment every time.
Template Support
Use pre-built email templates by specifying a template ID. Maintain consistent branding across all campaigns.
Preview Text
Set preview text that appears in email clients before the recipient opens the message. Boost open rates with compelling previews.
Newsletter Automation
Automate recurring newsletters with scheduled sends. Let AI agents craft and deliver content on a regular cadence.
Scheduled Delivery
Schedule email campaigns for optimal delivery times. Use ISO timestamps to send at exactly the right moment.
How It Works
Find Your Listmonk Integration
List your connected accounts and grab your Listmonk integration ID. You can also fetch available settings to see what options are supported.
Discovery
# List all integrations
postiz integrations:list
# Filter for Listmonk
postiz integrations:list | jq \
'.[] | select(.identifier=="listmonk")'
# Get Listmonk settings schema
postiz integrations:settings <listmonk-id>Compose Your Email
Write your email body content. The content flag accepts plain text or HTML. Pair it with a subject line and preview text in the settings.
Compose
# Simple text email
postiz posts:create \
-c "Hello subscribers! Here is your weekly update..." \
--settings '{"subject":"Weekly Update","preview":"Big news inside","list":"list-1"}' \
-i "listmonk-id"
# With HTML content
postiz posts:create \
-c "<h1>Newsletter</h1><p>Content here...</p>" \
--settings '{"subject":"March Newsletter","preview":"What happened this month","list":"list-2","template":"tmpl-1"}' \
-i "listmonk-id"Schedule and Send
Schedule your email campaign for a specific time or send immediately. Target a specific list and optionally apply a template for consistent formatting.
Schedule
postiz posts:create \
-c "Don't miss our spring sale!" \
-s "2025-03-01T09:00:00Z" \
--settings '{
"subject": "Spring Sale - 30% Off",
"preview": "Limited time offer inside",
"list": "list-1",
"template": "sale-template"
}' \
-i "listmonk-id"Listmonk Settings Reference
Every Listmonk campaign accepts these platform-specific settings via the --settings flag.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "listmonk" to identify the platform |
subject | string | Email subject line (min 1 character) |
preview | string | Preview text shown in email clients before opening |
list | string | List ID to send the campaign to |
template | string | Template ID to use for the email layout |
Common Configurations
Copy-paste these settings for common Listmonk campaign scenarios.
Weekly Newsletter
settings.json
{
"subject": "Weekly Newsletter - March Edition",
"preview": "This week: new features, tips, and community highlights",
"list": "list-1",
"template": "newsletter-tmpl"
}Product Announcement
settings.json
{
"subject": "Introducing Our New Feature",
"preview": "We've been working on something big...",
"list": "list-2"
}Promotional Campaign with Template
settings.json
{
"subject": "Flash Sale - 48 Hours Only",
"preview": "Up to 50% off everything in store",
"list": "list-3",
"template": "promo-template"
}Plain Text Update
settings.json
{
"subject": "A quick note from the team",
"preview": "Important updates about your account",
"list": "list-1"
}What is Codex?
Codex is OpenAI's autonomous coding agent that handles software engineering tasks — writing features, fixing bugs, and answering questions about your codebase. It works via CLI and IDE integrations, and can execute shell commands like Postiz.
CLI & IDE Native
Codex runs from your terminal or IDE. It executes shell commands directly, making Postiz integration seamless — no extra configuration needed.
Autonomous Execution
Codex works in sandboxed cloud environments, autonomously running commands, reading output, and chaining multi-step workflows like social media posting.
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 when you install it globally. It reads the SKILL.md to understand available commands and can autonomously chain them for social media workflows.
- ✓Install Postiz Agent globally with npx skills add
- ✓Codex reads the SKILL.md and learns all Postiz commands
- ✓POSTIZ_API_KEY must be set in environment
- ✓Codex executes commands in sandboxed environments
- ✓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
# Codex discovers Postiz commands
# from the SKILL.md automatically
codex "list my social media integrations"Listmonk Campaigns with Codex
Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
CLI Workflow
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 Listmonk about our
new feature launch, schedule for
tomorrow at 9am"
Codex: I'll handle that.
Running: postiz integrations:list
Found your Listmonk integration.
Running: postiz posts:create ...
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 Listmonk
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 Listmonk email workflows.
- ✓CLI-native — runs from your terminal or IDE
- ✓Autonomous execution in sandboxed environments
- ✓Parallel task support — post while coding
- ✓Template selection applied automatically based on campaign type
- ✓Cross-post email content to Listmonk + social platforms in a single conversation
- ✓Powered by OpenAI's most capable models
SKILL.md (auto-discovered)
---
name: postiz
description: Social media automation
CLI for scheduling posts across
30+ platforms including Listmonk
metadata:
codex:
requirements:
env:
- POSTIZ_API_KEY
binaries:
- postiz
---
# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>
# Listmonk Settings
subject, preview, list, templateAlso Works with Claude Code
Postiz Agent works as a CLI tool with any AI agent that can execute shell commands — including Anthropic's Claude Code.
Claude Code
by Anthropic
Claude reads the SKILL.md file to learn all available Postiz commands, then autonomously discovers your Listmonk integration, composes your email campaign with subject, preview text, and list targeting, and sends it on schedule.
Claude Code
> Send a newsletter to list-1 about our
new feature launch, schedule for Monday
Claude will automatically run:
postiz integrations:list
postiz posts:create \
-c "<h1>New Feature Launch</h1>..." \
-s "2025-03-03T09:00:00Z" \
--settings '{"subject":
"Exciting New Feature",
"preview":"Check out what we built",
"list":"list-1",
"template":"newsletter-tmpl"}' \
-i "listmonk-id"Listmonk + Other Platforms
Send an email campaign and post to social media simultaneously. Each platform gets its own settings.
Terminal
# Send email and post to social media simultaneously
postiz posts:create \
-c "We just launched our new feature! Check it out." \
-s "2025-03-01T09:00:00Z" \
--settings '{"subject":"New Feature Launch","preview":"Something big is here","list":"list-1"}' \
-i "listmonk-id,twitter-id,linkedin-id"
# Batch schedule a month of newsletters
for week in 1 2 3 4; do
postiz posts:create \
-c "Week $week newsletter content..." \
-s "2025-03-0${week}T08:00:00Z" \
--settings '{"subject":"Weekly Digest - Week '$week'","preview":"Your weekly roundup","list":"list-1","template":"newsletter-tmpl"}' \
-i "listmonk-id"
doneStart sending with Listmonk
Install Postiz Agent and automate your Listmonk email campaigns with AI-powered scheduling and delivery.
Ready to get started?
Grow your social media presence with Postiz.
Schedule, analyze, and engage with your audience.
Open-source social media scheduling tool