Publish post
publish_postPublish a post with optional images or video to selected social accounts, validating every target first so nothing goes live if any target fails.
Instructions
Publish one post, optionally with images or a video, to some of the user's accounts. Facebook, Instagram and LinkedIn are published immediately and cannot be undone from here; X waits for the user (the SparkShare browser extension fills it in, or a compose link with the text). Only call this after the user has seen the exact text for each target and the media, and said yes. Every target is checked first: if any has a problem, nothing is published and the problems are listed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| link | No | Optional link. Facebook and LinkedIn add it to the post, X uses it as the link card, Instagram leaves it out because caption links are not clickable. | |
| text | Yes | The post text exactly as it should appear, hashtags included. Used for every target without its own text. | |
| media | No | Optional images or one video, in order. Each item is an absolute local file path, a public https URL, or an id from upload_media. Several images or one video per post (Instagram: up to 10 of either as a carousel; X: up to 4 images). Images up to 20 MB become JPEG; MP4 or MOV video up to 300 MB, best uploaded first with upload_media. | |
| targets | Yes | Where to publish. |