Automate Google My Business with Codex
Publish business updates, promote events, share offers with coupon codes, and add call-to-action buttons — all from the command line or through your AI agent to boost local SEO.
Please make sure there is always a human in the loop.
Post to Google My Business 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 Google My Business integration
postiz integrations:list
# Create a business update post
postiz posts:create \
-c "Visit us today! We have exciting new products in store." \
-s "2025-01-15T10:00:00Z" \
--settings '{"topicType":"STANDARD","callToActionType":"LEARN_MORE","callToActionUrl":"https://example.com"}' \
-i "your-gmb-integration-id"Google My Business Features
Business Posts
Publish standard business updates that appear on your Google Business Profile. Keep customers informed about news, products, and services.
Event Promotion
Create event posts with title, start and end dates, and times. Promote workshops, sales events, grand openings, and more.
Offers & Coupons
Share special offers with coupon codes, redemption URLs, and terms. Drive foot traffic with exclusive deals and promotions.
Call-to-Action Buttons
Add CTA buttons like Book, Order, Shop, Learn More, Sign Up, Get Offer, or Call. Drive customer actions directly from your posts.
Local SEO Boost
Regular Google My Business posts improve your local search ranking. Stay active and visible in Google Maps and local search results.
Scheduled Posting
Schedule posts with precise timestamps. Plan your business updates ahead of time and maintain consistent posting frequency.
How It Works
Find Your GMB Integration
List your connected accounts and grab your Google My Business integration ID. You can also fetch available settings to see what options are supported.
Discovery
# List all integrations
postiz integrations:list
# Filter for Google My Business
postiz integrations:list | jq \
'.[] | select(.identifier=="gmb")'
# Get GMB settings schema
postiz integrations:settings <gmb-id>Choose Your Post Type
Select the type of post: STANDARD for general updates, EVENT for promoting events with dates and times, or OFFER for sharing deals with coupon codes.
Configuration
# Standard business update
echo '{"topicType": "STANDARD"}'
# Event with dates
echo '{
"topicType": "EVENT",
"eventTitle": "Grand Opening",
"eventStartDate": "2025-03-15",
"eventEndDate": "2025-03-15",
"eventStartTime": "10:00",
"eventEndTime": "18:00"
}'
# Offer with coupon
echo '{
"topicType": "OFFER",
"offerCouponCode": "SAVE20",
"offerRedeemUrl": "https://example.com",
"offerTerms": "Valid until March 31"
}'Create Your Post
Schedule a Google My Business post with your content, post type, and optional CTA button. Posts appear on your Business Profile in Google Search and Maps.
Post Creation
postiz posts:create \
-c "Spring sale is here! 20% off all items this weekend." \
-s "2025-03-01T09:00:00Z" \
--settings '{
"topicType": "OFFER",
"callToActionType": "GET_OFFER",
"callToActionUrl": "https://example.com/sale",
"offerCouponCode": "SPRING20",
"offerRedeemUrl": "https://example.com/redeem",
"offerTerms": "Valid March 1-3, 2025"
}' \
-i "gmb-id"Google My Business Settings Reference
Every Google My Business post accepts these platform-specific settings via the --settings flag.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "gmb" |
topicType | string | Post type: STANDARD, EVENT, or OFFER |
callToActionType | string | CTA button: NONE, BOOK, ORDER, SHOP, LEARN_MORE, SIGN_UP, GET_OFFER, CALL |
callToActionUrl | string | URL for the call-to-action button |
eventTitle | string | Event name (required when topicType is EVENT) |
eventStartDate | string | Event start date in YYYY-MM-DD format |
eventEndDate | string | Event end date in YYYY-MM-DD format |
eventStartTime | string | Event start time in HH:MM format |
eventEndTime | string | Event end time in HH:MM format |
offerCouponCode | string | Coupon code for offer posts |
offerRedeemUrl | string | URL where customers can redeem the offer |
offerTerms | string | Terms and conditions for the offer |
Common Configurations
Copy-paste these settings for common Google My Business posting scenarios.
Standard Update with Learn More CTA
settings.json
{
"topicType": "STANDARD",
"callToActionType": "LEARN_MORE",
"callToActionUrl": "https://example.com/about"
}Event Post with Full Details
settings.json
{
"topicType": "EVENT",
"eventTitle": "Weekend Workshop: Getting Started",
"eventStartDate": "2025-03-15",
"eventEndDate": "2025-03-16",
"eventStartTime": "10:00",
"eventEndTime": "16:00",
"callToActionType": "BOOK",
"callToActionUrl": "https://example.com/book"
}Offer with Coupon Code
settings.json
{
"topicType": "OFFER",
"callToActionType": "GET_OFFER",
"callToActionUrl": "https://example.com/deal",
"offerCouponCode": "SAVE20",
"offerRedeemUrl": "https://example.com/redeem",
"offerTerms": "Valid for new customers only. Expires March 31, 2025."
}Simple Update with Call Button
settings.json
{
"topicType": "STANDARD",
"callToActionType": "CALL"
}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"GMB 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.
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 GMB about our
new feature launch, schedule for
tomorrow at 9am"
Codex: I'll handle that.
Running: postiz integrations:list
Found your GMB 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 Google My Business
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 GMB workflows.
- ✓CLI-native — runs from your terminal or IDE
- ✓Autonomous execution in sandboxed environments
- ✓Parallel task support — post while coding
- ✓Automatically select STANDARD, EVENT, or OFFER based on your message
- ✓Cross-post to GMB + other platforms in a single session
- ✓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 GMB
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>
# GMB Settings
topicType, callToActionType,
callToActionUrl, eventTitle,
eventStartDate, eventEndDate,
eventStartTime, eventEndTime,
offerCouponCode, offerRedeemUrl,
offerTermsAlso 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 GMB integration, determines the right post type and CTA settings, and publishes the update.
Claude Code
> Create a Google My Business event post
for our grand opening on March 15th
from 10am to 6pm, with a Book CTA
Claude will automatically run:
postiz integrations:list
postiz posts:create \
-c "Join us for our Grand Opening!" \
-s "2025-03-14T09:00:00Z" \
--settings '{
"topicType":"EVENT",
"eventTitle":"Grand Opening",
"eventStartDate":"2025-03-15",
"eventEndDate":"2025-03-15",
"eventStartTime":"10:00",
"eventEndTime":"18:00",
"callToActionType":"BOOK",
"callToActionUrl":
"https://example.com/book"}' \
-i "gmb-id"Google My Business + Other Platforms
Schedule the same content to Google My Business and other platforms in a single command. Each platform gets its own settings.
Terminal
# Post to Google My Business and Facebook simultaneously
postiz posts:create \
-c "Spring sale! 20% off everything this weekend. Visit us today!" \
-s "2025-03-01T09:00:00Z" \
--settings '{
"topicType": "OFFER",
"callToActionType": "GET_OFFER",
"callToActionUrl": "https://example.com/sale",
"offerCouponCode": "SPRING20",
"offerRedeemUrl": "https://example.com/redeem",
"offerTerms": "Valid March 1-3 only"
}' \
-i "gmb-id,facebook-id"
# Batch schedule weekly business updates
for week in 1 2 3 4; do
postiz posts:create \
-c "Week $week update: New arrivals in store!" \
-s "2025-03-0${week}T10:00:00Z" \
--settings '{"topicType":"STANDARD","callToActionType":"LEARN_MORE","callToActionUrl":"https://example.com/new"}' \
-i "gmb-id"
doneStart posting to Google My Business
Install Postiz Agent and automate your Google My Business presence with AI-powered scheduling, events, and offers.
Ready to get started?
Grow your social media presence with Postiz.
Schedule, analyze, and engage with your audience.
Open-source social media scheduling tool