doodle top mobile

Post to LinkedIn from Codex

Codex can post to LinkedIn through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your LinkedIn profile or company page in Postiz, then ask in plain English. Codex writes the post, uploads images, turns multiple images into a carousel when you ask, and schedules publication.

Setup GuideGitHub

Please make sure there is always a human in the loop.

Last updated: September 2026

doodle left mobiledoodle right mobile

How do I post to LinkedIn from Codex?

Set up Codex once with the Postiz skill or the Postiz MCP server, connect LinkedIn 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:
> Share our new blog post on LinkedIn
  with the cover image, tomorrow at 9am

Codex: Done! Your LinkedIn post is scheduled.

LinkedIn-Specific Features

💼

Professional Posts

Publish polished text posts with hashtags, mentions, and links. Perfect for thought leadership and industry insights.

🖼

Image Carousels

Turn multiple images into a swipeable carousel post. Great for slide decks, infographics, and visual storytelling.

🏢

Company Pages

Post as your company page using the linkedin-page type. Manage brand content alongside personal profiles.

📊

Analytics Tracking

Track post performance with Postiz analytics. Monitor impressions, engagement, and reach across your LinkedIn content.

📷

Media Attachments

Attach images, documents, and videos to your posts. Upload through Postiz for seamless media management.

📅

Scheduled Posting

Schedule posts with precise timestamps. Plan your LinkedIn content calendar weeks in advance and let Postiz handle publishing.

How does Codex post to LinkedIn?

You describe what you want in plain language and Codex handles the Postiz calls for you. Here is how a typical conversation goes.

1

Find Your LinkedIn Integration

Ask Codex whether your LinkedIn account is connected. It also checks which options the platform supports.

Example conversation

> Is my LinkedIn account connected to Postiz?

Codex: Yes — your LinkedIn account is connected
  and ready. Want me to post something?
2

Upload Your Media

Point Codex at your images and it uploads them for carousel or single-image posts.

Example conversation

> Draft a LinkedIn post about our new
  feature launch

Codex: Here's a draft for LinkedIn:
  "We just shipped something big..."
  Want me to add media and schedule it?
3

Create Your Post

Schedule a LinkedIn post with your content, images, and platform-specific settings like carousel mode and carousel naming.

Example conversation

> Yes — add screenshot.png and schedule
  it for tomorrow at 9am

Codex: Done! Scheduled on LinkedIn for
  tomorrow at 9:00 AM.

LinkedIn Settings Reference

Mention any of these in plain language and Codex sets them for you. These are the LinkedIn options it can apply to any post.

FieldTypeDescription
__typestringMust be "linkedin" (personal) or "linkedin-page" (company page)
post_as_images_carouselbooleanPost multiple images as a carousel. Default: false
carousel_namestringDisplay name for the carousel (shown in LinkedIn UI)

Common Configurations

Ask Codex for any of these common LinkedIn scenarios and it applies the matching settings.

Simple Text Post (Personal Profile)

Just ask

> Post it with: Simple Text Post (Personal Profile)

Codex: Got it. Applying:
  (defaults)

Image Carousel with Title

Just ask

> Post it with: Image Carousel with Title

Codex: Got it. Applying:
  post_as_images_carousel: yes
  carousel_name: Weekly Insights

Company Page Post

Just ask

> Post it with: Company Page Post

Codex: Got it. Applying:
  (defaults)

Company Page Carousel

Just ask

> Post it with: Company Page Carousel

Codex: Got it. Applying:
  post_as_images_carousel: yes
  carousel_name: Product Roadmap Q2

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 LinkedIn 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 LinkedIn 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 LinkedIn"

LinkedIn 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 LinkedIn about our
  new feature launch, schedule for
  tomorrow at 9am"

Codex: I'll handle that.
  Found your LinkedIn integration.
  Composing and scheduling the post.

  Done! Your post is scheduled.
  Post ID: abc-123
💻

Parallel 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 simultaneously

Why Codex + Postiz for LinkedIn

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 LinkedIn 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 LinkedIn + 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 LinkedIn
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>

# LinkedIn Settings
__type, post_as_images_carousel,
carousel_name

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 LinkedIn guide, or the Postiz Agent page for any other agent.

C

Claude Code

by Anthropic

Claude reads the Postiz skill so it knows what it can do, then autonomously discovers your LinkedIn integration, uploads your images, creates a carousel if needed, and schedules the post.

Claude Code

> Create a LinkedIn carousel from my
  slide deck images, schedule for
  tomorrow morning

Claude: Done! Scheduled on LinkedIn for
  tomorrow at 9:00 AM.

Can Codex post to LinkedIn and other platforms at once?

Schedule the same content to LinkedIn and other platforms in a single request. Each platform gets its own settings.

Example

> Post "Excited to announce our new feature!" to
  LinkedIn and X tomorrow at 9am, then schedule
  a daily tip on LinkedIn every weekday at 10am

Codex: Done! Scheduled:
  - LinkedIn + X: tomorrow 9:00 AM
  - Daily tips on LinkedIn: Mon-Fri 10:00 AM

Account Types

Personal Profile

linkedin

Company Page

linkedin-page

What can I ask Codex to post on LinkedIn?

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 LinkedIn.

Prompts for LinkedIn

> Turn README.md into a LinkedIn post about what we shipped
  this week, add the cover image, schedule for Tuesday 9am

$ codex exec "Post the three screenshots in ./assets/carousel to our
  LinkedIn company page as a carousel named 'Release 2.4'"

> $postiz What's scheduled on LinkedIn this week?
  Move Thursday's post to Friday.

What LinkedIn rules should Codex follow?

These are the LinkedIn limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.

  • ✓LinkedIn posts can be up to 3,000 characters. Codex trims or splits longer drafts if you ask.
  • ✓A personal profile (linkedin) and a company page (linkedin-page) are separate Postiz channels; name the one you mean.
  • ✓Carousels need several images plus post_as_images_carousel set to true; carousel_name is optional.
  • ✓Every image goes through postiz upload before it is attached; raw paths and external URLs are rejected.

Codex and LinkedIn FAQ

How do I post to LinkedIn 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 LinkedIn in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the LinkedIn settings, uploads any media, and schedules the post.

Can Codex post to my LinkedIn company page instead of my profile?

Yes. Postiz treats a personal profile (linkedin) and a company page (linkedin-page) as separate channels. Connect both in Postiz, then tell Codex which one you mean, for example "post this to the Postiz company page". Codex lists your channels with postiz integrations:list if it is unsure which is which.

How do I post an image carousel to LinkedIn from Codex?

Attach several images and say you want a carousel. Codex uploads each file with postiz upload, sets post_as_images_carousel to true, and adds a carousel_name if you give one. LinkedIn shows the images as a swipeable document. Without the carousel flag, the same images publish as a standard multi-image post.

Can Codex post to LinkedIn on a schedule without me watching?

Yes. Postiz stores scheduled LinkedIn 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 LinkedIn 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 LinkedIn. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your LinkedIn login itself never leaves Postiz.

Is posting to LinkedIn 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 LinkedIn; see the ChatGPT guide for that setup.

Start posting to LinkedIn

Install Postiz Agent and automate your LinkedIn content strategy with AI-powered scheduling and publishing.