How to automate Instagram posting with Claude Code (without browser automation)

You can publish to Instagram from Claude Code without teaching it where to click in a browser. Claude Code reads source material, drafts copy, inspects files, and calls tools. A publishing connector handles…

You can publish to Instagram from Claude Code without teaching it where to click in a browser. Claude Code reads source material, drafts copy, inspects files, and calls tools. A publishing connector handles authentication, Instagram's formatting requirements, scheduling, and delivery.

This guide uses Groniz to build the workflow. The process starts with a product update, blog post, or another reliable source. Claude Code turns that source into a caption and image brief. A person reviews the facts and voice, checks the image rights, and makes sure the visual is accurate. Once approved, the post can move through media upload, draft or schedule creation, and record verification.

"Without browser automation" refers specifically to the posting step. No script drives Instagram's interface. You still connect the account through Groniz OAuth and the Console when the provider requires it. The tool-based publishing path removes click sequences, but account authorization remains mandatory.

What the workflow automates

Automate the whole handoff around the publish command:

  1. Read one authoritative source.
  2. Extract claims, names, dates, links, and caveats.
  3. Draft an Instagram caption and an image brief.
  4. Stop for human approval.
  5. Discover the live Instagram connector requirements.
  6. Upload the approved media to Groniz.
  7. Create a draft or scheduled post.
  8. Verify the created record and, after publication, the delivery result.

Claude Code can trace a caption back to its source and prepare the same set of files each time. The reviewer still makes the judgment calls. A sentence might overstate the update. The tone might be wrong for the account, or the visual might imply a capability the product does not have.

Keeping preparation separate from distribution makes the review boundary easier to see. For a system that covers several networks, read how to automate social media posting with Claude Code. For Instagram-specific agent architecture and guardrails, read Instagram automation for AI agents.

What you need before you start

  • Claude Code with access to the source and working files;
  • an Instagram destination connected in Groniz Connectors;
  • one supported route from Claude Code to Groniz: Skill, CLI, or MCP;
  • jq if you plan to run the CLI examples below;
  • an original or properly licensed image that has passed your brand and rights review; and
  • a reviewer who can approve both the content and the account and publication time.

Instagram has standard Facebook-Business and standalone connection kinds in Groniz. Their available fields and media capabilities can vary, so choose the connected destination first and inspect its live requirements before finalizing the post format.

Choose how Claude Code will reach Groniz

Claude Code can reach Groniz through a Skill, the native CLI, or MCP. Anthropic describes Skills as reusable knowledge and workflows. MCP connects Claude Code to external services and tools. Pick the route that suits your environment. You only need one. The official Claude Code feature overview and Skills documentation explain the difference.

Use the Skill to load the Groniz procedure and commands into Claude Code:

npx skills add groniz/groniz-cli

Use the native CLI for a visible command sequence with browser device-flow login:

curl -fsSL https://groniz.com/install.sh | sh
groniz auth:login

Use MCP to let Claude Code call the remote Groniz tools. Create an API key in the Groniz Console, then add the HTTP server:

claude mcp add --transport http groniz https://mcp.groniz.com/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

The command follows Claude Code's documented syntax for connecting a remote HTTP MCP server. API keys are secrets. Keep them out of prompts, source files, and version control.

The examples below use CLI commands so that every publishing step remains visible. The control flow stays the same with MCP or the installed Skill: authenticate, discover the live requirements, upload approved media, create the post, and verify the result.

Start with a source, not a blank prompt

Give each post a small working directory. This layout is enough:

instagram-post/
  source.md
  caption.md
  image-brief.md
  claims-review.md
  review.md
  approved-image.png

Put the canonical input in source.md, or give Claude Code the URL of a product update or blog post it may read. Every factual claim should come from that source. Brand guidance can shape the voice, but it cannot fill gaps in the product facts.

A loose instruction to "write an Instagram post" makes review harder. Ask Claude Code for structured output:

Read source.md and prepare an Instagram content package.

Write caption.md with:
- one publishable caption grounded only in the source
- no invented results, customer quotes, dates, or capabilities

Write image-brief.md with:
- the single idea the image should communicate
- exact on-image copy, if any
- factual details that must remain accurate
- visual direction for a designer
- a list of claims or UI states the image must not imply

Write claims-review.md with:
- each factual claim from the caption
- the exact source passage or section that supports it
- any claim that still needs verification

Do not publish anything. Stop after creating the three output files.

These files provide an audit trail. The reviewer can compare each claim with the source without having to reconstruct Claude's inferences.

The image brief does not instruct Groniz to generate or resize media. Groniz receives the final approved file for upload. Image production and its review happen separately.

Put a real approval gate before publishing

Compare claims-review.md with the source. Confirm product names, feature status, dates, quoted language, and every implied capability. Remove anything that depends on a guess.

Read the caption aloud. Cut generic claims and excess setup. Check that the call to action matches the source. Individual posts can vary, but they should still sound as though they came from the same account.

Check the image against the brief and confirm that every asset is approved or properly licensed. The image must not show an unavailable feature or a fabricated interface. Review the accessibility fields exposed by the live integration instead of assuming that particular fields are available. Record the approval in review.md, along with the source revision, caption file, media filename, destination, and planned publication time.

A compact approval record might look like this:

Status: approved
Source checked: 2026-07-20
Source revision: release-v2.4
Caption: caption.md
Media: approved-image.png
Destination: <instagram-integration-id>
Publish at: 2030-01-15T16:00:00Z
Reviewer: initials
Notes: Feature wording matches the published update.

Claude Code should stop unless the status is approved. Any change to the source, caption, image, destination, or publication time invalidates that approval and triggers another review.

Discover Instagram requirements at runtime

Do not hardcode an Instagram format into the automation. Groniz supports Instagram among 32+ networks, with standard Facebook-Business and standalone connection kinds. Required settings, media support, and length rules vary by provider.

Authenticate and inspect the live integration:

groniz whoami
groniz integrations:list
groniz integrations:settings <instagram-integration-id>

For a connected account, groniz integrations:settings <id> is the live source of truth. Read these fields before building the command:

  • .output.settings.required for every mandatory provider setting
  • .output.maxLength for the current content limit
  • .output.tools for dynamic lookup methods exposed by that integration

When .output.tools contains a method needed for a required value, call it with the live method name and input schema:

groniz integrations:trigger <instagram-integration-id> <method> -d '{"key":"value"}'

Skip this step when the tools array is empty. Never assume that a tool exists.

This example uses one image, but Instagram connections do not necessarily accept the same media. The live response defines the required settings and content length. Before uploading, also confirm that the selected connection accepts the approved file. If media support is unclear, stop and inspect the connected destination. Capabilities vary, so this guide does not prescribe a carousel size, aspect ratio, caption limit, or provider setting.

Upload the approved media first

The post command needs an uploaded Groniz media reference. A local path or arbitrary external URL will not work. Upload the approved file and reject any response without a non-empty .path:

if ! MEDIA_PATH="$(
  groniz upload approved-image.png |
    jq -er '.path | select(type == "string" and length > 0)'
)"; then
  echo "Media upload did not return a usable path." >&2
  exit 1
fi

Save the uploaded path with the post record. If creation fails, you can retry without losing track of the asset.

Load the reviewed caption. Because the claim inventory has its own file, caption.md can contain only publishable copy:

CAPTION="$(<caption.md)"

Before creating anything, compare the current caption, media filename, integration ID, and publication time with review.md. A mismatch means the post needs another review.

Create a draft or schedule the post

Build the settings JSON from the live integrations:settings response and supply every required value. Use {} only when the live schema has no required settings. To create a draft:

groniz posts:create \
  -c "$CAPTION" \
  -m "$MEDIA_PATH" \
  -s "2030-01-15T16:00:00Z" \
  -t draft \
  --settings '<required-settings-json>' \
  -i "<instagram-integration-id>"

The draft command requires an ISO 8601 timestamp, so the example includes a placeholder. Replace it with the reviewed time before promotion. Drafts work well when a second person needs to inspect the assembled post in the Console.

A saved draft is not proof that the post meets the live delivery requirements. Before promotion, refresh the live settings, check the caption against .output.maxLength, and verify every required setting:

groniz posts:status <post-id> --status schedule

When the content and assets are approved and the schedule is final, you can create the scheduled post directly with -t schedule and the intended timestamp. This queues a real publication. The instruction to Claude Code should therefore name the integration ID, caption file, media file, exact ISO 8601 time, and approval record.

Verify creation and delivery

Capture the post ID returned by posts:create, then inspect the relevant window:

groniz posts:list \
  --startDate "2030-01-15T00:00:00Z" \
  --endDate "2030-01-16T00:00:00Z"

Verify the integration ID, status, scheduled time, caption, and media reference. Once the scheduled time has passed, check the record again for its delivery state and any returned platform URL or release ID. A successful command confirms that Groniz accepted the request. The later record confirms what happened during publication.

If delivery fails, keep the source, approved files, integration settings snapshot, post ID, and error together. Claude Code can then diagnose the handoff without rewriting the content.

Turn the workflow into a repeatable Claude Code routine

Once the manual run works, save the procedure as a project Skill or repository instruction. Require the source revision, integration ID, approved caption, approved media, publication time, and approval record. The routine should stop when approval is missing or stale. On every run, it should refresh the live integration settings, upload media before creation, and return the post ID for verification.

Run content generation and publishing as separate invocations. The first command prepares caption.md, image-brief.md, and claims-review.md without publishing. After approval, the second handles discovery, upload, draft or schedule creation, and verification. This boundary lowers the risk of an accidental publication and leaves both stages open to inspection.

Automation makes the process repeatable, but it cannot promise followers, reach, or engagement. After publication, review the metrics available for the connected Instagram account. Use those results in the next source brief and caption review rather than asking the publishing automation to invent a growth answer.

Once the two invocations are in place, Claude Code can prepare and publish an approved Instagram post without driving Instagram's interface.

Connect Instagram to Groniz Connectors, then run the first workflow as a reviewed draft.