Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Buffer

Scalekit connector
Open markdown

The Buffer connector lets your AI agent act in each user's Buffer account. Each user signs in to Buffer once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 23 tools.

Tools
23
What they doRead · write · destructive
12 · 8 · 312 read8 write3 destructive
Users sign in with
OAuth app
Your own Buffer app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Buffer connection

    In AgentKit > Connections, create a Buffer connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Buffer connections use your own OAuth app. Register one with Buffer and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Buffer connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'buffer'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Buffer:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'buffer_get_account',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • buffer_get_accountGet the authenticated Buffer account profile.Read-only

    Get Account

    Get the authenticated Buffer account profile. Returns account id, email, name, timezone, avatar url and creation date. Use get_account to identify the connected user. Use list_organizations to find organization ids.

    Inputs

    This tool takes no inputs.

  • buffer_get_channelGet a single Buffer channel by id.Read-only

    Get Channel

    Get a single Buffer channel by id. Returns channel name, service, type, timezone, connection, lock and queue status, and posting schedule. Use get_channel when you already have the channel id. Use list_channels to discover channels in an organization.

    Inputs

    idstringrequired
    ID of the channel to fetch. Get it from buffer_list_channels.
  • buffer_get_daily_posting_limitsCheck how many posts are sent and scheduled for channels on a given day against each network's daily limit.Read-only

    Get Daily Posting Limits

    Check how many posts are sent and scheduled for channels on a given day against each network's daily limit. Returns per channel the sent count, scheduled count, limit (null means unlimited) and whether the limit is reached. Use get_daily_posting_limits before scheduling many posts on one day. Use list_posts to see the posts themselves.

    Inputs

    channelIdsarrayrequired
    IDs of the channels to check. All channels must belong to the same organization.
    datestring
    Day to check as an ISO 8601 datetime. Defaults to today when omitted.
  • buffer_get_postGet a single Buffer post by id.Read-only

    Get Post

    Get a single Buffer post by id. Returns post text, status, share mode, schedule and sent times, channel, tags, assets and any publishing error. Use get_post when you have the post id. Use list_posts to search for posts.

    Inputs

    idstringrequired
    ID of the post to fetch. Get it from buffer_list_posts or the create_post response.
  • buffer_get_tagGet a single Buffer tag by id.Read-only

    Get Tag

    Get a single Buffer tag by id. Returns the tag id, name, color, color name and lock state. Use get_tag when you have the tag id. Use list_tags to browse an organization's tags.

    Inputs

    idstringrequired
    ID of the tag to fetch. Get it from buffer_list_tags.
  • buffer_list_channelsList the connected social channels of a Buffer organization, optionally only locked or unlocked ones.Read-only

    List Channels

    List the connected social channels of a Buffer organization, optionally only locked or unlocked ones. Returns channel id, name, service, type, timezone, connection and queue status, and posting schedule. Use list_channels to find the channelId needed by create_post and list_posts. Use get_channel for one channel by id.

    Inputs

    organizationIdstringrequired
    ID of the Buffer organization that owns the channels. Get it from buffer_list_organizations.
    isLockedboolean
    When true return only locked channels, when false only unlocked channels. Omit to return all channels.
    productstring
    Only return channels supported by this Buffer product. Omit to return all channels.one of analyzebuffercommentsengagepublishstartPage
  • buffer_list_idea_groupsList the idea groups (board columns) of a Buffer organization.Read-only

    List Idea Groups

    List the idea groups (board columns) of a Buffer organization. Returns each group's id, name and lock state. Use list_idea_groups to find the group ids used to filter list_ideas.

    Inputs

    organizationIdstringrequired
    ID of the Buffer organization that owns the idea groups. Get it from buffer_list_organizations.
  • buffer_list_ideasList ideas in a Buffer organization, optionally filtered by group or tag, with cursor pagination.Read-only

    List Ideas

    List ideas in a Buffer organization, optionally filtered by group or tag, with cursor pagination. Returns idea id, title, text, target date, services, tags, media and group id, plus pageInfo.endCursor for the next page. Use list_ideas to browse saved content ideas. Use list_idea_groups to find group ids.

    Inputs

    organizationIdstringrequired
    ID of the Buffer organization that owns the ideas. Get it from buffer_list_organizations.
    afterstring
    Opaque pagination cursor. Pass pageInfo.endCursor from the previous response to fetch the next page; omit for the first page.
    firstinteger
    Number of items to return per page (maximum 100). Omit to use Buffer's default page size.
    groupIdsarray
    Only return ideas in these idea group IDs. Takes precedence over groupMembership.
    groupMembershipstring
    Return only grouped or only ungrouped ideas. Ignored when groupIds is set.one of groupedungrouped
    tagIdsarray
    Only return ideas carrying any of these tag IDs.