Attio

Learn how to use Attio with Composio

Overview

SLUG: ATTIO

Description

Attio is a fully customizable workspace for your team’s relationships and workflows.

Authentication Details

client_id
stringRequired
client_secret
stringRequired
full
stringDefaults to https://api.attio.com/v2Required
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to task:read-write,object_configuration:read,record_permission:read,user_management:read,list_configuration:read,list_entry:read,comment:read-write
bearer_token
string

Connecting to Attio

Create an auth config

Use the dashboard to create an auth config for the Attio toolkit. This allows you to connect multiple Attio accounts to Composio for agents to use.

1

Select App

Navigate to the Attio toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using OAuth2

1from composio import Composio
2from composio.types import auth_scheme
3
4# Replace these with your actual values
5attio_auth_config_id = "ac_YOUR_ATTIO_CONFIG_ID" # Auth config ID created above
6user_id = "0000-0000-0000" # UUID from database/application
7
8composio = Composio()
9
10
11def authenticate_toolkit(user_id: str, auth_config_id: str):
12 connection_request = composio.connected_accounts.initiate(
13 user_id=user_id,
14 auth_config_id=auth_config_id,
15 )
16
17 print(
18 f"Visit this URL to authenticate Attio: {connection_request.redirect_url}"
19 )
20
21 # This will wait for the auth flow to be completed
22 connection_request.wait_for_connection(timeout=15)
23 return connection_request.id
24
25
26connection_id = authenticate_toolkit(user_id, attio_auth_config_id)
27
28# You can also verify the connection status using:
29connected_account = composio.connected_accounts.get(connection_id)
30print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Attio toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["ATTIO"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Create Note

Description

This tool creates a new note on a given record in attio. the note can be attached to any record type (like person, company, or deal) and includes a title and content. it requires parameters such as parent object, parent record id, title, and content, with an optional created at timestamp.

Action Parameters

content
stringRequired
created_at
string
parent_object
stringRequired
parent_record_id
stringRequired
title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Record

Description

This tool creates a new record in attio for a specified object type (people, companies, deals, users, workspaces, etc.). it requires the object type and a values dictionary containing the attributes for the new record.

Action Parameters

object_type
stringRequired
values
objectRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Note

Description

This tool allows users to delete a specific note in attio by its id. it is implemented via delete https://api.attio.com/v2/notes/{note id} and handles note deletion by validating the provided note id. it complements attio create note functionality, providing complete note management capabilities within the attio platform.

Action Parameters

note_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Record

Description

This tool allows you to delete a record from attio permanently. the deletion is irreversible, and the data will eventually be removed from the system.

Action Parameters

object_type
stringRequired
record_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Find Record

Description

This tool allows users to find a record in attio by either its unique id or by searching using unique attributes. it provides two methods: one for directly retrieving a record by its id with the get /v2/objects/{object}/records/{record id} endpoint, and another for searching by attributes using the post /v2/objects/{object}/records/query endpoint.

Action Parameters

attributes
object
limit
integerDefaults to 500
object_id
stringRequired
offset
integer
record_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Object Details

Description

This tool retrieves detailed information about a specific object type in attio, including all its attributes and their properties. this is useful for understanding what fields are available when creating or updating records of this type.

Action Parameters

object_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Lists

Description

This tool retrieves all lists available in the attio workspace. the lists are returned sorted as they appear in the sidebar. this tool is essential for managing and navigating lists, and is a prerequisite for many list-related operations. it requires the list configuration:read permission scope.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Notes

Description

This tool lists all notes associated with a specific record in attio. notes are returned in reverse chronological order (newest first).

Action Parameters

limit
integerDefaults to 50
parent_object
stringRequired
parent_record_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Objects

Description

This tool retrieves a list of all available objects (both system-defined and user-defined) in the attio workspace. it makes a get request to the /v2/objects endpoint and returns a json response containing key metadata about each object, which is fundamental for understanding and accessing the workspace's structure.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Records

Description

This tool lists records from a specific object type in attio. it provides simple pagination support and returns records in the order they were created. for complex filtering, use the findrecord action instead. standard object types include: people, companies, deals, users, workspaces. if you get a 404 error, verify the object type exists using the list objects action first.

Action Parameters

limit
integerDefaults to 20
object_type
stringRequired
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Record

Description

This tool updates an existing record in attio for a specified object type (people, companies, deals, users, workspaces, etc.). it uses patch to partially update only the provided fields, leaving other fields unchanged.

Action Parameters

object_type
stringRequired
record_id
stringRequired
values
objectRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired