Skip to content

Build an integration for an API that isn't in the catalog: say how it signs in, where requests go and which resources it has, then install it like any other.

Skip the reading — fast path for coding agents
CLI
truto integrations build <openapi-url> <slug>
Skill
View truto-integrations-build skill on GitHub Cursor / Claude Code: /skill truto-integrations-build

This guide uses Salesforce as the example.

Adding a New Integration

  1. Open the catalog
    Click Catalog in the top bar, open the Integrations tab, and click Create integration. (Install from catalog on the Integrations page opens the catalog too.)
    Create Integration

  2. Open the Create Integration Page
    The button opens the page where you configure every detail. Its tabs are Overview, Readme, Authentication, Request behavior, Resources and Actions.
    Create Integration overview

Start from an existing config

You don't have to start from an empty page:

  • Import from JSON on the Create page fills it in from an integration's JSON.
  • Clone in the ⋯ menu of any catalog integration opens the Create page prefilled with its configuration.
  • The CLI builds a config from the provider's API documentation, and applies it:
truto integrations build <openapi-url> <slug>
truto integrations apply <file>

Step-by-Step Integration Creation

Step 1: The Overview tab

On the Overview tab, enter the integration's basic details.

Required fields

  • Label: The name of your integration, shown in the catalog (for example "Salesforce").
  • Identifier: A unique name for the integration. It is used in the OAuth callback URL, the Link SDK and Unified API mappings.
  • Category: Categorize your integration to make it easy to find.

Optional fields

  • Logo and Icon: Shown in the catalog and the Connect UI.
  • Beta: Check this if the integration is still in testing.

For our Salesforce example, these details might look like this:
Salesforce Basic Details


Step 2: Configuring Authentication and Variables

Authentication is how your end users sign in to the provider when they connect. Check each sign-in method the provider supports. Your end users pick one in the Connect UI, and each method has its own Variables. A new integration starts with OAuth 2.0 checked.

Authentication Options

  1. OAuth 2.0:

    • What it is: Users sign in to the provider to grant access.
    • Why use it: The recommended method wherever the provider supports it.
  2. API Key:

    • What it is: Users provide an API key, similar to a password.
    • Why use it: For providers that don't offer OAuth.
  3. Keka OAuth:

    • What it is: A sign-in method used only for Keka.
  4. OAuth 2.0 Client Credentials:

    • What it is: A server-to-server way to authenticate, used when users don't need to log in.
    • Why use it: For providers that issue tokens to an app rather than to a user.
  5. JWT:

    • What it is: Authentication using JSON Web Tokens.
    • Why use it: For providers that issue or accept JWTs for API access.
    • Read more in Configuration reference — JWT.
  6. OAuth 1.0:

    • What it is: The original OAuth signing flow, still used by some APIs.
    • Why use it: When the provider requires OAuth 1.0 instead of OAuth 2.0.
    • Read more in Configuration reference — OAuth 1.0.
  7. AWS STS:

    • What it is: Truto signs an AWS STS AssumeRole call with a long-lived AWS key and uses the short-lived key that comes back.
    • Why use it: For AWS APIs, where your customer grants access by creating a role in their AWS account instead of handing over a key. One connection can read many AWS accounts.
    • Read more in Configuration reference — AWS STS.

Salesforce Example: OAuth 2.0

For Salesforce, OAuth 2.0 is used. Here’s what the configuration looks like:
Salesforce OAuth

Also, refer to our blog on Creating an OAuth App on Salesforce.

  • Redirect URL: This URL tells Salesforce where to send users after logging in (https://api.truto.one/connect/salesforce/callback). You must add this to your Salesforce OAuth app settings.
  • Client ID and Client Secret: You get these values when you create the OAuth app in Salesforce.
  • Authorization Host and Path: These are provided by Salesforce and indicate where users log in to give you access.
  • Token Host and Path: This URL is used to get the access token that allows you to make API calls on behalf of the user. These are provided by Salesforce in their documentation.

Read more on Authentication.


Variables Section

Variables are the fields your end users fill in when they connect, like a subdomain. Each sign-in method has its own variables, so check a method under Authentication first.

For instance, if Salesforce uses a unique subdomain for each customer, you can use a variable (subdomain) in the Base URL instead of hardcoding it. This way, every customer can provide their own subdomain when they connect their Salesforce account.

Integration Variables Screenshots

For Salesforce, we use a variable called subdomain:
Salesforce OAuth Variables

Read more on Variables.


Token Details

Towards the end of the Authentication section, fill in additional token details based on Salesforce’s documentation.

Salesforce OAuth Tokens


Step 3: Authorization Options

With Salesforce, the Bearer Token is used to authorize every API request. The access token is added to each request like this:

Authorization: Bearer {{oauth.token.access_token}}

Truto adds this header to every request. Select the format the provider's documentation asks for. Here’s how it looks:
Salesforce Authorization

Read more on Authorization.


Step 4: Configuring Base URL and Headers

The Base URL and Headers sections define how API requests will be sent to Salesforce (or any other system).

Base URL

The Base URL is the provider's API address. For Salesforce, it looks like this:

https://{{subdomain}}.my.salesforce.com
  • Subdomain: This variable (subdomain) is provided by the user during account connection and makes sure that each request reaches the correct Salesforce environment.

Truto joins the base URL and each method's path the way a browser resolves a link: a path that starts with / replaces any path in the base URL. Put version segments in the method paths (/v2/users), or end the base URL in / and write paths without a leading /.

Headers

Base URL & Headers

Read more on Base URL and Headers.


Step 5: Configuring Query params

Query params add key-value pairs to every request URL. Choose the Query array format the provider expects, and add the parameters.

For example, you could add:

  • filter: To filter the results (e.g., get only active accounts).
  • sort: To sort the data in a particular order.
  • limit: To limit the number of records returned.

Salesforce Query Parameters

Note: These query parameters are included in every API request. Query parameters set on a resource method in the Resources section are added to them, and a parameter set in both places takes the method's value.

Read more on Query params.


Step 6: Configuring Pagination

Some APIs limit how much data they return in a single response. Pagination allows you to get all the data in smaller chunks or pages.

Salesforce Example for Pagination

For Salesforce, you set up pagination by defining:

  • Cursor path: Salesforce uses nextRecordsUrl to show where the next page of data is.
  • Is cursor link: This is checked because nextRecordsUrl is a full link.
  • Use the path retrieved from the cursor link: Salesforce provides a link, so Truto uses that path for the next request.

Salesforce Pagination Setup

Read more on Pagination.


Step 7: Configuring Rate Limiting

Rate limiting tells Truto how to recognise a rate-limited response from the provider. Truto does not slow your requests down.

Truto’s Default Values

By default, Truto treats a 429 from the provider as rate limited and returns 429, with a Retry-After header taken from the provider's Retry-After header. Proxy API and Unified API calls are not retried, so your code backs off; sync jobs wait and retry. To recognise rate limits another way, set the Rate limited expression (is_rate_limited), Rate limit headers expression (rate_limit_header_expression) and Retry after header expression (retry_after_header_expression).

Salesforce Rate Limit

Read more on Rate limiting.


Step 8: Setting Up Resources

The Resources section is where you define the core data you want to work with, like accounts. You also specify what operations you can perform on this data, such as listing accounts, getting a single account, creating, or updating an account. You can add multiple resources in an integration.

Truto uses the CRUD model (Create, Read, Update, Delete) to define resources: it turns the provider's API into CRUD APIs.

Key Elements of Resources:

  1. Resource Name: This is the type of data you’re working with (e.g., accounts).
  2. Method (Operations): Define actions such as:
    • List: Fetch all records (GET /services/data/v57.0/query).
    • Get: Get a single record by ID (GET /services/data/v57.0/sobjects/Account/{{id}}).
    • Create: Add a new record (POST /services/data/v57.0/sobjects/Account).
    • Update: Modify an existing record (PATCH /services/data/v57.0/sobjects/Account/{{id}}).
  3. Path: The API endpoint for each method. For Salesforce, it might be something like /services/data/v57.0/query. The SOQL endpoint is called for the list method and for other methods, the REST APIs are called.
  4. Response Path: Salesforce returns account data inside an object called records. This path helps Truto understand where to find the list of accounts in the response.
  5. Query params: Parameters for one method. They are combined with the integration's Query params.

Any other method name is a custom method, called with POST /proxy/<resource>/<method>. Set Body Format on every method that sends a body.

Salesforce Accounts Resource

Read more on Resources.


Step 9: Setting Up Actions

Actions are steps Truto runs at set points in an integrated account's life, such as right after it connects.

General Steps for Actions:

  1. Get Context: Read the integrated account's context.
  2. Transform: Change it with a JSONata expression (e.g., format the subdomain into a label).
  3. Update Context: Merge the result into the integrated account's context.

For Salesforce, after connecting a user’s account:

  1. Get Context: Read the Salesforce subdomain that the user provided.
  2. Transform: Create a label for the integrated account, using the subdomain.
  3. Update Context: Save the label on the integrated account.

Salesforce Actions

Once the integrated account is connected for a user, this is how the label shows up on the account:

Integrated account label

Read more on Actions.


Step 10: Save and install

Click Save. Truto opens the integration's catalog page. The integration is not installed yet: click Install and choose the environments (see Installing an integration). Only your team can see and install it.

Next

Install the integration and connect an account to try it. The Configuration reference lists every field and its key in the JSON.