Skip to main content

Integrations

Integrations connect apps such as Slack, Gmail, Salesforce and HubSpot as tools, so an agent can read from and act in them.

Asset paths: composio/<app>/composio, for example composio/slack/composio · Marketplace

You connect an app once, with your account or a credential. The result is a tool in your workspace that any of your agents can use.

Connect Slack​

Create the tool without credentials. save() returns a link where you sign in to Slack and approve the connection.

from aixplain import Aixplain

aix = Aixplain(api_key="YOUR_API_KEY")

slack = aix.Tool(
name="Slack",
description="Posts messages to Slack channels.",
integration="composio/slack/composio",
).save()
print("Open this link to connect Slack:", slack.redirect_url)
Show output

Open the link, sign in and approve. Then scope the tool to posting messages and give it to an agent:

slack.allowed_actions = ["SLACK_SEND_MESSAGE"]

agent = aix.Agent(
name="Slack notifier",
description="Posts team announcements to Slack.",
instructions="Post the requested announcement to the channel the user names. Confirm what you sent.",
tools=[slack],
).save()

result = agent.run("Tell #general that today's standup moves to 10:00.")
print(result.data.output)
note

This step posts to your Slack workspace, so it runs only after you approve the connection. No sample output is shown.

AppIntegration pathSign-inExample action
Slackcomposio/slack/composioOAuth or tokenSLACK_SEND_MESSAGE
Gmailcomposio/gmail/composioOAuth or tokenGMAIL_SEND_EMAIL
Google Drivecomposio/googledrive/composioOAuth or tokenGOOGLEDRIVE_FIND_FILE
Google Calendarcomposio/googlecalendar/composioOAuth or tokenGOOGLECALENDAR_CREATE_EVENT
Outlookcomposio/outlook/composioOAuthOUTLOOK_SEND_EMAIL
Salesforcecomposio/salesforce/composioOAuthSALESFORCE_CREATE_LEAD
HubSpotcomposio/hubspot/composioOAuth or tokenHUBSPOT_CREATE_CONTACT
Jiracomposio/jira/composioOAuth or API keyJIRA_CREATE_ISSUE
Notioncomposio/notion/composioOAuth or API keyNOTION_CREATE_NOTION_PAGE
GitHubcomposio/github/composioOAuthGITHUB_CREATE_AN_ISSUE
Airtablecomposio/airtable/composioOAuth, token or API keyAIRTABLE_CREATE_RECORD

Connect any of them the same way as Slack: OAuth needs no config; tokens and keys go in config (see below).

Find any other app​

Search by app name, then read how it connects and what it can do.

page = aix.Integration.search(query="zendesk", page_size=3)
print([integration.path for integration in page.results])

zendesk = aix.Integration.get(page.results[0].path)
print(zendesk.attributes["auth_schemes"])
print(len(zendesk.list_actions()), "actions")
Show output

Apps expose many actions (Slack has more than 150). List them, read the inputs of the one you need, and set allowed_actions to it:

print([action.name for action in slack.list_actions()][:3])
print(slack.actions["SLACK_SEND_MESSAGE"].inputs.keys())
Show output

Connect with a token or API key​

Each app lists its sign-in schemes in attributes["auth_schemes"]. The scheme decides what you pass in config.

SchemeWhat you pass in config
OAUTH2Nothing. Open redirect_url and approve.
BEARER_TOKEN{"token": "..."}
API_KEYThe field the app names, for example generic_api_key for Airtable
BASICThe fields the app names, for example subdomain, username and password for Freshservice

Connect Slack with a token​

slack_bot = aix.Tool(
name="Slack bot",
description="Posts messages to Slack channels.",
integration="composio/slack/composio",
config={"token": "YOUR_SLACK_TOKEN"},
).save()
print(slack_bot.status)
Show output

save() does not check the credential. A wrong token fails on the first run, with Slack API error: invalid_auth.

Connect with an API key (Airtable)​

Read the exact field names for a scheme from attributes["<SCHEME>-inputs"], then pass them in config:

airtable_integration = aix.Integration.get("composio/airtable/composio")
print(airtable_integration.attributes["API_KEY-inputs"])

airtable = aix.Tool(
name="Airtable",
description="Reads and writes Airtable bases.",
integration="composio/airtable/composio",
config={"generic_api_key": "YOUR_AIRTABLE_TOKEN"},
).save()
Show output

Run an action directly​

result = slack_bot.run(
action="SLACK_SEND_MESSAGE",
data={"channel": "#general", "markdown_text": "Standup moves to 10:00 today."},
)

result.data holds the app's response. With exactly one allowed action you can omit action=; with several, run() raises ValueError: No action provided.

Credentials for integrations are stored by the integration provider, not by aixplain.

Troubleshooting​

SymptomCauseFix
save() fails with err.supplier_errorA config field name does not match the scheme.Read the names from attributes["<SCHEME>-inputs"].
Action '...' not foundThe action name does not match the app's.Copy the name from list_actions().
ValueError: No action providedSeveral actions are allowed and run() has no action=.Pass action=, or allow one action.
The first run fails with an authentication errorThe credential is wrong or expired, or the OAuth link was not approved.Approve the link, or connect a new tool with a valid credential.

Clean up​

agent.delete()
slack.delete()
slack_bot.delete()
airtable.delete()

Next steps​