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)
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)
This step posts to your Slack workspace, so it runs only after you approve the connection. No sample output is shown.
Popular apps
| App | Integration path | Sign-in | Example action |
|---|---|---|---|
| Slack | composio/slack/composio | OAuth or token | SLACK_SEND_MESSAGE |
| Gmail | composio/gmail/composio | OAuth or token | GMAIL_SEND_EMAIL |
| Google Drive | composio/googledrive/composio | OAuth or token | GOOGLEDRIVE_FIND_FILE |
| Google Calendar | composio/googlecalendar/composio | OAuth or token | GOOGLECALENDAR_CREATE_EVENT |
| Outlook | composio/outlook/composio | OAuth | OUTLOOK_SEND_EMAIL |
| Salesforce | composio/salesforce/composio | OAuth | SALESFORCE_CREATE_LEAD |
| HubSpot | composio/hubspot/composio | OAuth or token | HUBSPOT_CREATE_CONTACT |
| Jira | composio/jira/composio | OAuth or API key | JIRA_CREATE_ISSUE |
| Notion | composio/notion/composio | OAuth or API key | NOTION_CREATE_NOTION_PAGE |
| GitHub | composio/github/composio | OAuth | GITHUB_CREATE_AN_ISSUE |
| Airtable | composio/airtable/composio | OAuth, token or API key | AIRTABLE_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")
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())
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.
| Scheme | What you pass in config |
|---|---|
OAUTH2 | Nothing. Open redirect_url and approve. |
BEARER_TOKEN | {"token": "..."} |
API_KEY | The field the app names, for example generic_api_key for Airtable |
BASIC | The 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)
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()
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
| Symptom | Cause | Fix |
|---|---|---|
save() fails with err.supplier_error | A config field name does not match the scheme. | Read the names from attributes["<SCHEME>-inputs"]. |
Action '...' not found | The action name does not match the app's. | Copy the name from list_actions(). |
ValueError: No action provided | Several actions are allowed and run() has no action=. | Pass action=, or allow one action. |
| The first run fails with an authentication error | The 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
- Tools: see every kind of tool an agent can call.
- Remote MCP: connect an app through its MCP server instead.
- Agents: configure the agent that calls the tool.
- API reference: integration: every parameter and method.