Close

Learn how to use Close with Composio

Overview

SLUG: CLOSE

Description

Close is a CRM platform designed to help businesses manage and streamline their sales processes, including calling, email automation, and predictive dialers.

Authentication Details

generic_api_key
stringRequired

Connecting to Close

Create an auth config

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

1

Select App

Navigate to the Close 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 API Key

1from composio import Composio
2from composio.types import auth_scheme
3
4# Replace these with your actual values
5close_auth_config_id = "ac_YOUR_CLOSE_CONFIG_ID" # Auth config ID created above
6user_id = "0000-0000-0000" # UUID from database/app
7
8composio = Composio()
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 # Replace this with a method to retrieve an API key from the user.
12 # Or supply your own.
13 user_api_key = input("[!] Enter API key")
14
15 connection_request = composio.connected_accounts.initiate(
16 user_id=user_id,
17 auth_config_id=auth_config_id,
18 config={"auth_scheme": "API_KEY", "val": user_api_key}
19 )
20
21 # API Key authentication is immediate - no redirect needed
22 print(f"Successfully connected Close for user {user_id}")
23 print(f"Connection status: {connection_request.status}")
24
25 return connection_request.id
26
27
28connection_id = authenticate_toolkit(user_id, close_auth_config_id)
29
30# You can verify the connection using:
31connected_account = composio.connected_accounts.get(connection_id)
32print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Close 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=["CLOSE"])
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 SMS Message

Description

This tool creates a new sms message in close. the tool allows sending immediate sms messages or logging received sms messages using the provided phone numbers and message content. it includes parameters such as local phone, remote phone, text, status, and source.

Action Parameters

contact_id
string
date_scheduled
string
direction
string
lead_id
stringRequired
local_phone
stringRequired
remote_phone
stringRequired
send_in
integer
status
stringRequired
template_id
string
text
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Call

Description

Creates a new call record in close.com. this tool allows you to log both inbound and outbound calls associated with a lead, supporting parameters such as lead id, direction, and optional support for contact id, phone, duration, note, recording url, and user id.

Action Parameters

contact_id
string
direction
stringRequired
disposition
string
duration
integer
lead_id
stringRequired
note
string
phone
string
recording_url
string
user_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Lead

Description

This tool creates a new lead in close crm. it allows users to create a lead with basic company information and optional contact details, including company name, description, website url, lead status, contacts, and addresses. it operates by sending a request to the api endpoint /lead/ on the close crm platform.

Action Parameters

addresses
array
contacts
array
description
string
name
stringRequired
status_id
string
url
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Task

Description

This tool creates a new task in close.com. tasks are used to track to-do items and can be associated with leads. the tool will create a task with the specified parameters using the provided text, due date, and is complete flags.

Action Parameters

assigned_to
string
date
stringRequired
is_complete
boolean
lead_id
stringRequired
text
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Call

Description

This tool allows you to delete a specific call activity in close.com. it is useful for removing incorrectly logged calls or cleaning up call records. the action deletes a call activity using its unique call id and cannot be undone.

Action Parameters

call_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Notes

Description

This tool retrieves a list of note activities from close. it allows users to fetch notes with optional filtering parameters, including filtering by lead id, user id, and date ranges. the tool returns details such as note content, creation and update dates, and any associated attachments.

Action Parameters

date_created__gt
string
date_created__lt
string
lead_id
string
user_id
string

Action Response

data
arrayRequired
error
string
has_more
booleanRequired
successful
booleanRequired