Capsule CRM
Create parties, track opportunities, and manage contacts in Capsule CRM.
On this page
Connect
Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("capsule_crm", "create_opportunity", {
"partyId": "<partyId>",
"name": "<name>",
"milestoneId": "<milestoneId>",
"customFields": {}
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Capsule CRM answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "capsule-crm-create-opportunity",
name: "Capsule CRM: Create Opportunity",
description: "Calls Capsule CRM when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("capsule_crm", {
"action": "create_opportunity",
"partyId": "<partyId>",
"name": "<name>",
"milestoneId": "<milestoneId>",
"customFields": {}
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});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_opportunityin catalog
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- Tier
- Community