Capsule CRM

Create parties, track opportunities, and manage contacts in Capsule CRM.

CRM and salesAPI key10 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (10)
  4. create_opportunity
  5. add_note_to_entity
  6. create_contact
  7. create_project
  8. create_task
  9. find_contact
  10. find_opportunity
  11. find_project
  12. update_contact
  13. update_opportunity
  14. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("capsule_crm", action, input) resolves with the provider's answer and rejects when Capsule CRM isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "capsule_crm"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Capsule CRM when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellCapsuleCrm = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Capsule CRM isn't connected.
  const output = await step.run("Capsule CRM", () =>
    step.ctx.integrations.invoke("capsule_crm", "create_opportunity", {
      "partyId": "<partyId>",
      "name": "<name>",
      "milestoneId": "<milestoneId>",
      "customFields": {}
    }),
  );
  step.ctx.log("Capsule CRM answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "capsule_crm",
    "piece_action": "create_opportunity",
    "input": {
      "partyId": "<partyId>",
      "name": "<name>",
      "milestoneId": "<milestoneId>",
      "customFields": {}
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/capsule_crm/create_opportunity" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"partyId":"<partyId>","name":"<name>","milestoneId":"<milestoneId>","customFields":{}}}'

Actions

create_opportunity

Create Opportunity. Create a new Opportunity in Capsule CRM.

InputTypeDescription
partyIdrequiredid (picked from your account)Party
namerequiredtextA short description of the opportunity.
descriptionoptionallong textMore details about the opportunity.
milestoneIdrequiredid (picked from your account)Milestone
currencyoptionaltextThe currency for the opportunity value (e.g., USD, GBP).
amountoptionalnumberThe numerical value of the opportunity.
expectedCloseOnoptionaldate-time (ISO)The expected closing date for the opportunity.
probabilityoptionalnumberThe probability of winning the opportunity.
durationBasisoptionalone of "FIXED" | "HOUR" | "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR"The basis of the duration of the opportunity.
durationoptionalnumberThe duration of the opportunity.
ownerIdoptionalid (picked from your account)The user the opportunity is assigned to.
teamIdoptionalid (picked from your account)The team the opportunity is assigned to.
tagsoptionalids (picked from your account)Tags
customFieldsrequiredobject (depends on other props)Custom Fields

add_note_to_entity

Add Note to Entity. Add a comment/note to an entity (e.g., contact, opportunity, project).

InputTypeDescription
contentrequiredlong textThe body of the note.
entityTyperequiredone of "party" | "opportunity" | "project"The type of entity to add the note to.
entityIdrequiredobject (depends on other props)Entity
activityTypeIdoptionalid (picked from your account)The activity type for this entry. Defaults to "Note".

create_contact

Create Contact. Create a new Person or Organisation in Capsule CRM.

InputTypeDescription
typerequiredone of "person" | "organisation"The type of contact to create.
contactFieldsrequiredobject (depends on other props)Details
aboutoptionallong textAbout
ownerIdoptionalid (picked from your account)Owner
teamIdoptionalid (picked from your account)Team
tagsoptionalids (picked from your account)Tags
customFieldsrequiredobject (depends on other props)Custom Fields
emailAddressesoptionalarrayEmail Addresses
phoneNumbersoptionalarrayPhone Numbers
addressesoptionalarrayAddresses
websitesoptionalarrayWebsites

create_project

Create Project. Create a new Project in Capsule CRM.

InputTypeDescription
partyIdrequiredid (picked from your account)The main contact for this project.
namerequiredtextThe name of this project.
descriptionoptionallong textThe description of this project.
opportunityIdoptionalid (picked from your account)An optional link to the opportunity that this project was created to support.
stageIdoptionalid (picked from your account)The stage that this project is on.
statusoptionalone of "OPEN" | "CLOSED"The status of the project.
expectedCloseOnoptionaldate-time (ISO)The expected close date of this project.
ownerIdoptionalid (picked from your account)The user this project is assigned to.
teamIdoptionalid (picked from your account)The team this project is assigned to.
tagsoptionalids (picked from your account)An array of tags that are added to this project.
customFieldsoptionalobject (depends on other props)An array of custom fields that are defined for this project.

create_task

Create Task. Create a new Task in Capsule CRM.

InputTypeDescription
descriptionrequiredtextA short description of the task.
dueOnrequireddate-time (ISO)The date when this task is due.
detailoptionallong textMore details about the task.
dueTimeoptionaltextThe time when this task is due (e.g., 18:00:00). Note: The time is in the user's timezone.
linkTooptionalone of "party" | "opportunity" | "project"The entity this task is linked to. Only one can be selected.
linkedEntityIdoptionalobject (depends on other props)Linked Entity
categoryIdoptionalid (picked from your account)The category of this task.
ownerIdoptionalid (picked from your account)The user this task is assigned to.

find_contact

Find Contact. Find a Person by search criteria.

InputTypeDescription
termrequiredtextThe value to search for (e.g., a name or email).

find_opportunity

Find Opportunity. Find an Opportunity by search criteria.

InputTypeDescription
filterrequiredJSONThe structured filter query. See the [documentation](https://capsulecrm.com/developer/api-v2/filters/) for examples.

find_project

Find Project. Find a Project by search criteria.

InputTypeDescription
filterrequiredJSONThe structured filter query. See the [documentation](https://capsulecrm.com/developer/api-v2/filters/) for examples.

update_contact

Update Contact. Update fields on an existing Person or Organisation.

InputTypeDescription
contact_idrequiredid (picked from your account)The contact (Person or Organisation) to select.
contactFieldsrequiredobject (depends on other props)Details
ownerIdoptionalid (picked from your account)The user to assign the task to.
teamIdoptionalid (picked from your account)The team to assign the contact to.
aboutoptionallong textUpdate the biography or description for the contact.
addressesoptionalobject (depends on other props)Addresses
websitesoptionalobject (depends on other props)Websites
emailAddressesoptionalobject (depends on other props)Email Addresses
phoneNumbersoptionalobject (depends on other props)Phone Numbers

update_opportunity

Update Opportunity. Update an existing Opportunity in Capsule CRM.

InputTypeDescription
opportunityIdrequiredid (picked from your account)Opportunity
nameoptionaltextName
descriptionoptionallong textDescription
milestoneIdoptionalid (picked from your account)Milestone
currencyoptionaltextCurrency
amountoptionalnumberAmount
expectedCloseOnoptionaldate-time (ISO)Expected Close Date
probabilityoptionalnumberProbability
durationBasisoptionalone of "FIXED" | "HOUR" | "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR"Duration Basis
durationoptionalnumberDuration
ownerIdoptionalid (picked from your account)Owner
teamIdoptionalid (picked from your account)Team
tagsoptionalobject (depends on other props)Tags
customFieldsoptionalobject (depends on other props)Custom Fields

Details

Id
capsule_crm
Category
CRM and sales
Tags
crm, contacts, sales, small-business
Package
@activepieces/piece-capsule-crm@0.1.3
Runs
Through the integration runner