Composio Integration Guide

Step-by-step guide to integrate Composio as an authentication provider for Airweave

Composio Integration

Overview

Composio enables Airweave to access credentials from from integrated applications. When your users connect their accounts through Composio, Airweave can automatically retrieve those credentials for data synchronization.

Prerequisites

  • A Composio account with API access
  • Connected user accounts in Composio for the sources you want to sync
  • Your Composio API key

Setup Guide

Step 1: Get Your Composio API Key

  1. Log in to your Composio dashboard
  2. Navigate to the API Keys page
  3. Copy your API key

Step 2: Connect Composio to Airweave

  1. Go to Airweave Auth Providers
  2. Click “Connect” next to Composio
  3. Enter your API key
  4. Provide a readable name for this connection
  5. Click “Save”

Step 3: Find Your Connection Details

To create source connections, you’ll need two identifiers from Composio:

  1. auth_config_id: Navigate to your Auth Configs page
  2. account_id: Click on an auth config to see its connected accounts

Tip: In Composio, one auth config can have multiple connected accounts, allowing you to manage different user connections under the same integration.

Step 4: Create Source Connections

Now you can create source connections that automatically retrieve credentials from Composio:

1from airweave import AirweaveSDK
2
3client = AirweaveSDK(api_key="YOUR_API_KEY")
4
5# Create a Google Drive connection using Composio credentials
6source_connection = client.source_connections.create_source_connection(
7 name="Sales Team Google Drive",
8 short_name="google_drive",
9 auth_provider="my-composio-connection-abc123", # Your Composio auth provider id
10 auth_provider_config={
11 "auth_config_id": "config_xyz789", # From Composio dashboard
12 "account_id": "account_abc123" # From Composio dashboard
13 }
14)
15
16print(f"Created: {source_connection.name}")

How It Works

Field Mappings

Some sources use different field names between Airweave and Composio:

Airweave FieldComposio Field
api_keygeneric_api_key
google_drivegoogledrive
google_calendargooglecalendar
outlook_mailoutlook
onedriveone_drive

These mappings are handled automatically by Airweave.

Troubleshooting

”No matching connection found”

  • Verify the auth_config_id and account_id are correct
  • Ensure the account is connected in Composio
  • Check that the integration type matches (e.g., google_drive vs googledrive)

“Missing required auth fields”

  • The source may require additional fields not available in Composio
  • Check the field mappings section above
  • Contact support if a mapping is missing

”Authentication failed”

  • Verify your Composio API key is valid
  • Check if the user’s connection in Composio is still active
  • Ensure the connected account has the necessary permissions

API Reference

Create Source Connection

1from airweave import AirweaveSDK
2
3client = AirweaveSDK(api_key="YOUR_API_KEY")
4
5source_connection = client.source_connections.create_source_connection(
6 name="Team Google Drive",
7 short_name="google_drive",
8 auth_provider="composio-connection-id",
9 auth_provider_config={
10 "auth_config_id": "config_id",
11 "account_id": "account_id"
12 }
13)

Next Steps