Instagram Business
Create posts, list media, and manage your Instagram Business profile.
Connect
Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.
Scopes requested: instagram_basicinstagram_content_publish
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("instagram_business", action, input) resolves with the provider's answer and rejects when Instagram Business isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "instagram_business"} says whether yours can call it.
// workflows/notify.ts: call Instagram Business when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellInstagramBusiness = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Instagram Business isn't connected.
const output = await step.run("Instagram Business", () =>
step.ctx.integrations.invoke("instagram_business", "upload_photo", {
"page": "<page>",
"photo": "<photo>"
}),
);
step.ctx.log("Instagram Business answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "instagram_business",
"piece_action": "upload_photo",
"input": {
"page": "<page>",
"photo": "<photo>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/instagram_business/upload_photo" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"page":"<page>","photo":"<photo>"}}'Actions
upload_photo
Upload Photo. Upload a photo to an Instagram Professional Account
| Input | Type | Description |
|---|---|---|
pagerequired | id (picked from your account) | Page |
photorequired | text | A URL we can access for the photo (JPG only) |
captionoptional | long text | Caption |
upload_reel
Upload Reel. Upload a reel to an Instagram Professional Account
| Input | Type | Description |
|---|---|---|
pagerequired | id (picked from your account) | Page |
videorequired | text | A URL we can access for the video (Limit: 1GB or 15 minutes) |
captionoptional | long text | Caption |
Details
- Id
instagram_business- Category
- Social media
- Tags
- social, photos, stories, instagram, meta
- Package
@activepieces/piece-instagram-business@0.2.3- Runs
- Through the integration runner