Social Media Functions

Campfire social media functions connect the current workspace to configured social accounts and expose Instagram account, content, comment, DM, mention, insight, discovery, and publishing workflows to CodeBot.

These tools are workspace-scoped. Campfire stores the selected account for the workspace, asks for approval before connecting accounts or sending, moderating, or publishing content, and uses the official Meta/Instagram API surfaces available to the connected account.

Account Connection

  • listSocialMediaAccounts lists social media accounts configured in the account manager and returns account IDs.
  • connectWorkspaceToSocialMediaAccount connects the current Campfire workspace to one configured account. The accountId must come from listSocialMediaAccounts, and the action requires approval.
  • getSocialMediaProfile returns basic profile information for the connected Instagram account, including the public profile URL and fields exposed by Meta.

Use these before asking CodeBot to inspect or publish social content. A workspace must be connected to an account before most Instagram tools can work.

Content and Engagement

  • listSocialMediaContent lists posts, reels, videos, and stories for the connected workspace account. It supports since, until, and contentType filters.
  • listSocialMediaCommentsAndReactions lists recent comments and available reaction counts for a specific media item or across recent media.
  • replyToSocialMediaComment replies to an Instagram comment by numeric comment ID. It requires approval before sending.
  • moderateSocialMediaComment hides, unhides, or deletes an Instagram comment. It requires approval before changing anything.
  • getSocialMediaInsights retrieves account-level or media-level Instagram insights. It can use a default metric set or requested metric names.

Use these for inbox review, comment triage, campaign reporting, and responding to engagement. Comment IDs must come from listSocialMediaCommentsAndReactions; CodeBot should not invent IDs from visible text.

Discovery, Profiles, and People Activity

  • searchInstagramHashtag searches for an Instagram hashtag and can optionally return recent or top public media.
  • listInstagramHashtagMedia lists recent or top public media for a hashtag ID or hashtag text.
  • listSocialMediaMentions lists recent Instagram media where the connected account was tagged or mentioned.
  • listSocialMediaPeopleActivity groups recent Instagram activity by person across commenters, DM participants, and accounts that tagged or mentioned the connected account.
  • lookupInstagramBusinessProfile looks up a public Instagram Business or Creator profile by username when business discovery is available.
  • listSocialMediaEngagers lists people who recently engaged through comments and DMs. This is not a follower list.
  • openInstagramProfile returns a public Instagram profile URL for a username.
  • getInstagramProfileUrl is a compatibility alias that returns the same kind of public profile URL as openInstagramProfile.

Instagram does not expose every surface users may expect. In particular, these tools do not provide a personalized home or Explore feed, and follower relationship fields may remain unknown unless Meta exposes them to the app.

Direct Messages

  • listSocialMediaConversations lists recent Instagram DM conversations for the connected account.
  • listSocialMediaMessages lists recent messages for one conversation ID returned by listSocialMediaConversations.
  • replyToSocialMediaMessage sends a text reply through Instagram DMs. It can infer the recipient from a conversation ID, resolve a recent DM participant by username, or use a raw recipient ID when available. It requires approval before sending.

Prefer conversation IDs or recent participant usernames over raw recipient IDs. Campfire tries to validate reply windows by resolving recipients against recent conversations when possible.

Publishing

  • createSocialMediaPost creates and publishes a new Instagram post, reel, story, or carousel for the connected workspace account. It supports local workspace media files, absolute local media paths, or already-public HTTPS media URLs. It requires approval before publishing.

For local files, Campfire uploads the media before publishing. For carousel posts, pass two to ten images through mediaFilePaths or mediaUrls. Reels must be videos. caption is optional, and contentType can be post, reel, or story.

When To Use Which Tool

Use account tools first when the workspace has not yet been connected to Instagram.

Use content and engagement tools for owned-media review, comment replies, moderation, and insights.

Use hashtag and profile tools for public discovery.

Use DM tools for private Instagram conversations.

Use publishing only after the user has reviewed the intended media, caption, account, and post type.