Repository navigation
feat(instagram): comment-to-DM automation with Instagram Login - #874
Merged
Merged
Conversation
Extend the existing fb-comments comment automation so an Instagram Login channel can reply to matching comments with a public reply plus a private DM. Adds the me/messages private reply and me/media listing on graph.instagram.com, an Instagram post picker in the builder, a platform selector with Instagram gating (no comment likes), and the worker text-DM branch. No database migration is required as the type column already exists. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01JVD52t9bnQFDPemU5HEwAC
Splits Instagram comment automation out of fb-comments into a standalone ig-comments feature, with a connection-type picker (Instagram Business vs Instagram Login via Facebook), full DM/media parity for the Facebook-connected variant, and correct per-variant like-comment gating (previously disabled for both Instagram types). Also fixes several issues found during review: - folderService.changeFolder had no case for fbComment/igComment, so "move to folder" threw for every comment automation - the folder-scoped list queries didn't filter at all when no folderId was present, so moved items still showed at root - fb-comment-posts-store made 3 redundant API calls per page load - de-duplicated 5 pairs of near-identical dialogs between fb-comments/ig-comments into features/shared/comment-automation
3 tasks done
sung17
added a commit
that referenced
this pull request
Aug 17, 2026
…hannels (#961) processCommentAIReply only dispatched private DMs when channelType was "messenger" (stale "no private_replies API" comment, predating the Instagram private-reply support added in #874). instagram and instagramFacebook silently no-op'd: no send, no throw, no log line (issue #863). Wires up the already-working sendInstagramLoginPrivateReply/sendInstagramFacebookPrivateReply instead, mirroring executePrivateReply's existing three-channel dispatch. Also splits the ~830-line comment-automation/index.ts into focused files (automation-matching, hide-comments, public-reply, private-reply) and extracts a shared CommentAutomationChannelType, since the private-reply dispatch table would otherwise need to be duplicated between index.ts and ai-reply.ts. Adds test coverage for the instagram/instagramFacebook AI-reply private-DM paths and corrects a comment-attachment.ts docstring that wrongly implied parity with executePrivateReply's channel support. Refs #863 Co-authored-by: Deathgiver <[email protected]>
realcodesiman
pushed a commit
that referenced
this pull request
Aug 23, 2026
Both `docs/fb-comment-automation.md` and the `fb-comment-automation` skill still
claimed Instagram comment automation was unimplemented ("the builder always stores
`type = "messenger"`", "IG private-DM text is out of scope"), which has been wrong
since #874 shipped the `ig-comments` builder feature and the `instagram` /
`instagramFacebook` channel types. #831 and #1018 then moved flow-based private
replies onto Meta's comment_id-anchored Send API. None of those PRs touched the
docs, so the guidance actively told readers (and AI agents) not to work on IG.
Rewrite the scope banner, the `type` option row, the reply-type table, the known-gap
bullet and skill trap 6 to describe the three `CommentAutomationChannelType` values,
and record the real per-channel limits: comment liking is messenger +
instagramFacebook only, and the hide image/video attachment lookup is messenger only.
Claude-Session: https://claude.ai/code/session_01Jr3BRqH3woCzbcePEBPira
Co-authored-by: Claude Opus 5 <[email protected]>
viethung0o0
pushed a commit
that referenced
this pull request
Sep 7, 2026
* feat(instagram): add comment-to-DM automation for Instagram Login Extend the existing fb-comments comment automation so an Instagram Login channel can reply to matching comments with a public reply plus a private DM. Adds the me/messages private reply and me/media listing on graph.instagram.com, an Instagram post picker in the builder, a platform selector with Instagram gating (no comment likes), and the worker text-DM branch. No database migration is required as the type column already exists. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01JVD52t9bnQFDPemU5HEwAC * feat(ig-comments): split instagram comment automation into its own tool Splits Instagram comment automation out of fb-comments into a standalone ig-comments feature, with a connection-type picker (Instagram Business vs Instagram Login via Facebook), full DM/media parity for the Facebook-connected variant, and correct per-variant like-comment gating (previously disabled for both Instagram types). Also fixes several issues found during review: - folderService.changeFolder had no case for fbComment/igComment, so "move to folder" threw for every comment automation - the folder-scoped list queries didn't filter at all when no folderId was present, so moved items still showed at root - fb-comment-posts-store made 3 redundant API calls per page load - de-duplicated 5 pairs of near-identical dialogs between fb-comments/ig-comments into features/shared/comment-automation --------- Co-authored-by: alansyue <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Deathgiver <[email protected]>
viethung0o0
pushed a commit
that referenced
this pull request
Sep 7, 2026
…hannels (#961) processCommentAIReply only dispatched private DMs when channelType was "messenger" (stale "no private_replies API" comment, predating the Instagram private-reply support added in #874). instagram and instagramFacebook silently no-op'd: no send, no throw, no log line (issue #863). Wires up the already-working sendInstagramLoginPrivateReply/sendInstagramFacebookPrivateReply instead, mirroring executePrivateReply's existing three-channel dispatch. Also splits the ~830-line comment-automation/index.ts into focused files (automation-matching, hide-comments, public-reply, private-reply) and extracts a shared CommentAutomationChannelType, since the private-reply dispatch table would otherwise need to be duplicated between index.ts and ai-reply.ts. Adds test coverage for the instagram/instagramFacebook AI-reply private-DM paths and corrects a comment-attachment.ts docstring that wrongly implied parity with executePrivateReply's channel support. Refs #863 Co-authored-by: Deathgiver <[email protected]>
viethung0o0
pushed a commit
that referenced
this pull request
Sep 7, 2026
Both `docs/fb-comment-automation.md` and the `fb-comment-automation` skill still
claimed Instagram comment automation was unimplemented ("the builder always stores
`type = "messenger"`", "IG private-DM text is out of scope"), which has been wrong
since #874 shipped the `ig-comments` builder feature and the `instagram` /
`instagramFacebook` channel types. #831 and #1018 then moved flow-based private
replies onto Meta's comment_id-anchored Send API. None of those PRs touched the
docs, so the guidance actively told readers (and AI agents) not to work on IG.
Rewrite the scope banner, the `type` option row, the reply-type table, the known-gap
bullet and skill trap 6 to describe the three `CommentAutomationChannelType` values,
and record the real per-channel limits: comment liking is messenger +
instagramFacebook only, and the hide image/video attachment lookup is messenger only.
Claude-Session: https://claude.ai/code/session_01Jr3BRqH3woCzbcePEBPira
Co-authored-by: Claude Opus 5 <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ig-commentstool/feature with dedicated pages, actions, queries, and components.Changes
apps/builder/src/features/ig-comments/feature: actions (create/update/delete/bulk-delete), API (authenticated.ts), queries, schema, components (form, table, posts/connection-type dialogs), and Zustand store.apps/builder/src/app/space/[workspaceId]/ig-comments/and the has-folder@foldersslot, mirroring the existingfb-commentsfolder UX.packages/business/src/folder/service.ts:resolveResourceModelnow handlesfbComment/igCommentfolder types — fixes "Move to folder" throwingInvalid folder typefor all Facebook/Instagram comment automations.fb-commentsandig-commentslist queries: fixed root-folder filtering so an automation moved into a folder no longer also shows up in the unfiled/root view.apps/builder/src/features/shared/comment-automation/) extracted from the previously duplicated fb-comments/ig-comments delete/rename/schedule/bulk-delete/bulk-move dialogs.fb-comment-posts-store.ts+facebookPostsAPI: consolidated 3 separate post-type fetches into a single API call/store initialization.collectSettledhelper (apps/builder/src/lib/collect-settled.ts) forPromise.allSettled+ logging, reused by both Instagram media collection and the Facebook posts API.packages/database: newigCommentAutomationTypespartial (single source of truth, replacing the ad-hoc enum inig-comments/schema/action.ts), new folder migration forigCommentfolder type./fb-comments/[id]URLs for migrated Instagram automations now redirect to/ig-comments/[id]instead of 404ing.integrations/instagramandintegrations/instagram-facebook: comment/post APIs and webhook handling to support the comment-automation flow.apps/worker: comment-automation job handler updates for Instagram.Test plan
pnpm lintpnpm --filter builder check-types/fb-comments/[id]URL for a migrated Instagram automation redirects to/ig-comments/[id]