Skip to content

Auto first comment after publish (YouTube + Instagram) - #309

Open
gynsus wants to merge 2 commits into
trypostit:mainfrom
gynsus:pr/youtube-description-first-comment
Open

gynsus wants to merge 2 commits into
trypostit:mainfrom
gynsus:pr/youtube-description-first-comment

Conversation

@gynsus

@gynsus gynsus commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Why

The classic "link in the first comment" trick isn't possible through TryPost: neither a YouTube Short nor an Instagram post can carry an automatic comment posted right after publishing — the spot where creators put the links a caption can't make clickable (Instagram) or wants to keep out of the description (YouTube).

This PR originally also introduced a separate YouTube description; that half was superseded by #371, so the branch now merges main and keeps only the first-comment feature on top of it.

What changed

  • meta.first_comment for YouTube (commentThreads.insert, ≤ 10,000 but capped at 2,200 to share the field with Instagram) and Instagram (/{media_id}/comments; instagram_manage_comments joins the requested scopes — existing IG connections need one reconnect to pick it up).
  • Posting the comment happens after the post is marked published, in a FirstCommentPoster that catches everything and only logs: a failed comment must never fail a published post. Posts held in pending review (Google Business) get no comment.
  • The field is exposed in the editor's YouTube and Instagram channel settings panels, and validates through PostPlatformMetaRules, so the web editor, the REST API, and MCP all accept and persist it (fields without a rule there get silently stripped by validated() — covered by the meta persistence tests).

Testing

FirstCommentPosterTest, YouTubePublisherTest, PostApiPlatformMetaTest, PostPlatformMetaToolTest pass. Battle-tested live: first comments posted on YouTube Shorts and Instagram.

@gynsus
gynsus force-pushed the pr/youtube-description-first-comment branch 2 times, most recently from fd55ed6 to 5347ff5 Compare September 22, 2026 08:24
@paulocastellano

Copy link
Copy Markdown
Contributor

@gynsus it's ready for review?

@gynsus

gynsus commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

@paulocastellano Yes, ready for review! The branch is rebased on v1.1.0 (also adapted the new repurpose caption tests to the raised YouTube description limit) and CI is fully green.

@gynsus gynsus changed the title YouTube descriptions and a first comment after publish (YouTube + Instagram) Auto first comment after publish (YouTube + Instagram) Sep 30, 2026
A per-channel meta.first_comment (≤2200, Instagram's comment limit) is
posted by FirstCommentPoster right after a successful publish — YouTube
via commentThreads.insert, Instagram via /{media}/comments. Failures
are logged and never fail the live post; Stories and in-review posts
get no comment. Connect flows request the comment scopes.

Reworked for the post_platforms-into-posts merge: the poster takes the
post itself and the rules use the prefix-parameterized meta keys.
@gynsus
gynsus force-pushed the pr/youtube-description-first-comment branch from 7f50de3 to 9d8c243 Compare October 11, 2026 08:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants