Skip to main content
Glama
creating-an-integration.mdx14.6 kB
--- title: "Creating an Integration" description: "Connect superglue to any system" --- Create an integration in superglue to connect tools with external systems. Integrations handle authentication and documentation retrieval automatically. Learn more about how integrations fit into the overall architecture in the [core concepts](/getting-started/core-concepts) section. ## Getting started <Tabs> <Tab title="Via Agent"> The fastest way to create an integration is through the agent interface. Visit [app.superglue.cloud](https://app.superglue.cloud) and start chatting with the agent. **Example:** ``` Create an integration to my ITSM platform under the URL: https://my-company.itsm.com using the attached PDF as documentation ``` superglue will: 1. Identify the target system 2. Guide through the authentication flow by collecting all required credentials 3. Create the integration and make it available immediately 4. Process and analyze the system's documentation automatically in the background <video autoPlay className="w-full rounded-lg" src="../resources/create-integration-via-agent.mp4" /> <Card icon="plug" href="https://app.superglue.cloud" horizontal> Start creating integrations with the agent </Card> </Tab> <Tab title="Via UI"> Integrations can also be created manually using the web application: <Steps> <Step title="Navigate to integrations"> Click the "Integrations" button in the sidebar </Step> <Step title="Open form"> Click **Add Integration** to open the integration form </Step> <Step title="Fill required fields"> - **Template**: Choose from 100+ prebuilt templates or create a custom integration. Templates pre-fill the base URL, documentation URL, and authentication type - **URL**: Base URL of the system (e.g., `https://api.stripe.com`) - **Documentation URL**: Optional but recommended link to API documentation - **Documentation as a file**: Optionally upload a documentation file (PDF, OpenAPI Specs, .zip files, etc.). If you upload a file, superglue will not crawl a doc URL. - **Credentials**: See [authentication and credential management](/guides/creating-an-integration#authentication-and-credential-management) for details - **OAuth**: For OAuth systems, click **Connect to system** to complete the flow and let superglue handle the token exchange </Step> <Step title="Click 'Add Integration'"> superglue saves your configuration and processes online documentation in the background if a documentation URL was provided </Step> </Steps> <video autoPlay className="w-full rounded-lg" src="../resources/create-integration-via-form.mp4" /> </Tab> <Tab title="Via SDK"> For programmatic integration creation, use the SDK. ```bash npm install @superglue/client ``` Example: ```typescript import { SuperglueClient } from "@superglue/client"; const superglue = new SuperglueClient({ apiKey: "your_api_key_here" }); const integration = await superglue.upsertIntegration({ id: "my-stripe", urlHost: "https://api.stripe.com", documentationUrl: "https://docs.stripe.com/api", credentials: { apiKey: "sk_test_..." } }); ``` **With OAuth:** ```typescript const integration = await superglue.upsertIntegration({ id: "my-hubspot", urlHost: "https://api.hubapi.com", documentationUrl: "https://developers.hubspot.com/docs/api", credentials: { clientId: "your_client_id", clientSecret: "your_client_secret", redirectUri: "https://your-app.com/oauth/callback" } }); ``` See the [SDK documentation](/sdk/overview) for more details. </Tab> </Tabs> ## Authentication and credential management superglue supports many different authentication methods. All credentials are encrypted both at rest and in transit. <AccordionGroup> <Accordion title="OAuth" icon="user-lock"> superglue supports both the client credentials flow and authorization code flow with **automatic token refresh**. **superglue handles:** - Scope validation - Token exchange and storage - Error handling for token issues - Automatic token refresh during tool execution #### Authorization code flow Used when end users grant access to their account data. 1. User clicks the "connect to provider" button 2. Redirected to the provider’s login page 3. User grants permissions for requested scopes 4. superglue exchanges the authorization code for access tokens 5. Tokens are automatically refreshed on expiration **Examples:** Slack, Salesforce, Google Services ### Client credentials flow Used for server-to-server communication with no user interaction. 1. Application requests an access token using client ID and secret 2. Token is automatically refreshed before expiration 3. No user consent required **Examples:** Twilio, Auth0 Management API, Microsoft Graph ### Configuration example ```typescript await superglue.upsertIntegration({ id: "custom-oauth", urlHost: "https://api.example.com", documentationUrl: "https://docs.example.com/quickstart", credentials: { clientId: "your_client_id", clientSecret: "your_client_secret", authorizationUrl: "https://auth.example.com/oauth/authorize", tokenUrl: "https://auth.example.com/oauth/token", scopes: "read:users write:data", } }); ``` **Required fields:** - `clientId`, `clientSecret`, `authorizationUrl`, `tokenUrl` **Optional fields:** - `scopes`: space-separated OAuth scopes - `redirectUri`: redirect URL after authorization <Info> Prebuilt OAuth templates are available for 100+ APIs including HubSpot, Google Ads, and Salesforce. Check the templates dropdown in the creation form. </Info> </Accordion> <Accordion title="API keys" icon="key"> The simplest authentication method. Provide an API key and superglue automatically determines where to include it based on the API’s documentation. Possible placements: - Authorization header: `Authorization: Bearer {key}` - Custom header: `X-API-Key: {key}` - Query parameter: `?api_key={key}` ### Examples <Tabs> <Tab title="SendGrid"> ```typescript await superglue.upsertIntegration({ id: "sendgrid", urlHost: "https://api.sendgrid.com", documentationUrl: "https://docs.sendgrid.com/api-reference", credentials: { apiKey: "SG.xxx..." } }); ``` SendGrid requires the API key in a custom Authorization header with Bearer prefix. </Tab> <Tab title="Airtable"> ```typescript await superglue.upsertIntegration({ id: "airtable", urlHost: "https://api.airtable.com", documentationUrl: "https://airtable.com/developers/web/api/introduction", credentials: { apiKey: "pat..." // Personal access token } }); ``` Airtable uses a personal access token passed as a Bearer token in the Authorization header. </Tab> <Tab title="Zendesk"> ```typescript await superglue.upsertIntegration({ id: "zendesk", urlHost: "https://yourcompany.zendesk.com", documentationUrl: "https://developer.zendesk.com/api-reference", credentials: { email: "admin@yourcompany.com", apiKey: "your_api_token" } }); ``` Zendesk requires both email and API token, combined as basic auth: `{email}/token:{apiKey}`. </Tab> <Tab title="Shopify"> ```typescript await superglue.upsertIntegration({ id: "shopify", urlHost: "https://yourstore.myshopify.com", documentationUrl: "https://shopify.dev/docs/api", credentials: { apiKey: "shpat_..." // Admin API access token } }); ``` Shopify uses a custom header `X-Shopify-Access-Token` for API authentication. </Tab> <Tab title="Mailchimp"> ```typescript await superglue.upsertIntegration({ id: "mailchimp", urlHost: "https://us1.api.mailchimp.com", // datacenter varies documentationUrl: "https://mailchimp.com/developer/marketing/api", credentials: { apiKey: "xxxxxxxxxxxxxx-us1" // includes datacenter suffix } }); ``` Mailchimp uses basic auth with `anystring` as username and API key as password. </Tab> </Tabs> </Accordion> <Accordion title="Data storage connections" icon="database"> Connect to databases by providing connection details. Supported types include PostgreSQL and FTP/SFTP servers. ### Configuration <Tabs> <Tab title="PostgreSQL"> ```typescript await superglue.upsertIntegration({ id: "main-db", urlHost: "postgresql://<<user>>:<<password>>@<<host>>:<<port>>", urlPath: "/<<database>>", credentials: { user: "db_user", password: "db_password", host: "db.example.com", port: 5432, database: "production_db" } }); ``` </Tab> <Tab title="FTP/SFTP"> ```typescript await superglue.upsertIntegration({ id: "my-sftp-server", urlHost: "sftp://<<host>>:<<port>>", credentials: { username: "sftp_user", password: "sftp_password" } }); ``` </Tab> </Tabs> </Accordion> <Accordion title="Custom authentication" icon="code"> For systems with unique authentication requirements, superglue supports multiple custom patterns. <Tabs> <Tab title="Basic Auth"> ```typescript credentials: { username: "your_username", password: "your_password" } ``` Used by: Jenkins, Artifactory, legacy APIs </Tab> <Tab title="Custom Headers"> ```typescript credentials: { "X-Custom-Auth": "your_auth_token", "X-API-Version": "v2", "X-Tenant-ID": "tenant_123" } ``` Used by: Internal APIs, multi-tenant systems </Tab> <Tab title="JWT/Bearer Tokens"> ```typescript credentials: { bearerToken: "eyJhbGciOiJIUzI1NiIs..." } ``` Used by: GitHub (personal access tokens), GitLab, custom auth systems </Tab> <Tab title="Bot Token"> ```typescript credentials: { botToken: "xoxb-XXXXXX" } ``` Used by: Slack and Discord </Tab> </Tabs> </Accordion> </AccordionGroup> <Card title="Security first" icon="shield"> All secrets are encrypted at rest and in transit. The LLM never accesses real credentials - only placeholders such as `<<stripe_api_key>>` are exposed during workflow setup and execution. </Card> <Card title="Not ready to provide credentials?" icon="watch"> Integrations can be created without credentials and updated later. Credentials may also be supplied dynamically during tool execution. </Card> <Card title="Need help identifying credentials?" icon="user-message"> The agent can assist with figuring out which credentials are required and where to find them. e.g., _"I want to connect to my company’s internal API but I'm not sure what authentication it uses."_ </Card> ## Automatic documentation crawling superglue automatically crawls and processes documentation upon integration creation. This makes it possible for superglue to reason about endpoints, authentication, and data models without manual setup. When creating an integration, the **`documentationUrl`** or uploaded documentation files (like OpenAPI specs, PDFs, or HTML exports) are used as the primary source for this process. The more complete and accurate the provided material, the better superglue’s internal understanding of the system. ### Supported documentation formats superglue’s fetchers handle most modern and legacy documentation types: <CardGroup cols={2}> <Card title="OpenAPI/Swagger" icon="file-code"> Extracts endpoints, parameters, and schemas from `.json` or `.yaml` specifications. </Card> <Card title="Mintlify & modern docs" icon="book-open"> Fetches content from popular hosted sites like Mintlify, ReadMe, or Docusaurus. </Card> <Card title="Static HTML & PDFs" icon="file-lines"> Parses legacy or self-hosted documentation, including HTML exports and PDF manuals. </Card> <Card title="Database schemas" icon="database"> Automatically analyzes PostgreSQL and MySQL schemas to identify tables, columns, and relationships. </Card> </CardGroup> ### Documentation filtering with keywords Large APIs can have hundreds of endpoints. To improve accuracy and reduce processing time, you can provide specific keywords vai the agent or SDK that describe what parts of the documentation are most relevant. <Tabs> <Tab title="Via Chat/Agent"> The agent automatically adjusts documentation processing based on your instructions: ``` Connect to Stripe and focus on customer and subscription endpoints ``` This ensures that only relevant documentation is processed and saved to the integration. </Tab> <Tab title="Via SDK"> Provide keywords programmatically when creating or updating an integration: ```typescript const integration = await superglue.upsertIntegration({ id: "stripe", urlHost: "https://api.stripe.com", documentationUrl: "https://docs.stripe.com/api", keywords: ["customers", "subscriptions", "invoices"], credentials: { apiKey: "sk_test_..." } }); ``` Keywords are used to: - Guide crawling and processing to retain only the most relevant documentation sections - Improve ranking and retrieval relevance at runtime </Tab> </Tabs> ## Next steps <Card title="Ready to create your first integration?" icon="plug" href="https://app.superglue.cloud" > Go to superglue and start connecting your APIs, databases, and systems in minutes. </Card>

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/superglue-ai/superglue'

If you have feedback or need assistance with the MCP directory API, please join our Discord server