Capsule CRM
Create parties, track opportunities, and manage contacts in Capsule CRM.
On this page
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.
// 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);
});{
"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"
}
}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.
| Input | Type | Description |
|---|---|---|
partyIdrequired | id (picked from your account) | Party |
namerequired | text | A short description of the opportunity. |
descriptionoptional | long text | More details about the opportunity. |
milestoneIdrequired | id (picked from your account) | Milestone |
currencyoptional | text | The currency for the opportunity value (e.g., USD, GBP). |
amountoptional | number | The numerical value of the opportunity. |
expectedCloseOnoptional | date-time (ISO) | The expected closing date for the opportunity. |
probabilityoptional | number | The probability of winning the opportunity. |
durationBasisoptional | one of "FIXED" | "HOUR" | "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR" | The basis of the duration of the opportunity. |
durationoptional | number | The duration of the opportunity. |
ownerIdoptional | id (picked from your account) | The user the opportunity is assigned to. |
teamIdoptional | id (picked from your account) | The team the opportunity is assigned to. |
tagsoptional | ids (picked from your account) | Tags |
customFieldsrequired | object (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).
| Input | Type | Description |
|---|---|---|
contentrequired | long text | The body of the note. |
entityTyperequired | one of "party" | "opportunity" | "project" | The type of entity to add the note to. |
entityIdrequired | object (depends on other props) | Entity |
activityTypeIdoptional | id (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.
| Input | Type | Description |
|---|---|---|
typerequired | one of "person" | "organisation" | The type of contact to create. |
contactFieldsrequired | object (depends on other props) | Details |
aboutoptional | long text | About |
ownerIdoptional | id (picked from your account) | Owner |
teamIdoptional | id (picked from your account) | Team |
tagsoptional | ids (picked from your account) | Tags |
customFieldsrequired | object (depends on other props) | Custom Fields |
emailAddressesoptional | array | Email Addresses |
phoneNumbersoptional | array | Phone Numbers |
addressesoptional | array | Addresses |
websitesoptional | array | Websites |
create_project
Create Project. Create a new Project in Capsule CRM.
| Input | Type | Description |
|---|---|---|
partyIdrequired | id (picked from your account) | The main contact for this project. |
namerequired | text | The name of this project. |
descriptionoptional | long text | The description of this project. |
opportunityIdoptional | id (picked from your account) | An optional link to the opportunity that this project was created to support. |
stageIdoptional | id (picked from your account) | The stage that this project is on. |
statusoptional | one of "OPEN" | "CLOSED" | The status of the project. |
expectedCloseOnoptional | date-time (ISO) | The expected close date of this project. |
ownerIdoptional | id (picked from your account) | The user this project is assigned to. |
teamIdoptional | id (picked from your account) | The team this project is assigned to. |
tagsoptional | ids (picked from your account) | An array of tags that are added to this project. |
customFieldsoptional | object (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.
| Input | Type | Description |
|---|---|---|
descriptionrequired | text | A short description of the task. |
dueOnrequired | date-time (ISO) | The date when this task is due. |
detailoptional | long text | More details about the task. |
dueTimeoptional | text | The time when this task is due (e.g., 18:00:00). Note: The time is in the user's timezone. |
linkTooptional | one of "party" | "opportunity" | "project" | The entity this task is linked to. Only one can be selected. |
linkedEntityIdoptional | object (depends on other props) | Linked Entity |
categoryIdoptional | id (picked from your account) | The category of this task. |
ownerIdoptional | id (picked from your account) | The user this task is assigned to. |
find_contact
Find Contact. Find a Person by search criteria.
| Input | Type | Description |
|---|---|---|
termrequired | text | The value to search for (e.g., a name or email). |
find_opportunity
Find Opportunity. Find an Opportunity by search criteria.
| Input | Type | Description |
|---|---|---|
filterrequired | JSON | The 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.
| Input | Type | Description |
|---|---|---|
filterrequired | JSON | The 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.
| Input | Type | Description |
|---|---|---|
contact_idrequired | id (picked from your account) | The contact (Person or Organisation) to select. |
contactFieldsrequired | object (depends on other props) | Details |
ownerIdoptional | id (picked from your account) | The user to assign the task to. |
teamIdoptional | id (picked from your account) | The team to assign the contact to. |
aboutoptional | long text | Update the biography or description for the contact. |
addressesoptional | object (depends on other props) | Addresses |
websitesoptional | object (depends on other props) | Websites |
emailAddressesoptional | object (depends on other props) | Email Addresses |
phoneNumbersoptional | object (depends on other props) | Phone Numbers |
update_opportunity
Update Opportunity. Update an existing Opportunity in Capsule CRM.
| Input | Type | Description |
|---|---|---|
opportunityIdrequired | id (picked from your account) | Opportunity |
nameoptional | text | Name |
descriptionoptional | long text | Description |
milestoneIdoptional | id (picked from your account) | Milestone |
currencyoptional | text | Currency |
amountoptional | number | Amount |
expectedCloseOnoptional | date-time (ISO) | Expected Close Date |
probabilityoptional | number | Probability |
durationBasisoptional | one of "FIXED" | "HOUR" | "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR" | Duration Basis |
durationoptional | number | Duration |
ownerIdoptional | id (picked from your account) | Owner |
teamIdoptional | id (picked from your account) | Team |
tagsoptional | object (depends on other props) | Tags |
customFieldsoptional | object (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