Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Salesforce Marketing Cloud

Scalekit connector
Open markdown

The Salesforce Marketing Cloud connector lets your AI agent work with Salesforce Marketing Cloud. You connect it once with a server-to-server OAuth app, and Scalekit authenticates every call, so your agent never handles credentials. It comes with 288 tools.

Tools
288
What they doRead · write · destructive
134 · 118 · 36134 read118 write36 destructive
Users sign in with

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 Salesforce Marketing Cloud connection

    In AgentKit > Connections, create a Salesforce Marketing Cloud connection. The name you give it is the connection_name your code passes. See Configure connections.

    Console steps with screenshots

    Register a Server-to-Server Installed Package with Marketing Cloud so Scalekit can authenticate requests on your behalf using OAuth 2.0 client credentials. There is no redirect URI or user-facing authorize flow — Marketing Cloud issues a Client ID and Client Secret directly.

    1. Open Setup in Marketing Cloud

      • Sign in to Salesforce Marketing Cloud and click your profile menu in the top right, then select Setup.

        Salesforce Marketing Cloud app with the profile menu open showing the Setup link

    2. Go to Installed Packages

      • In Setup, under Platform Tools > Apps, click Installed Packages.

        Setup Home page with Installed Packages highlighted under Platform Tools > Apps

      • Click New and give the package a name, for example Scalekit Agent Auth.

        New Package Details dialog with the Name field filled in as Scalekit Agent Auth

      • Click Save. Marketing Cloud creates the package with no components yet.

        Package details page showing No Existing Components and an Add Component button

    3. Add an API Integration component

      • Click Add Component, choose API Integration as the component type, and click Next.

        Add Component dialog with API Integration selected as the component type

      • Choose Server-to-Server as the integration type and click Next. This is the OAuth 2.0 client credentials grant — the only integration type that issues both a Client ID and Client Secret without a redirect URI.

        Add Component dialog with Server-to-Server selected as the integration type

    4. Set the scope and save

      • Select the read/write permissions your agent needs across Channels (Email, SMS, Push, and so on), Assets, and Automation. Grant only what your tools call — you can add more scope later by editing the component.

        Set Server-to-Server Properties dialog with Scope checkboxes for Channels, Assets, and Automation

      • Click Save.

    5. Copy the Client Secret

      • Marketing Cloud shows the Client Secret once, immediately after you save. Copy it and store it securely.

        Generate secret dialog showing the one-time Client Secret value

    6. Copy the Client ID and tenant subdomain

      • Back on the package’s summary page, copy the Client Id and the Authentication Base URI.

      • Your tenant subdomain is the part of the Authentication Base URI before .auth.marketingcloudapis.com — for example, mc549xxxxxxxxxxxxxxxxxxxxxxxx in https://mc549xxxxxxxxxxxxxxxxxxxxxxxx.auth.marketingcloudapis.com/.

        Package summary page showing Client Id, Active Secret, and Authentication Base URI

    7. Add credentials in Scalekit

      • In the Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find Salesforce Marketing Cloud and click Create.
      • Note the Connection name — use this as connection_name in your code.

      Add a connected account via the dashboard for testing, or via the Scalekit API in production.

      In the dashboard, to test

      • Open the connection, click the Connected Accounts tab > Add account.
      • Fill in Your User’s ID, the Tenant Subdomain, Client ID, Client Secret, and optionally the Account ID (MID) of the business unit that created the package.
      • Click Save.

      In production

      Each user adds their own account through the authorization link: they enter their credentials on the page it opens.

      From your backend, if your app already has the credentials

      For example, when users enter them on a settings page in your app:

      import { ConnectorStatus } from '@scalekit-sdk/node'
      const authorizationDetails = {
      details: {
      case: 'staticAuth',
      value: {
      details: {
      domain: 'your-tenant-subdomain',
      client_id: 'your-client-id',
      client_secret: 'your-client-secret',
      },
      },
      },
      }
      let { connectedAccount } = await scalekit.actions.upsertConnectedAccount({
      connectionName: 'salesforcemarketingcloud',
      identifier: 'user_123',
      authorizationDetails,
      })
      // Make sure the account is ACTIVE before the first tool call.
      if (connectedAccount?.status !== ConnectorStatus.ACTIVE) {
      ;({ connectedAccount } = await scalekit.actions.upsertConnectedAccount({
      connectionName: 'salesforcemarketingcloud',
      identifier: 'user_123',
      authorizationDetails,
      }))
      }

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • salesforcemarketingcloud_address_email_validateValidate an email address's syntax and deliverability using Marketing Cloud's Address Verification API.Read-only

    Validate Email Address

    Validate an email address's syntax and deliverability using Marketing Cloud's Address Verification API. Choose one or more validators: SyntaxValidator checks for basic structural validity (e.g. presence of '@' and a domain with a '.'), MXValidator checks the domain has a valid DNS MX record, and ListDetectiveValidator checks the address's username or domain against a known bad-address filtering list. This is a read-only check -- it does not modify any Marketing Cloud data. Returns a validation result indicating whether the address passed each requested validator. Example: email 'help@example.com' with all three validators.

    Inputs

    emailstringrequired
    The email address to validate, e.g. 'help@example.com'.
    validatorsarray
    Which validators to run against the email address. SyntaxValidator checks basic format, MXValidator checks the domain's DNS MX record, and ListDetectiveValidator checks against a known bad-address list. Defaults to running all three.
  • salesforcemarketingcloud_approval_item_getRetrieve a single approval item by its unique ID from Salesforce Marketing Cloud's Approvals v2 REST API.Read-only

    Get Approval Item

    Retrieve a single approval item by its unique ID from Salesforce Marketing Cloud's Approvals v2 REST API. The approval item must belong to (be visible to) the current user's approval context. The response includes the approval's name, description, workflow state (e.g. draft, submitted, reviewed, approved), workflow type, deadline, comment counts, and the workflow item's current state and available transitions based on the current user's roles.

    Inputs

    idstringrequired
    The unique ID of the approval item to retrieve. Obtain this from the List Approval Items tool's response (approvalItemId).
  • salesforcemarketingcloud_approval_item_roles_listList the roles defined for a given Approvals v2 item and the users assigned to each role, via GET /hub/v1/approvals-v2/{id}/roles on Salesforce Marketing Cloud's Approvals REST API.Read-only

    List Approval Item Roles

    List the roles defined for a given Approvals v2 item and the users assigned to each role, via GET /hub/v1/approvals-v2/{id}/roles on Salesforce Marketing Cloud's Approvals REST API. Use this alongside Get Approval Item to see who can act on (review or approve) a specific approval item, and in what capacity. Confidence note: existence of this route was confirmed only via a search-indexed documentation page title; the exact shape of the returned roles/assignments has not been independently verified, so treat the returned fields as best-effort until confirmed against a live response.

    Inputs

    idstringrequired
    The unique ID of the approval item whose roles you want to list. Obtain this from the List Approval Items tool's response (approvalItemId).
  • salesforcemarketingcloud_approval_items_listList approval items in Salesforce Marketing Cloud that belong to the current user's approval workflow context, using the Approvals v2 REST API.Read-only

    List Approval Items

    List approval items in Salesforce Marketing Cloud that belong to the current user's approval workflow context, using the Approvals v2 REST API. Results can be filtered by workflow state, workflow type, object type, and other attributes, and are paginated. Use this to see what content (emails, journeys, assets, etc.) is pending, in review, or already approved. Each item in the response includes its approval ID, name, workflow state, workflow type, deadline, and comment counts.

    Inputs

    object_typestring
    Filter results to approval items for a specific object type, e.g. 'EmailSendDefinition' or 'InteractionStudio.DefinitionInfo' (journey). Leave blank to return items for all object types.
    pageinteger
    Page number of results to retrieve, starting at 1. Use with page_size to page through large result sets.default 1
    page_sizeinteger
    Number of approval items to return per page. Defaults to 25 if not specified.default 25
    sortstring
    Sort order for results, formatted as '<field> <ASC|DESC>'. Sortable fields are Name, CreatedDate, WorkflowState, and Deadline. Example: 'Deadline ASC'.
    workflow_statestring
    Filter results to approval items currently in this workflow state. Leave blank to return items in all states.one of draftsubmittedreviewedreturnedapproveddefining
  • salesforcemarketingcloud_approval_settings_getRetrieve the Approvals v2 configuration/settings that apply to the current user, via GET /hub/v1/approvals-v2/settings on Salesforce Marketing Cloud's Approvals REST API.Read-only

    Get Approval Settings

    Retrieve the Approvals v2 configuration/settings that apply to the current user, via GET /hub/v1/approvals-v2/settings on Salesforce Marketing Cloud's Approvals REST API. Use this alongside List Approval Items and Get Approval Item to understand how approvals are configured (for example, notification or workflow-related settings) before creating or acting on approval items. Confidence note: existence of this route was confirmed only via a search-indexed documentation page title; the exact shape of the returned settings object has not been independently verified, and no query or request-body parameters are documented for it, so this tool takes no input beyond authentication. Treat the response fields as best-effort until confirmed against a live call.

    Inputs

    This tool takes no inputs.

  • salesforcemarketingcloud_asset_category_getRetrieve a single Content Builder category (folder) by its numeric ID, using GET /asset/v1/content/categories/{id}.Read-only

    Get Content Category

    Retrieve a single Content Builder category (folder) by its numeric ID, using GET /asset/v1/content/categories/{id}. This returns just that one folder's id, name, parentId, and categoryType, rather than the full list returned by List Content Categories. Confirmed via two independently indexed official Salesforce documentation pages both titled 'Get Category by ID' -- developer.salesforce.com's current JS-rendered docs platform returns 404 to direct automated fetches of this deep-linked reference page, so the exact response shape was not read first-hand in this session; it is inferred from the equivalent List Content Categories response and the sibling Get Content Asset tool.

    Inputs

    idintegerrequired
    The numeric ID of the Content Builder category (folder) to retrieve, e.g. 3916. Find it in the Content Builder folder URL, or from a previous List Content Categories or Create Content Category response.
  • salesforcemarketingcloud_asset_category_listList Content Builder categories (folders) owned by or shared with your Marketing Cloud account (MID), using the Asset REST API.Read-only

    List Content Categories

    List Content Builder categories (folders) owned by or shared with your Marketing Cloud account (MID), using the Asset REST API. Supports pagination ($page/$pagesize), sorting ($orderBy), simple filtering ($filter), and requesting categories shared from other business units (scope=Shared). Each returned category includes its id, name, parentId, and categoryType. Use this to discover valid category IDs before creating or moving assets/folders.

    Inputs

    filterstring
    Simple filter expression to narrow results, using the same '$filter' Simple Query grammar as the Content Builder Assets endpoint: '<property> <operator> <value>' with a space-separated keyword operator, e.g. "parentId eq 3916" or "name eq 'Newsletters'". Supported operators: eq, neq, lt, lte, gt, gte, like. Quote string values with single quotes; leave numeric values (like parentId) unquoted. Do NOT use "==" -- Salesforce's Simple Query API rejects that syntax with a 400 'Invalid Query Format' error.
    order_bystring
    Field and direction to sort results by, e.g. "name asc" or "id desc".
    pageinteger
    1-based page number of results to return. Defaults to page 1 if omitted.
    page_sizeinteger
    Number of categories to return per page. Defaults to the API's standard page size if omitted.
    scopestring
    Set to "Shared" to request categories that have been shared with your MID from other business units, instead of ones your MID owns.
  • salesforcemarketingcloud_asset_channel_view_getGet the compiled output of one channel view of a Content Builder asset (for example the html, text, subjectline or preheader view of an email).Read-only

    Get Asset Channel View

    Get the compiled output of one channel view of a Content Builder asset (for example the html, text, subjectline or preheader view of an email). Returns the view's compiled content as the API returns it; the output can be large for rich emails. Use this to read the final rendered content of a single view. Use salesforcemarketingcloud_asset_get to read the asset's full metadata and every view definition at once, and salesforcemarketingcloud_asset_salutations_get_by_id for only an email's header and footer. Requires the documents_and_images_read scope and the numeric asset ID, which you can find with salesforcemarketingcloud_asset_list or salesforcemarketingcloud_asset_query.

    Inputs

    idintegerrequired
    The numeric ID of the Content Builder asset whose channel view to retrieve, e.g. 20331. This is the asset's internal ID, not its customerKey.
    view_namestringrequired
    The name of the channel view to retrieve. Valid names are the keys under the asset's views object, such as html, text, subjectline or preheader for an email. The full list of valid names is not documented, so call salesforcemarketingcloud_asset_get for the asset and use one of the keys under its views object. Example: html.