> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beam.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Integrations

> Build an integration for an internal or proprietary platform from the workspace Integrations page

When you need connections to proprietary systems, internal tools, or services not in Beam's integration catalog, custom integrations let you build direct API connections.

<Frame>
  <img src="https://mintcdn.com/beamai/5sjMFBB-gamSkrEM/02-building-agents/advanced-patterns/custom-integrations/custom-integration-builder-current.jpg?fit=max&auto=format&n=5sjMFBB-gamSkrEM&q=85&s=fbb52c461f386e74a827416233f85e16" alt="Custom integration builder with name, category, authentication, custom headers, and tool options" width="1150" height="690" data-path="02-building-agents/advanced-patterns/custom-integrations/custom-integration-builder-current.jpg" />
</Frame>

<iframe src="https://app.supademo.com/embed/cmgj612mf10clkrn9np4rulwe" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen style={{width: "100%", height: "450px"}} />

<h2 id="when-to-build-custom-integrations">
  When to Build Custom Integrations
</h2>

<CardGroup cols={2}>
  <Card title="Internal Systems" icon="building">
    Connect proprietary business systems and internal platforms
  </Card>

  <Card title="Specialized Services" icon="flask">
    Integrate industry-specific platforms not in the catalog
  </Card>

  <Card title="Custom APIs" icon="code">
    Work with custom-built APIs and microservices
  </Card>

  <Card title="Custom Auth" icon="key">
    Implement specialized authentication requirements
  </Card>
</CardGroup>

**Before Building:**

* Check if the service exists in Beam's 1500+ integration catalog
* Have API documentation ready (OpenAPI spec preferred)
* Confirm authentication credentials and permissions

<h2 id="building-a-custom-integration">
  Building a Custom Integration
</h2>

<Steps>
  <Step title="Access Integration Builder">
    In the workspace sidebar, open **Integrations**, then select **Create custom integration**.
  </Step>

  <Step title="Configure Basics">
    **Name**: Clear, descriptive (e.g., "Acme CRM API")

    **Upload an icon**: Optional, for visual identification

    **Category**: Select appropriate category for filtering
  </Step>

  <Step title="Configure Authentication">
    Select **None**, **API Key**, **Basic**, or **OAuth (2.0)**. Add any required custom header keys and values in the header table.
  </Step>

  <Step title="Define Tools and Actions">
    Choose **Add tool** for manual tool setup or **Import from URL** to start from a specification URL. The builder also provides a **Bypass SSL verification** option.
  </Step>

  <Step title="Configure Tool Details">
    **API Endpoint:**

    * HTTP Method: GET, POST, PUT, PATCH, DELETE
    * Endpoint URL with parameter placeholders
    * Example: `https://api.vendor.com/orders/{order_id}`

    <Frame>
      <img src="https://mintcdn.com/beamai/19PRqq2Lu11IakoJ/02-building-agents/advanced-patterns/custom-integrations/Screenshot%202025-11-07%20at%2020.26.59.png?fit=max&auto=format&n=19PRqq2Lu11IakoJ&q=85&s=8b1ba19119e9a59eb6ed166fd8b792c5" alt="Tool configuration with endpoint and parameters" width="2346" height="1546" data-path="02-building-agents/advanced-patterns/custom-integrations/Screenshot 2025-11-07 at 20.26.59.png" />
    </Frame>

    **Parameters:**

    * **URL**: Path variables (`{order_id}`)
    * **Query**: URL parameters (`?status=completed`)
    * **Body**: JSON for POST/PUT/PATCH

    <Frame>
      <img src="https://mintcdn.com/beamai/19PRqq2Lu11IakoJ/02-building-agents/advanced-patterns/custom-integrations/Screenshot%202025-11-07%20at%2020.28.59.png?fit=max&auto=format&n=19PRqq2Lu11IakoJ&q=85&s=105d6ae616e07627548207757ea984ac" alt="Query parameters configuration" width="2356" height="1548" data-path="02-building-agents/advanced-patterns/custom-integrations/Screenshot 2025-11-07 at 20.28.59.png" />
    </Frame>

    Each parameter needs:

    * Key (name)
    * Type (String, Number, Boolean, Object, Array)
    * Parameter hint (AI context)
    * Required toggle

    **Test Tool**: Validate with sample values before saving
  </Step>

  <Step title="Save and Add Connection">
    Select **Save** to create the integration. Select **Discard** to leave the builder without saving.
  </Step>
</Steps>

<h2 id="using-in-workflows">
  Using in Workflows
</h2>

<h3 id="adding-custom-integration-to-nodes">
  Adding Custom Integration to Nodes
</h3>

1. **Select Tool**: Browse to your custom integration in node configuration
2. **Choose Action**: Pick specific API operation
3. **Map Inputs**: Use variable fill methods to pass data
4. **Select Connection**: Choose which credentials to use

<h3 id="accessing-outputs">
  Accessing Outputs
</h3>

Custom integration outputs are accessible to downstream nodes:

```text theme={null}
${node_name.field_name}
```

**Example:**

```text theme={null}
Order ID: ${get_order.order_id}
Status: ${get_order.status}
Total: ${get_order.total}
```

<h2 id="authentication-methods">
  Authentication Methods
</h2>

<h3 id="api-key">
  API Key
</h3>

Most common method. Configure where the key is sent:

* **Bearer**: `Authorization: Bearer {api_key}`
* **Header**: Custom header name
* **Query**: URL parameter

**Best Practice**: Use connection-level storage, rotate regularly, separate keys for environments

<h3 id="oauth-2-0">
  OAuth 2.0
</h3>

Secure, user-authorized access:

**Authorization Code**: User explicitly authorizes, supports token refresh

**Client Credentials**: Machine-to-machine, no user authorization

**Required**: Authorization URL, Access Token URL, Scopes, Client ID/Secret

<h3 id="basic">
  Basic
</h3>

Username/password for legacy systems. Less secure than modern methods.

<h2 id="schema-definition">
  Schema Definition
</h2>

<h3 id="openapi-import">
  OpenAPI Import
</h3>

Fastest setup for documented APIs:

1. Provide OpenAPI spec URL
2. System generates tools automatically
3. Review and activate endpoints

Supports OpenAPI 3.0.x, 2.0 (Swagger), JSON or YAML

<h3 id="manual-schema">
  Manual Schema
</h3>

For APIs without OpenAPI specs:

```json theme={null}
{
  "tool_name": "Get Order Details",
  "description": "Retrieve order information",
  "required_extracted_args": [
    "order_id: string // Order identifier"
  ],
  "integration_provider_details": {
    "request": {
      "method": "GET",
      "endpoint": "https://api.vendor.com/orders/{order_id}"
    },
    "response": {
      "order_id": "{{result.data.id}}",
      "status": "{{result.data.status}}"
    }
  }
}
```

<h2 id="testing">
  Testing
</h2>

**Test Tool Feature:**

1. Open tool configuration
2. Click "Test tool" tab
3. Provide sample values
4. Verify response structure

**Test in Workflow:**

* Build minimal flow with static data
* Run task manually
* Review execution results
* Verify data flows to next nodes

<h2 id="common-errors">
  Common Errors
</h2>

**401 Unauthorized**: Check credentials, token expiration, OAuth scopes

**400 Bad Request**: Verify required parameters, types, formats

**429 Too Many Requests**: Add delays, use caching, batch operations

**Request Timeout**: Check endpoint accessibility, optimize queries

<h2 id="advanced-patterns">
  Advanced Patterns
</h2>

**Dynamic Endpoints**: Use variable substitution

```text theme={null}
https://api.vendor.com/tenants/{tenant_id}/orders/{order_id}
```

**Pagination**: Loop through pages, extract next token, aggregate results

**Response Transformation**: Use Custom GPT tools to process raw API data into structured outputs

<h2 id="best-practices">
  Best Practices
</h2>

**Security:**

* Never expose API keys in logs
* Separate credentials for dev/staging/prod
* Rotate credentials regularly

**Performance:**

* Minimize unnecessary requests
* Cache frequently accessed data
* Respect rate limits

**Maintenance:**

* Document API version in integration name
* Test after API updates
* Monitor provider changelogs

<h2 id="examples">
  Examples
</h2>

<h3 id="internal-crm">
  Internal CRM
</h3>

* **Auth**: API Key (Header)
* **Tools**: Get Customer, Create Customer, Update Status
* **Use**: Workflow creates CRM record on signup

<h3 id="legacy-erp">
  Legacy ERP
</h3>

* **Auth**: Basic Authentication
* **Tools**: Query Inventory, Create PO, Update Status
* **Use**: Check inventory before order, create PO if low

<h3 id="microservices">
  Microservices
</h3>

* **Auth**: OAuth 2.0 (Client Credentials)
* **Tools**: Process Order, Calculate Shipping, Validate Payment
* **Use**: E-commerce workflow orchestrates multiple services

<h2 id="next-steps">
  Next Steps
</h2>

<CardGroup cols={2}>
  <Card title="Multi-Agent Collaboration" icon="users" href="/02-building-agents/advanced-patterns/multi-agent-collaboration/multi-agent-collaboration">
    Enable agents to call other agents for complex workflows
  </Card>

  <Card title="Integrations" icon="plug" href="/02-building-agents/agent-configuration/integrations/integrations">
    Learn about pre-built integration catalog
  </Card>

  <Card title="Structured Outputs" icon="brackets-curly" href="/02-building-agents/agent-configuration/structured-outputs/structured-outputs">
    Design predictable output schemas for integrations
  </Card>

  <Card title="Multi-Agent Collaboration" icon="users" href="/02-building-agents/advanced-patterns/multi-agent-collaboration/multi-agent-collaboration">
    Enable agents to share data and coordinate workflows
  </Card>
</CardGroup>
