Prompt
(AI Agent node system prompt) Write one Instagram caption for a new product. Use the name, a one-line benefit, and the price from the input. 3 short lines, then 4 relevant hashtags. No emoji. Output only the caption. How to do it
- Connect Instagram and mint a key In https://app.socialhandoff.com, open Connections, connect an Instagram professional account (Business or Creator). Then create an agent key named n8n scoped to Instagram with draft permission.
- Set up the trigger Start with a trigger such as a new Google Sheets row or an Airtable record, then take the public URL of the product photo from the row and generate the caption with an AI Agent node.
- Import media by URL Add an HTTP Request node: POST https://app.socialhandoff.com/v1/media/import with JSON {"url": public https link, "alt": description} for the JPEG image, Reel, or carousel (up to 10 items). No multipart needed. Keep the id it returns for the next step.
- Create the post Add an HTTP Request node: POST https://app.socialhandoff.com/v1/posts with a bearer header and JSON body {"body": caption, "networks": ["instagram"], "mode": "submit", "mediaIds": [the uploaded ids]}. The post lands in the approval inbox.
- Review and approve Check the caption, hashtag count, and alt text on the approval card. On approval, the post publishes; if Instagram's daily quota is full, it is deferred by an hour.
Example draft
Meet the Trail Bottle: 750 ml, keeps water cold for 24 hours, and fits every bike cage we tried. $32, available now. Link in bio. #cycling #hydration #outdoorgear #bikepacking [Image: product JPEG from the spreadsheet row, alt text: "Green steel water bottle in a bike cage"]
Gotchas
- Create the post only after the import succeeds. If the media node fails and the post node still runs, you get a caption-only draft that cannot be approved for Instagram.
- Instagram refuses text-only posts. A draft can be saved as text first, but approving or scheduling it is refused with a clear error until an image or video is attached.
- The import URL must be public https. A cloud storage link that needs sign-in fails the import; use a shared link or a presigned URL in the expression.
- Images must be JPEG (up to 8 MB). A PNG screenshot is not accepted, so convert it before upload.
- Account type: Professional accounts only (Business or Creator). Personal accounts cannot publish through the API.
- Media: Every post needs an image or video. Text-only posts are not possible on Instagram.
- Image files: JPEG only, up to 8 MB. Convert PNG or WebP before posting.
- Reels: Video posts publish as Reels, from MP4 or MOV files.
Frequently asked questions
Can I post a carousel to Instagram this way?
Yes. Attach 2 to 10 images or videos and the post publishes as a carousel. Single images take alt text; set it when you upload with the alt field.
Can I use the MCP Client Tool instead of HTTP Request?
Yes. The MCP Client Tool exposes attach_media and draft_post to the AI Agent node. The HTTP Request node is simpler when the workflow, not the model, decides which file to attach.
What happens if I hit Instagram's daily limit?
The daily publishing quota is checked before each post. If it is full, the post is deferred by an hour instead of failing.