Actions24
- User Actions
- Publish Actions
- Media Actions
- Comment Actions
- Messaging Actions
- Auth (Token) Actions
Publish → Image
AI-generatedSummary
Publishes a single image post to the Instagram account via graph.instagram.com. It optionally re-hosts the image first, creates a media container, polls until it is FINISHED, then calls media_publish.
Inputs
- imageUrl (required) — Public URL of the image to publish.
- caption — Caption text for the post.
- rehostMedia — Default true. Downloads the image and re-uploads it to a public host before sending the URL to Instagram. This avoids timeouts and 403s from slow or blocking source servers. Turn it off to pass the original URL straight through.
- publishOptions — Collection with Max Poll Attempts (default 30), Poll Interval in seconds (default 5), Re-Host Method (Catbox or Supabase), Re-Host Upload URL, and Supabase Project URL, Bucket and Service Key. Supabase needs the project URL and service key. With Catbox, 0x0.st is tried as a fallback if catbox fails.
- graphApiVersion — Graph API version, default v21.0.
- accessTokenOverride — Optional token used instead of the Instagram Login API credential. Set it with an expression to post to different accounts per item.
Output shape
One item per input item, containing creation_id (the container ID) plus the media_publish response (typically the published media id).
Errors if container creation fails, if processing reports ERROR, or if the container isn't FINISHED within the poll limit. With Continue On Fail, the item becomes {error: message}. Re-hosting sends your image to a third-party host (catbox, 0x0.st or Supabase), so disable it for private images.
Examples
Example 1: Post a product photo with a caption from a previous node
Image URL = {{ $json.photoUrl }}, Caption = {{ $json.text }}, Re-Host Media First on
Example 2: Publish to multiple accounts from input data
Access Token (Override) = {{ $json.account_token }}, Image URL from the item
Example 3: Catbox is blocked from the n8n server
Publish Options: Re-Host Method = Supabase, with project URL, bucket and service key