diff --git a/lib/composio/connectors/getConnectors.ts b/lib/composio/connectors/getConnectors.ts index cf01fd996..be19f5c06 100644 --- a/lib/composio/connectors/getConnectors.ts +++ b/lib/composio/connectors/getConnectors.ts @@ -10,6 +10,18 @@ export interface ConnectorInfo { connectedAccountId?: string; } +/** + * All toolkit slugs the platform supports. + * Passed explicitly to composio.create() because session.toolkits() + * only returns the first 20 by default. + */ +const SUPPORTED_TOOLKITS = [ + "googlesheets", + "googledrive", + "googledocs", + "tiktok", +]; + /** * Options for getting connectors. */ @@ -37,13 +49,18 @@ export async function getConnectors( const { displayNames = {} } = options; const composio = await getComposioClient(); - const session = await composio.create(accountId); + const session = await composio.create(accountId, { + toolkits: SUPPORTED_TOOLKITS, + }); const toolkits = await session.toolkits(); - return toolkits.items.map(toolkit => ({ - slug: toolkit.slug, - name: displayNames[toolkit.slug] || toolkit.name, - isConnected: toolkit.connection?.isActive ?? false, - connectedAccountId: toolkit.connection?.connectedAccount?.id, - })); + return toolkits.items.map(toolkit => { + const slug = toolkit.slug.toLowerCase(); + return { + slug, + name: displayNames[slug] || toolkit.name, + isConnected: toolkit.connection?.isActive ?? false, + connectedAccountId: toolkit.connection?.connectedAccount?.id, + }; + }); }