# Connect OpenClaw to Instagram

Source: https://postgale.com/guides/openclaw/instagram

Yes, OpenClaw can post to Instagram through Postgale. Create a Postgale API key with approval on and add https://postgale.com/mcp to OpenClaw as a remote MCP server with an Authorization header (or use a skill that calls the REST API), connect your Instagram account in Postgale once, and OpenClaw can images, Reels, Stories, carousels, comments and DMs. A person can be required to approve every post, reply and message before it goes out.

## Can OpenClaw post to Instagram?

Postgale is the secure layer for AI agents on social media. MCP (Model Context Protocol) is the open standard that lets AI assistants such as Claude and Cursor use outside tools. An MCP server is what they connect to. OpenClaw does not reach Instagram on its own; with Postgale connected it gets tools for the Instagram accounts you connected and nothing else.

| Task | What Postgale does |
| --- | --- |
| Publish | Single image, Reel, Story (image or video) and carousels of 2–10 items; captions up to 2,200 characters and 30 hashtags; optional first comment, collaborators, location, user tags and alt text. |
| Schedule | Give `scheduledFor` and a worker publishes at that time; the result arrives on your webhook as post.published or post.failed. |
| Comments | List comments and replies, reply, hide, delete, and turn comments off on a post. |
| Mentions | Read the posts the account was tagged in. |
| Direct messages | List conversations, read messages and reply (text up to 1,000 characters or an attachment) inside Meta’s 24-hour window. |
| Insights | Post insights (reach, likes, comments, shares, saves, views; Reel watch time), account insights, follower demographics and online-followers hours. |

## What do you need?

- An Instagram professional account (Business or Creator). Personal accounts cannot publish through Meta’s API.
- A Postgale workspace, and the account owner signing in once with Instagram login.
- An image or video on a public HTTPS URL. Images must be JPEG. Upload a file with `upload_media` to get a URL, or bring your own.
- OpenClaw, set up as below (A remote MCP server or a skill that calls the REST API, with an API key).

## Step 1: connect your Instagram account

1. Create a Postgale workspace and open Dashboard → Accounts.
2. Choose Connect Instagram and sign in with the account you own, on the platform’s own page. Postgale stores the tokens encrypted and refreshes them.

## Step 2: connect OpenClaw to Postgale

1. In Postgale, open Dashboard → API keys, create a key and copy it (it starts with `sk_` and is shown once). Connect the social accounts the agent may use under Dashboard → Accounts.
2. An agent that runs on its own, on a schedule or from a chat app, should use a key with approval required: create the key, then turn on approval for it under Dashboard → API keys. Everything it wants to publish, reply or send then waits for a person.
3. Store the key where OpenClaw reads secrets, for example an environment variable `POSTGALE_API_KEY` on the machine it runs on. Do not paste it into a chat.

## Step 2a: add Postgale as an MCP server

Add a remote MCP server in OpenClaw’s configuration with these values. Field names and file locations depend on your OpenClaw version and setup; check its documentation for where MCP servers are declared.

Postgale MCP server:
```text
URL:        https://postgale.com/mcp
Transport:  Streamable HTTP
Header:     Authorization: Bearer sk_…
```

Clients that take the common `mcpServers` JSON shape accept it like this:

mcpServers entry:
```json
{
  "mcpServers": {
    "postgale": {
      "url": "https://postgale.com/mcp",
      "headers": {
        "Authorization": "Bearer sk_…"
      }
    }
  }
}
```

## What can I ask OpenClaw to do on Instagram?

Check the connection first: “Which Instagram accounts are connected in Postgale?” Then, in plain language:

> Ask your agent: “Post this product photo to our Instagram tomorrow at 9am Eastern. Caption: “The fall drop is live.” Put the hashtags in a first comment.”

> Ask your agent: “Turn these five photos into an Instagram carousel with a short caption. Save it as a draft.”

> Ask your agent: “Read today’s comments on our latest Instagram post and draft replies to the sizing questions. Don’t send them yet.”

POST /api/v1/posts (Instagram):
```json
{
  "content": "The fall drop is live. Shipping Thursday.",
  "scheduledFor": "2026-10-22T13:00:00Z",
  "platforms": [
    {
      "accountId": "acc_instagram",
      "platformSpecificData": {
        "mediaUrl": "https://media.example.com/fall-drop.jpg",
        "firstComment": "#fall #wool #madeinusa"
      }
    }
  ]
}
```

## Which Instagram rules does Postgale enforce?

- Media is required. A text-only Instagram post is rejected before anything reaches Meta.
- Images must be JPEG on a public HTTPS URL; Meta downloads them. Captions are cut off at 2,200 characters and 30 hashtags.
- Carousels take 2 to 10 items, images and videos mixed. Reels and carousels are processed by Meta asynchronously; Postgale polls the container and publishes when it is ready.
- Meta limits how many posts an account can publish per 24 hours. Postgale reads the current quota before every publish instead of guessing.
- Login tokens last 60 days. Postgale refreshes them during the last week automatically, so an account that posts rarely does not silently expire.
- Replies to direct messages are only allowed within 24 hours of the person’s last message (7 days with Meta’s human-agent tag). Outside that window Postgale returns a clear error and sends nothing.

> Comments and messaging depend on the permissions Meta has approved for the connected app. When a permission is missing, Postgale answers with missing_permission instead of failing quietly.

## How do I keep a person in the loop?

- Approval: tick “Hold posts from this app for approval” when you sign in, or in the Postgale dashboard require approval for the API key the agent uses (or for the whole workspace, or one account). Posts then wait as pending approval; comment replies and moderation, direct messages, WhatsApp sends and edits to live posts wait in the same queue. A person approves, edits or rejects each one in Dashboard → Approvals; the agent’s own key or sign-in cannot approve.
- Tool annotations: every Postgale tool declares whether it only reads, writes, or publishes live, deletes or spends. Clients that honour annotations ask before destructive tools run.
- Audit log: every write the agent makes is recorded with the key or the connected app, the action and the time.
- Revoking: each sign-in appears under Dashboard → Connected apps and each key under Dashboard → API keys; either can be revoked at any time.

## What can’t an agent do on Instagram through Postgale?

- Connect a personal Instagram account. Meta’s API publishes only for Business and Creator accounts.
- Delete a published Instagram post. Meta’s API does not allow it; Postgale returns not_supported.
- Start a new direct-message conversation. On Instagram an agent can only reply to people who wrote first.
- Post without an image or video.

## Questions

### Can OpenClaw post to Instagram?

Yes, OpenClaw can post to Instagram through Postgale. Create a Postgale API key with approval on and add https://postgale.com/mcp to OpenClaw as a remote MCP server with an Authorization header (or use a skill that calls the REST API), connect your Instagram account in Postgale once, and OpenClaw can images, Reels, Stories, carousels, comments and DMs. A person can be required to approve every post, reply and message before it goes out.

### Does OpenClaw see my Instagram password or tokens?

No. The account owner signs in on the platform’s own page once, and Postgale stores the resulting tokens encrypted. OpenClaw only holds a Postgale API key or sign-in, which you can revoke at any time.

### Can I approve what OpenClaw sends to Instagram before it goes live?

Yes. Turn on approval for the API key it uses, the account or the whole workspace. Posts, replies and messages then wait in the Postgale dashboard until a person approves, edits or rejects them; OpenClaw’s own access cannot approve.

### Can OpenClaw schedule Instagram posts?

Yes. Ask for a date and time; Postgale stores the post as scheduled and publishes it then, and reports the result (post.published or post.failed) on your webhook and in get_post.

## Related

- [OpenClaw guide](https://postgale.com/guides/openclaw)
- [Instagram for AI agents](https://postgale.com/integrations/instagram)
- [OpenClaw and Facebook](https://postgale.com/guides/openclaw/facebook)
- [OpenClaw and Threads](https://postgale.com/guides/openclaw/threads)
