Custom Integrations
When the Ema Platform Integrations catalog doesn't already have what you need, a custom integration lets you wrap any external API and expose it to your AI Employees as Tools. A custom integration holds the authentication and connection details for one external system; the Tools inside it are the individual operations an AI Employee can invoke in that system.
This page walks the end-to-end path: create the integration, configure authentication, add a connection, build and test Tools, publish, wire them into a workflow, and (once built) share or move it between workspaces and environments. The mechanics of the editor itself are covered in depth in The Tool Editor; this page is the orientation around it.
Who can build. A builder or admin in your workspace can create a custom integration. Ema Platform Integrations are built by Ema; you use them, but can't edit them.
When to use a custom integration
Reach for a custom integration when you want an AI Employee to act in a system Ema doesn't ship a prebuilt integration for: create a record, look something up, trigger a job. For reading documents into a Knowledge base, use a data connector instead; connectors sync content, custom integrations call APIs.
Step 1 — Create the integration
From the API tab of the Integrations page, select New integration → API. This opens the New API integration dialog:
- Display name: what the integration is called.
- Description: a short description.
- Icon (optional): a PNG or JPEG file, up to 256 KB.
- Category: defaults to Custom.
Select Create. The integration starts as a draft under Made in your workspace in the catalog, and the remaining steps (Authentication, Connections, Tools) unlock from there.
Step 2 — Configure authentication
In the Authentication step, select Configure authentication and pick a scheme. A custom integration declares a structured set of Authentication fields under one authentication scheme:
| Scheme | What it is / when to use | Examples | Connection type | Sub-flavours |
|---|---|---|---|---|
| OAuth 2.0 | Users sign in at the provider; Ema stores and auto-rotates each user's tokens. | Google, Slack, GitHub, Salesforce, HubSpot | Shared or User | PKCE; Token endpoint auth method |
| OAuth 2.0 Client Credentials | Machine-to-machine: Ema exchanges a client ID + secret for an access token and rotates it (no user sign-in). | Microsoft Graph, Salesforce, Stripe | Shared only | Token endpoint auth method |
| OAuth 2.0 (Refresh Token) | Machine-to-machine using a long-lived refresh token you supply up front; Ema mints access tokens from it. | Workday | Shared or User | Token endpoint auth method |
| API key | The user provides an API key/token that Ema attaches to every request. | OpenAI, Stripe, SendGrid | Shared or User | SENT AS placement |
| OAuth 2.0 JWT Bearer | Ema exchanges a signed JWT assertion (using an RSA private key supplied at connection time) for an access token and renews it automatically. | — | Shared or User | — |
| Session login | Ema signs in to the site using a login URL and stores the resulting session cookies; re-authenticates automatically before the session expires. | — | Shared or User | — |
| Basic auth | A username and password sent as an HTTP Basic header. | Jira, Twilio, Zendesk | Shared or User | — |
| No auth | No credentials sent (the API is public, but still holds non-secret fields like a base URL). | — | — | — |
Sub-flavours:
- Token endpoint auth method (OAuth schemes): how Ema sends your client credentials to the provider's token endpoint. Body (default) puts them in the request body; Basic auth sends them as an HTTP Basic header. Most providers accept Body; some (e.g. Workday) require Basic. Set on the connection.
- PKCE (OAuth 2.0): applied automatically; no configuration needed.
- SENT AS (API key): where Ema attaches the key on each request: Bearer token, Custom auth header, Query param, or Body param.
Adding fields — Authentication fields and credential fields
Picking a scheme gives you the minimal fields it needs, shown automatically on the connection form (for OAuth 2.0: Base URL, Authorization URL, Token URL, Client ID, Client secret, Scopes). When an API needs more, you add your own as either an Authentication field or a credential field:
- Authentication fields: their values are filled when you create the connection template, so they're shared by every connection under it. Use them for the auth setup itself. Example: a Gmail (OAuth 2.0) integration needs two extra parameters on the token exchange (Access Type and Prompt), so you add them as Authentication fields on the template.
- Credential fields: entered per connection and sent on every API call. Use them when the API needs a value attached to each request. Example: an API-key integration whose API also requires an account ID on every call: add the account ID as a credential field, and Ema includes it on every request.
The Authentication fields section displays each field in a table showing its name, type, and whether it is required or sensitive. To add a new field, select Add field: a modal opens where you set the field name, type, and options. To edit an existing field, select it from the table.
The authentication scheme is fixed once set. You can add or remove individual fields later, but you can't switch schemes. Choose carefully.
Mark sensitive fields so the UI masks them; all credentials are encrypted at rest and are never returned in API responses (the UI shows only that a value is present). See Authentication and connections for how schemes, connection templates, and live connections relate.
API keys sent as a query parameter
Some APIs accept the API key only in the URL, never in a header. SerpApi (api_key) and Google Maps (key) are common examples. For an API key integration, add one credential field:
- In Credential fields, select Add. The Add credential field modal opens.
- Set Name to the vendor's URL parameter name exactly, for example
api_key. - Set Sent as to Query param.
- Turn on Required and Secret. You can't change either after you create the field.
- Select Add field.
Ema then adds the stored key to the URL of every request the integration makes, including requests from TypeScript Tools, and replaces any value a caller supplies for that parameter. Your other query parameters are sent exactly as written. Scripts never see the key.
A Query param field without both Required and Secret is an ordinary query parameter, not the integration's API key. If the integration has no other API key field, Ema refuses the authentication setup until you fix it. If a connection's key is blank, the Tool call stops before any request is sent.
Requests that carry the API key in the URL never follow redirects, even to the same host, so the key can't leak to another address. Use the vendor's final API URL as the integration's Base URL.
Viewing and editing a configured auth scheme
Once authentication is configured, the Authentication step displays a summary card showing the scheme name and the fields you have defined. To make changes (add or remove fields, or update field options), select Edit on the summary card. This opens an edit drawer on the right side of the page where you can modify the configuration and save. The summary card updates to reflect your changes when you close the drawer.
OAuth token request settings
Most OAuth providers accept the standard token request, so you can leave these settings alone. Change them only when the vendor's docs show a different format. Cornerstone OnDemand, for example, expects a JSON body with the fields clientId, clientSecret, and grantType.
On an OAuth integration, the edit drawer has a Token request section. Select Edit in that section to change:
| Setting | Options | When to change it |
|---|---|---|
| Body format | Form (default) or JSON | The vendor's token endpoint requires a JSON body. Applies to every OAuth scheme. |
| Field names | Standard (default) or Custom | The vendor uses other names for client_id, client_secret, grant_type, or scope. OAuth 2.0 Client Credentials only. |
With Custom, enter the vendor's name next to each standard field you want to rename, and leave a box empty to keep its standard name. A new name uses only letters, digits, and _ (at most 64 characters), each name can be used once, and it can't be a standard or reserved field name. Custom field names require the connection template's Token endpoint auth method to stay Body (default), because the other method keeps the credentials out of the body.
Select Save. Connections never ask for these settings. New connection templates use the saved values; existing templates keep the values they were created with.
Separate refresh endpoint
Some OAuth 2.0 providers refresh tokens at a different URL from the one that issues them. Figma, for example, issues tokens at https://api.figma.com/v1/oauth/token and refreshes them at https://api.figma.com/v1/oauth/refresh. For a provider like this:
- Add an Authentication field named
refresh_url. - When you create the connection template, enter the provider's refresh endpoint in Refresh URL.
Ema then sends token refreshes to the Refresh URL and everything else to the Token URL. Leave the field out for most providers: without it, refreshes go to the Token URL.
Configuring authentication defines how the integration connects. It doesn't create a live connection yet. You do that in the next step.
Step 3 — Add a connection
On the integration's Connections tab, add a Shared or User connection template. Its Enabled tools list controls which Tools it can run. For the steps, see Add a connection. To choose the type, see Shared or User.
Step 4 — Build Tools
A Tool is a single operation an AI Employee can invoke in the connected system: "create a ticket," "look up an order," "send a message." You build Tools inside the integration's Tools step.
Every Tool, whatever its flavour, is defined by the same pieces:
- Name: the human-readable name you and other builders see.
- Description: what the Tool does. The agent reads this to decide when to call the Tool, so a clear description is what makes it get used at the right moment. Write it for the model, not just for people.
- Input schema: the typed parameters the Tool accepts. It defines what the agent (or a human-in-the-loop form) must supply, and keeps inputs validated.
- Output schema: a description of what the Tool returns, so the agent knows how to use the result.
- Write Tool: a flag marking the Tool as state-changing (a write), which changes how the agent treats it.
- Tags: optional labels for organizing Tools.
A Tool starts as a draft. You can validate and test it, and when you're satisfied, publish it. Once published, it's available for use by agents and Ema Autopilot.
Ema offers three Tool flavours; pick the one that fits the API:
- HTTP: a single declarative REST request. Use it when one request does the job.
- GraphQL: a single GraphQL query or mutation. Use it for GraphQL APIs.
- TypeScript: a sandboxed script. Use it when one request isn't enough: transforming inputs, branching on a response, paging through results, or calling several endpoints in sequence.
How to build each flavour (input/output schemas, {{...}} references, testing, and publishing) is covered in detail in The Tool Editor.
Step 5 — Test, publish, and use
Test each Tool against a live connection from the editor's Test panel, then Publish it. Edits to a published Tool go live immediately. For the details, see Test, validate, and publish.
To give a published Tool to an AI Employee, see Give Tools to an AI Employee.
Who can edit
These rules govern who can edit a custom integration and its Tools. The workspace where the integration is created is its owner workspace:
- Owner workspace admins can always edit the integration and its Tools. They don't need to be listed anywhere.
- The builder who creates the integration can edit it and its Tools.
- Any other builder in the owner workspace who needs to edit it must be added explicitly: an owner workspace admin opens the integration's Settings → Integration admins, selects Add admin, and adds them.
- If your workspace is granted access to a custom integration owned by another workspace, you can use its published Tools but can't edit the integration or its Tools.
"Integration admins" isn't a separate Ema role. It's the list of people in the owner workspace allowed to edit this particular integration.
Step 6 — Share and move an integration
Once an integration is built, you can make it available beyond the workspace where you built it using two separate mechanisms:
Share with a descendant workspace (same environment). From the integration's Settings tab, under Workspaces with access, select Grant access and choose a workspace. You can grant access only to workspaces below yours in the hierarchy (descendants). The granted workspace's admins can then install and use the integration there (setting up their own connections), while editing the integration and its Tools stays with the owner workspace's Integration admins. Deleting the integration (from the Danger zone) removes all its Tools, connections, and history and can't be undone; Ema blocks the delete while a Tool is still in use, so it can't silently break a live AI Employee.
Export and import across environments. To move an integration between Ema environments (for example dev → staging → prod), export it as a bundle and import it in the target:
- Export: from the integration's detail page, pick the Tools to include and download the bundle. The bundle carries the integration's definition and its Tools (schemas, config) but never credentials or connections.
- Import: from New integration → Import integration, upload the bundle and choose Create new (a fresh copy) or Update the integration it originally came from. Ema tracks lineage, so re-imports update the right integration instead of duplicating it.
After importing, set up authentication and connections in the target environment — credentials never travel in the bundle.
What's next
- The Tool Editor — the complete editor reference: input/output schemas, references, HTTP, GraphQL, and TypeScript details, test, validate, and publish.
- MCP Servers — add your own MCP server and use the tools it exposes.
- Data Connectors — sync external documents into Knowledge bases instead of calling an API.