set_post
Write or revise a session's LinkedIn, X, YouTube, or vertical post, including threads, titles, captions, media, variants, and first comments. Fix selected-text comments; keep old versions in history.
Instructions
Write the session's post for LinkedIn (default, posts/linkedin.md) or X (platform=x, posts/x.md). One session holds one post per platform, so the LinkedIn post and its X version sit together. LinkedIn: the app shows a real LinkedIn feed post with the video, cut after three lines with '…more', so put the hook in the first two lines. Max 3000 characters. X: the app shows a real X post, or a thread when you pass several tweets (tweets=[...], or text with a line holding only '---' between tweets). The media goes on the first tweet. The timeline cuts a tweet over 280 characters with 'Show more' (the user has Premium, so longer is allowed). The user edits the post in the app and comments on selected text; fix those comments with set_post. YouTube (platform=youtube): the long wide video. Pass title (max 100) and the description as text (chapters as '0:00 Intro' lines). Vertical (platform=vertical, also for tiktok/reels/shorts): one caption for TikTok, Instagram Reels and YouTube Shorts with the 9:16 edit; hook in the first line, max 2200 characters, at most 5 hashtags; title is the Shorts title, on picks the places. The old text stays in history. get_session returns them as 'post', 'x_post', 'youtube_post', 'vertical_post'. Posts are plain text only: they show no markdown. No video? The post works without one (text only, or pass an image). For other versions use create_post_variants; for opening options set_post_hooks. With variant= it edits that variant instead of the main post.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on | No | vertical only: where it goes. Default all three. | |
| name | No | With variant: rename it. | |
| note | No | What changed, e.g. 'Shorter hook'. | |
| text | No | The whole post, as it will appear. | |
| media | No | Optional: the video or image to show, e.g. 'edits/hook-v3.mp4'. Default: the newest edit. | |
| title | No | youtube: the video title. vertical: the Shorts title (empty: YouTube uses the caption's first line). Max 100 characters. | |
| tweets | No | X only, instead of text: the tweets of a thread in order (one item = one tweet). | |
| session | Yes | Session as 'Project/folder', an absolute path, or its id (from get_session). An old path still works after a rename or move. | |
| variant | No | Optional: edit this post variant (slug) instead of the main post. | |
| platform | No | Which post of the session: linkedin (default, posts/linkedin.md), x (posts/x.md), youtube (the long wide video: title + description, posts/youtube.md) or vertical (one vertical video and caption for TikTok, Instagram Reels and YouTube Shorts, posts/vertical.md). | |
| first_comment | No | LinkedIn only. Optional: the first comment the user posts under it (links, resources, a question). The app shows it under the post as the user's comment. One per session, shared by the variants. Empty string removes it. |