Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Close

Close

Sales CRM: leads, contacts, opportunities and notes.

7 actions API key 5 read2 write Calls api.close.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "close" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

Create leadwriteclose.create_leadCreate a lead (company) in Close with a name, description, website and status. Contacts, opportunities and tasks are created separately.
InputTypeDescription
namestringRequiredLead (company) name
descriptionstringOptionalLead description
urlstringOptionalLead website
status_idstringOptionalLead status id; defaults to the first status
TypeScript
await setu.execute({
  userId: "user_1",
  action: "close.create_lead",
  input: {
    "name": "<name>"
  },
});
Create notewriteclose.create_noteAdd a note to a lead (plain text or HTML).
InputTypeDescription
lead_idstringRequiredLead id to attach the note to
notestringOptionalNote text
note_htmlstringOptionalNote as HTML (use instead of note)
pinnedbooleanOptionalPin the note
TypeScript
await setu.execute({
  userId: "user_1",
  action: "close.create_note",
  input: {
    "lead_id": "<lead_id>"
  },
});
Get leadreadclose.get_leadGet one lead by id with its contacts, opportunities and tasks.
InputTypeDescription
lead_idstringRequiredLead id, e.g. lead_...
TypeScript
await setu.execute({
  userId: "user_1",
  action: "close.get_lead",
  input: {
    "lead_id": "<lead_id>"
  },
});
List contactsreadclose.list_contactsList contacts, optionally for one lead.
InputTypeDescription
_limitintegerOptionalNumber of results (default 100)
_skipintegerOptionalNumber of results to skip, for paging
lead_idstringOptionalOnly contacts of this lead
TypeScript
await setu.execute({
  userId: "user_1",
  action: "close.list_contacts",
  input: {},
});
List leadsreadclose.list_leadsList leads (companies) in Close, newest first, with paging.
InputTypeDescription
_limitintegerOptionalNumber of results (default 100)
_skipintegerOptionalNumber of results to skip, for paging
_fieldsstringOptionalComma-separated fields to include
TypeScript
await setu.execute({
  userId: "user_1",
  action: "close.list_leads",
  input: {},
});
List notesreadclose.list_notesList note activities, optionally for one lead.
InputTypeDescription
_limitintegerOptionalNumber of results (default 100)
_skipintegerOptionalNumber of results to skip, for paging
lead_idstringOptionalOnly notes of this lead
TypeScript
await setu.execute({
  userId: "user_1",
  action: "close.list_notes",
  input: {},
});
List opportunitiesreadclose.list_opportunitiesList opportunities, optionally for one lead or status type, with value and confidence.
InputTypeDescription
_limitintegerOptionalNumber of results (default 100)
_skipintegerOptionalNumber of results to skip, for paging
lead_idstringOptionalOnly opportunities of this lead
status_typestringOptionalStatus type
TypeScript
await setu.execute({
  userId: "user_1",
  action: "close.list_opportunities",
  input: {},
});