# EspoCRM

> Keep EspoCRM, the open-source CRM, up to date: add and update leads and contacts from forms and sign-ups, convert leads, move opportunities through the pipeline, log calls, add tasks and notes, and open cases. Start a workflow when a lead, contact, opportunity or case is added, or a deal changes stage.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/espocrm

## Actions

### Add note

Post a note to the stream of an account, contact, lead, opportunity or case, where everyone following it sees it.

**Inputs**

- Related to (`related_to_type`, text): What kind of record it's about. Not needed when Record is a link to it. One of: `account`, `contact`, `lead`, `opportunity`, `case`.
- Record (`related_to`, text, required): The ID of the account, contact, lead, opportunity or case it's about, or a link to it in EspoCRM.
- Text (`text`, text, required): What the note says. Markdown, such as **bold**, is kept.

**Outputs**

- `created_at` (text): When it was posted (ISO 8601, UTC)
- `id` (text): The note's ID
- `link` (text): A link to the record it's on, in EspoCRM
- `related_id` (text): The ID of the record it's about
- `related_name` (text): That record's name
- `related_type` (text): What it's about: account, contact, lead, opportunity or case; empty if none
- `text` (text): What it says

**Example output**

```json
{
  "created_at": "2026-11-05T09:40:00Z",
  "id": "6aeca609ce0728cd5",
  "link": "https://crm.example.com/#Opportunity/view/6aeca65cbcda4c086",
  "related_id": "6aeca65cbcda4c086",
  "related_name": "Analytical Engines renewal",
  "related_type": "opportunity",
  "text": "Wants a quote for 40 seats by Friday."
}
```

### Convert lead

Turn a qualified lead into a contact, an account (if the lead has an account name) and, if you name one, an opportunity, as EspoCRM's Convert button does.

**Inputs**

- Lead (`lead`, text, required): The lead's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Opportunity name (`opportunity_name`, text): Name an opportunity to add one too. Leave blank for none.
- Opportunity amount (`opportunity_amount`, number): What the opportunity is worth. Leave blank for the lead's Opportunity Amount. At least 0.
- Close date (`close_date`, date): When the opportunity is expected to close.

**Outputs**

- `account_id` (text): The account it became; empty if the lead had no account name
- `account_link` (text): A link to the account; empty if none
- `contact_id` (text): The contact it became
- `contact_link` (text): A link to the contact in EspoCRM
- `lead_id` (text): The lead's ID
- `opportunity_id` (text): The opportunity it became; empty if none was asked for
- `opportunity_link` (text): A link to the opportunity; empty if none
- `status` (text): The lead's status now: Converted

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_link": "https://crm.example.com/#Account/view/6aeca65caff8e7fcc",
  "contact_id": "6aeca65cb55c304f8",
  "contact_link": "https://crm.example.com/#Contact/view/6aeca65cb55c304f8",
  "lead_id": "6aeca603c5e5ee841",
  "opportunity_id": "6aeca65cbcda4c086",
  "opportunity_link": "https://crm.example.com/#Opportunity/view/6aeca65cbcda4c086",
  "status": "Converted"
}
```

### Create account

Add an account: a company or organisation you work with.

**Inputs**

- Name (`name`, text, required): What the account is called.
- Website (`website`, text): Its website, such as https://acme.com.
- Email (`email`, text): Its email address.
- Phone (`phone`, text): Its phone number with its country code.
- Type (`account_type`, text): What it is to you. One of: `Customer`, `Investor`, `Partner`, `Reseller`.
- Street (`street`, text): Its billing street address.
- City (`city`, text): Its billing city.
- State (`state`, text): Its billing state or region.
- Postal code (`postal_code`, text): Its billing postal code or ZIP code.
- Country (`country`, text): Its billing country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the account is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The account's description
- `email` (text): Its primary email
- `id` (text): The account's ID
- `industry` (text): Its industry
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Its name
- `phone` (text): Its primary phone number
- `postal_code` (text): Postal code or ZIP code
- `state` (text): State or region
- `street` (text): Street
- `type` (text): What it is to you, such as Customer or Partner
- `website` (text): Its website

**Example output**

```json
{
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "",
  "email": "hello@analytical.example.com",
  "id": "6aeca65caff8e7fcc",
  "industry": "Software",
  "link": "https://crm.example.com/#Account/view/6aeca65caff8e7fcc",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Analytical Engines",
  "phone": "+442079460000",
  "postal_code": "NW1 5LR",
  "state": "",
  "street": "12 Marylebone Road",
  "type": "Customer",
  "website": "https://analytical.example.com"
}
```

### Create case

Open a support case for an account or contact, such as from a form or an email.

**Inputs**

- Name (`name`, text, required): What the case is about.
- Description (`description`, text): The details, such as the customer's message.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Contact (`contact`, text): The contact's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Status (`status`, text): Where it stands. Leave blank for New. One of: `New`, `Assigned`, `Pending`, `Closed`, `Rejected`, `Duplicate`.
- Priority (`priority`, text): How urgent it is. Leave blank for Normal. One of: `Low`, `Normal`, `High`, `Urgent`.
- Type (`case_type`, text): What kind of case it is. One of: `Question`, `Incident`, `Problem`.
- Assigned user (`assigned_user`, text): The user the case is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_id` (text): The account's ID; empty if none
- `account_name` (text): The account's name
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `contact_id` (text): The contact's ID; empty if none
- `contact_name` (text): The contact's name
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The case's description
- `id` (text): The case's ID
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): What it's about
- `number` (number): The case's number, as EspoCRM shows it
- `priority` (text): Low, Normal, High or Urgent
- `status` (text): Where it stands, such as New or Pending
- `type` (text): Question, Incident or Problem; empty if not set

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "contact_id": "6aeca65cb55c304f8",
  "contact_name": "Ada Lovelace",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "The sign-in page says the password is wrong.",
  "id": "6aeca7a1d2c9e1f0b",
  "link": "https://crm.example.com/#Case/view/6aeca7a1d2c9e1f0b",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Can't sign in",
  "number": 42,
  "priority": "High",
  "status": "New",
  "type": "Incident"
}
```

### Create contact

Add a contact to EspoCRM, even if one with the same name or email exists; use 'Create or update contact' to avoid that.

**Inputs**

- First name (`first_name`, text): Their first name.
- Last name (`last_name`, text, required): Their last name. EspoCRM needs one for a new contact.
- Email (`email`, text): Their email address.
- Phone (`phone`, text): Their phone number with its country code, such as +1 415 555 0134.
- Title (`title`, text): Their job title, such as Head of Sales.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Street (`street`, text): Their street address.
- City (`city`, text): Their city.
- State (`state`, text): Their state or region.
- Postal code (`postal_code`, text): Their postal code or ZIP code.
- Country (`country`, text): Their country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the contact is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_id` (text): Their account's ID; empty if none
- `account_name` (text): Their account's name
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The contact's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The contact's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `state` (text): State or region
- `street` (text): Street
- `title` (text): Their job title

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca65cb55c304f8",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Contact/view/6aeca65cb55c304f8",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "state": "",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering"
}
```

### Create lead

Add a lead to EspoCRM, even if one with the same name or email exists; use 'Create or update lead' for forms and sign-ups.

**Inputs**

- First name (`first_name`, text): Their first name.
- Last name (`last_name`, text): Their last name.
- Email (`email`, text): Their email address.
- Phone (`phone`, text): Their phone number with its country code, such as +1 415 555 0134.
- Title (`title`, text): Their job title, such as Head of Sales.
- Account name (`account_name`, text): The company or organisation they're with.
- Status (`status`, text): Where the lead stands, such as New or In Process.
- Source (`source`, text): Where the lead came from, such as Web Site.
- Website (`website`, text): Their website.
- Street (`street`, text): Their street address.
- City (`city`, text): Their city.
- State (`state`, text): Their state or region.
- Postal code (`postal_code`, text): Their postal code or ZIP code.
- Country (`country`, text): Their country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the lead is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_name` (text): The company they work for, as typed on the lead
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `converted_account_id` (text): The account it became; empty if none
- `converted_contact_id` (text): The contact it became; empty until converted
- `converted_opportunity_id` (text): The opportunity it became; empty if none
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The lead's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The lead's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `source` (text): Where the lead came from, such as Web Site
- `state` (text): State or region
- `status` (text): Where the lead stands, such as New or In Process
- `street` (text): Street
- `title` (text): Their job title
- `website` (text): Their website

**Example output**

```json
{
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "converted_account_id": "",
  "converted_contact_id": "",
  "converted_opportunity_id": "",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "Asked for a demo on the website.",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca603c5e5ee841",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Lead/view/6aeca603c5e5ee841",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "source": "Web Site",
  "state": "",
  "status": "New",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering",
  "website": "https://analytical.example.com"
}
```

### Create opportunity

Add an opportunity (a deal) to the pipeline, with its amount, close date, stage, account and contact.

**Inputs**

- Name (`name`, text, required): What the opportunity is called.
- Amount (`amount`, number, required): How much it's worth, such as 12000. At least 0.
- Close date (`close_date`, date, required): When it's expected to close.
- Currency (`currency`, text): The amount's three-letter currency code, such as EUR. Defaults to EspoCRM's default currency.
- Stage (`stage`, text): The stage it starts in. Leave blank for the first stage.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Contact (`contact`, text): The primary contact's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the opportunity is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_id` (text): The account's ID; empty if none
- `account_name` (text): The account's name
- `amount` (number): How much it's worth
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `close_date` (text): When it's expected to close (YYYY-MM-DD)
- `contact_id` (text): The primary contact's ID; empty if none
- `contact_name` (text): The primary contact's name
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `currency` (text): The amount's currency, such as USD
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The opportunity's description
- `id` (text): The opportunity's ID
- `lead_source` (text): Where it came from, such as Web Site
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Its name
- `probability` (number): How likely it is to close, in percent
- `stage` (text): Its stage, such as Proposal

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "amount": 12000,
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "close_date": "2026-12-15",
  "contact_id": "6aeca65cb55c304f8",
  "contact_name": "Ada Lovelace",
  "created_at": "2026-11-05T09:00:00Z",
  "currency": "USD",
  "custom_fields": {},
  "description": "",
  "id": "6aeca65cbcda4c086",
  "lead_source": "Web Site",
  "link": "https://crm.example.com/#Opportunity/view/6aeca65cbcda4c086",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Analytical Engines renewal",
  "probability": 50,
  "stage": "Proposal"
}
```

### Create or update contact

Update the contact with this email, or add one if none has it. Fields left blank keep what they have.

**Inputs**

- Email (`email`, text, required): The email to match the contact on; one is added if none has it.
- First name (`first_name`, text): Their first name.
- Last name (`last_name`, text): Their last name. EspoCRM needs one for a new contact.
- Phone (`phone`, text): Their phone number with its country code, such as +1 415 555 0134.
- Title (`title`, text): Their job title, such as Head of Sales.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Street (`street`, text): Their street address.
- City (`city`, text): Their city.
- State (`state`, text): Their state or region.
- Postal code (`postal_code`, text): Their postal code or ZIP code.
- Country (`country`, text): Their country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the contact is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_id` (text): Their account's ID; empty if none
- `account_name` (text): Their account's name
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `country` (text): Country
- `created` (true/false): True if it was added, false if it was updated
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The contact's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The contact's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `state` (text): State or region
- `street` (text): Street
- `title` (text): Their job title

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "country": "United Kingdom",
  "created": true,
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca65cb55c304f8",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Contact/view/6aeca65cb55c304f8",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "state": "",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering"
}
```

### Create or update lead

Update the lead with this email, or add one if none has it, such as for a form or sign-up. Fields left blank keep what they have.

**Inputs**

- Email (`email`, text, required): The email to match the lead on; one is added if none has it.
- First name (`first_name`, text): Their first name.
- Last name (`last_name`, text): Their last name.
- Phone (`phone`, text): Their phone number with its country code, such as +1 415 555 0134.
- Title (`title`, text): Their job title, such as Head of Sales.
- Account name (`account_name`, text): The company or organisation they're with.
- Status (`status`, text): Where the lead stands, such as New or In Process.
- Source (`source`, text): Where the lead came from, such as Web Site.
- Website (`website`, text): Their website.
- Street (`street`, text): Their street address.
- City (`city`, text): Their city.
- State (`state`, text): Their state or region.
- Postal code (`postal_code`, text): Their postal code or ZIP code.
- Country (`country`, text): Their country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the lead is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_name` (text): The company they work for, as typed on the lead
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `converted_account_id` (text): The account it became; empty if none
- `converted_contact_id` (text): The contact it became; empty until converted
- `converted_opportunity_id` (text): The opportunity it became; empty if none
- `country` (text): Country
- `created` (true/false): True if it was added, false if it was updated
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The lead's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The lead's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `source` (text): Where the lead came from, such as Web Site
- `state` (text): State or region
- `status` (text): Where the lead stands, such as New or In Process
- `street` (text): Street
- `title` (text): Their job title
- `website` (text): Their website

**Example output**

```json
{
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "converted_account_id": "",
  "converted_contact_id": "",
  "converted_opportunity_id": "",
  "country": "United Kingdom",
  "created": true,
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "Asked for a demo on the website.",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca603c5e5ee841",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Lead/view/6aeca603c5e5ee841",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "source": "Web Site",
  "state": "",
  "status": "New",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering",
  "website": "https://analytical.example.com"
}
```

### Create task

Add a task for someone, with a due date, about an account, contact, lead, opportunity or case.

**Inputs**

- Name (`name`, text, required): What needs doing.
- Assigned user (`assigned_user`, text, required): The user the task is for, or their user name or email.
- Due (`due_at`, date and time): When it's due.
- Description (`description`, text): More about it.
- Status (`status`, text): Where it stands. Leave blank for Not Started. One of: `Not Started`, `Started`, `Completed`, `Canceled`, `Deferred`.
- Priority (`priority`, text): How urgent it is. Leave blank for Normal. One of: `Low`, `Normal`, `High`, `Urgent`.
- Related to (`related_to_type`, text): What kind of record it's about. Not needed when Record is a link to it. One of: `account`, `contact`, `lead`, `opportunity`, `case`.
- Record (`related_to`, text): The ID of the account, contact, lead, opportunity or case it's about, or a link to it in EspoCRM.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.

**Outputs**

- `assigned_user_id` (text): The ID of the user it's for
- `assigned_user_name` (text): Their name
- `created_at` (text): When it was added (ISO 8601, UTC)
- `description` (text): More about it
- `due_at` (text): When it's due (ISO 8601, UTC); empty if not set
- `id` (text): The task's ID
- `link` (text): A link to it in EspoCRM
- `name` (text): What needs doing
- `priority` (text): Low, Normal, High or Urgent
- `related_id` (text): The ID of the record it's about
- `related_name` (text): That record's name
- `related_type` (text): What it's about: account, contact, lead, opportunity or case; empty if none
- `status` (text): Where it stands, such as Not Started

**Example output**

```json
{
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "created_at": "2026-11-05T09:41:00Z",
  "description": "40 seats, annual.",
  "due_at": "2026-11-07T17:00:00Z",
  "id": "6aeca64c56ad927a8",
  "link": "https://crm.example.com/#Task/view/6aeca64c56ad927a8",
  "name": "Send Ada the quote",
  "priority": "Normal",
  "related_id": "6aeca65cbcda4c086",
  "related_name": "Analytical Engines renewal",
  "related_type": "opportunity",
  "status": "Not Started"
}
```

### Delete record

Delete a lead, contact, account, opportunity, case, task or call.

**Inputs**

- Type (`record_type`, text, required): What kind of record it is. One of: `lead`, `contact`, `account`, `opportunity`, `case`, `task`, `call`.
- Record (`record`, text, required): The record's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The record's ID
- `record_type` (text): lead, contact, account, opportunity, case, task or call

**Example output**

```json
{
  "deleted": true,
  "id": "6aeca603c5e5ee841",
  "record_type": "lead"
}
```

### Find accounts

Find accounts by name, website or email, newest first. Leave every field blank to list the newest.

**Inputs**

- Name (`name`, text): Words in the account's name.
- Website (`website`, text): Its website, such as acme.com.
- Email (`email`, text): Its email address.
- How many (`limit`, number): The most to list, newest first. Defaults to 25. From 1 to 200.

**Outputs**

- `accounts` (list): The accounts found
- `count` (number): How many are listed
- `total` (number): How many match in all

**Example output**

```json
{
  "accounts": [
    {
      "assigned_user_id": "6aeca42d024294e09",
      "assigned_user_name": "Grace Hopper",
      "city": "London",
      "country": "United Kingdom",
      "created_at": "2026-11-05T09:00:00Z",
      "custom_fields": {},
      "description": "",
      "email": "hello@analytical.example.com",
      "id": "6aeca65caff8e7fcc",
      "industry": "Software",
      "link": "https://crm.example.com/#Account/view/6aeca65caff8e7fcc",
      "modified_at": "2026-11-05T09:00:00Z",
      "name": "Analytical Engines",
      "phone": "+442079460000",
      "postal_code": "NW1 5LR",
      "state": "",
      "street": "12 Marylebone Road",
      "type": "Customer",
      "website": "https://analytical.example.com"
    }
  ],
  "count": 1,
  "total": 1
}
```

### Find contacts

Find contacts by email, name or account, newest first. Leave every field blank to list the newest.

**Inputs**

- Email (`email`, text): Their email address.
- Name (`name`, text): Words in their name, such as Ada or Ada Lovelace.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- How many (`limit`, number): The most to list, newest first. Defaults to 25. From 1 to 200.

**Outputs**

- `contacts` (list): The contacts found
- `count` (number): How many are listed
- `total` (number): How many match in all

**Example output**

```json
{
  "contacts": [
    {
      "account_id": "6aeca65caff8e7fcc",
      "account_name": "Analytical Engines",
      "assigned_user_id": "6aeca42d024294e09",
      "assigned_user_name": "Grace Hopper",
      "city": "London",
      "country": "United Kingdom",
      "created_at": "2026-11-05T09:00:00Z",
      "custom_fields": {},
      "description": "",
      "email": "ada@analytical.example.com",
      "first_name": "Ada",
      "id": "6aeca65cb55c304f8",
      "last_name": "Lovelace",
      "link": "https://crm.example.com/#Contact/view/6aeca65cb55c304f8",
      "modified_at": "2026-11-05T09:00:00Z",
      "name": "Ada Lovelace",
      "phone": "+14155550134",
      "postal_code": "NW1 5LR",
      "state": "",
      "street": "12 Marylebone Road",
      "title": "Head of Engineering"
    }
  ],
  "count": 1,
  "total": 1
}
```

### Find leads

Find leads by email, name, status or source, newest first. Leave every field blank to list the newest.

**Inputs**

- Email (`email`, text): Their email address.
- Name (`name`, text): Words in their name, such as Ada or Ada Lovelace.
- Status (`status`, text): Only leads with this status.
- Source (`source`, text): Only leads from this source.
- How many (`limit`, number): The most to list, newest first. Defaults to 25. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `leads` (list): The leads found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "leads": [
    {
      "account_name": "Analytical Engines",
      "assigned_user_id": "6aeca42d024294e09",
      "assigned_user_name": "Grace Hopper",
      "city": "London",
      "converted_account_id": "",
      "converted_contact_id": "",
      "converted_opportunity_id": "",
      "country": "United Kingdom",
      "created_at": "2026-11-05T09:00:00Z",
      "custom_fields": {},
      "description": "Asked for a demo on the website.",
      "email": "ada@analytical.example.com",
      "first_name": "Ada",
      "id": "6aeca603c5e5ee841",
      "last_name": "Lovelace",
      "link": "https://crm.example.com/#Lead/view/6aeca603c5e5ee841",
      "modified_at": "2026-11-05T09:00:00Z",
      "name": "Ada Lovelace",
      "phone": "+14155550134",
      "postal_code": "NW1 5LR",
      "source": "Web Site",
      "state": "",
      "status": "New",
      "street": "12 Marylebone Road",
      "title": "Head of Engineering",
      "website": "https://analytical.example.com"
    }
  ],
  "total": 1
}
```

### Find opportunities

Find opportunities by name, stage or account, newest first. Leave every field blank to list the newest.

**Inputs**

- Name (`name`, text): Words in the opportunity's name.
- Stage (`stage`, text): Only opportunities in this stage.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- How many (`limit`, number): The most to list, newest first. Defaults to 25. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `opportunities` (list): The opportunities found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "opportunities": [
    {
      "account_id": "6aeca65caff8e7fcc",
      "account_name": "Analytical Engines",
      "amount": 12000,
      "assigned_user_id": "6aeca42d024294e09",
      "assigned_user_name": "Grace Hopper",
      "close_date": "2026-12-15",
      "contact_id": "6aeca65cb55c304f8",
      "contact_name": "Ada Lovelace",
      "created_at": "2026-11-05T09:00:00Z",
      "currency": "USD",
      "custom_fields": {},
      "description": "",
      "id": "6aeca65cbcda4c086",
      "lead_source": "Web Site",
      "link": "https://crm.example.com/#Opportunity/view/6aeca65cbcda4c086",
      "modified_at": "2026-11-05T09:00:00Z",
      "name": "Analytical Engines renewal",
      "probability": 50,
      "stage": "Proposal"
    }
  ],
  "total": 1
}
```

### Get account

Get an account's details.

**Inputs**

- Account (`account`, text, required): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.

**Outputs**

- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The account's description
- `email` (text): Its primary email
- `id` (text): The account's ID
- `industry` (text): Its industry
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Its name
- `phone` (text): Its primary phone number
- `postal_code` (text): Postal code or ZIP code
- `state` (text): State or region
- `street` (text): Street
- `type` (text): What it is to you, such as Customer or Partner
- `website` (text): Its website

**Example output**

```json
{
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "",
  "email": "hello@analytical.example.com",
  "id": "6aeca65caff8e7fcc",
  "industry": "Software",
  "link": "https://crm.example.com/#Account/view/6aeca65caff8e7fcc",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Analytical Engines",
  "phone": "+442079460000",
  "postal_code": "NW1 5LR",
  "state": "",
  "street": "12 Marylebone Road",
  "type": "Customer",
  "website": "https://analytical.example.com"
}
```

### Get contact

Get a contact's details, with their account's name.

**Inputs**

- Contact (`contact`, text, required): The contact's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.

**Outputs**

- `account_id` (text): Their account's ID; empty if none
- `account_name` (text): Their account's name
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The contact's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The contact's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `state` (text): State or region
- `street` (text): Street
- `title` (text): Their job title

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca65cb55c304f8",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Contact/view/6aeca65cb55c304f8",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "state": "",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering"
}
```

### Get lead

Get a lead's details, and what it was converted into.

**Inputs**

- Lead (`lead`, text, required): The lead's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.

**Outputs**

- `account_name` (text): The company they work for, as typed on the lead
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `converted_account_id` (text): The account it became; empty if none
- `converted_contact_id` (text): The contact it became; empty until converted
- `converted_opportunity_id` (text): The opportunity it became; empty if none
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The lead's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The lead's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `source` (text): Where the lead came from, such as Web Site
- `state` (text): State or region
- `status` (text): Where the lead stands, such as New or In Process
- `street` (text): Street
- `title` (text): Their job title
- `website` (text): Their website

**Example output**

```json
{
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "converted_account_id": "",
  "converted_contact_id": "",
  "converted_opportunity_id": "",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "Asked for a demo on the website.",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca603c5e5ee841",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Lead/view/6aeca603c5e5ee841",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "source": "Web Site",
  "state": "",
  "status": "New",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering",
  "website": "https://analytical.example.com"
}
```

### Get opportunity

Get an opportunity's details, with its stage, account and contact.

**Inputs**

- Opportunity (`opportunity`, text, required): The opportunity's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.

**Outputs**

- `account_id` (text): The account's ID; empty if none
- `account_name` (text): The account's name
- `amount` (number): How much it's worth
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `close_date` (text): When it's expected to close (YYYY-MM-DD)
- `contact_id` (text): The primary contact's ID; empty if none
- `contact_name` (text): The primary contact's name
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `currency` (text): The amount's currency, such as USD
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The opportunity's description
- `id` (text): The opportunity's ID
- `lead_source` (text): Where it came from, such as Web Site
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Its name
- `probability` (number): How likely it is to close, in percent
- `stage` (text): Its stage, such as Proposal

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "amount": 12000,
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "close_date": "2026-12-15",
  "contact_id": "6aeca65cb55c304f8",
  "contact_name": "Ada Lovelace",
  "created_at": "2026-11-05T09:00:00Z",
  "currency": "USD",
  "custom_fields": {},
  "description": "",
  "id": "6aeca65cbcda4c086",
  "lead_source": "Web Site",
  "link": "https://crm.example.com/#Opportunity/view/6aeca65cbcda4c086",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Analytical Engines renewal",
  "probability": 50,
  "stage": "Proposal"
}
```

### List users

List the active users records can be assigned to, with their user names and emails.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `users` (list): The active users

**Example output**

```json
{
  "count": 1,
  "users": [
    {
      "email": "grace@example.com",
      "id": "6aeca42d024294e09",
      "name": "Grace Hopper",
      "user_name": "grace"
    }
  ]
}
```

### Log call

Record a call someone made or took, about an account, contact, lead, opportunity or case.

**Inputs**

- Name (`name`, text, required): What the call was about.
- Assigned user (`assigned_user`, text, required): The user who made or took the call, or their user name or email.
- Started (`start_at`, date and time): When the call started. Leave blank for now.
- Minutes (`duration_minutes`, number): How long it lasted, in minutes. Leave blank for 5. At least 0.
- Direction (`direction`, text): Whether you called them or they called you. Leave blank for Outbound. One of: `Outbound`, `Inbound`.
- Status (`status`, text): Whether it happened. Leave blank for Held. One of: `Held`, `Planned`, `Not Held`.
- Description (`description`, text): Notes from the call.
- Related to (`related_to_type`, text): What kind of record it's about. Not needed when Record is a link to it. One of: `account`, `contact`, `lead`, `opportunity`, `case`.
- Record (`related_to`, text): The ID of the account, contact, lead, opportunity or case it's about, or a link to it in EspoCRM.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.

**Outputs**

- `assigned_user_id` (text): The ID of the user who made or took it
- `assigned_user_name` (text): Their name
- `created_at` (text): When it was logged (ISO 8601, UTC)
- `description` (text): Notes from the call
- `direction` (text): Outbound or Inbound
- `duration_minutes` (number): How long it lasted, in minutes
- `end_at` (text): When it ended (ISO 8601, UTC)
- `id` (text): The call's ID
- `link` (text): A link to it in EspoCRM
- `name` (text): What it was about
- `related_id` (text): The ID of the record it's about
- `related_name` (text): That record's name
- `related_type` (text): What it's about: account, contact, lead, opportunity or case; empty if none
- `start_at` (text): When it started (ISO 8601, UTC)
- `status` (text): Held, Planned or Not Held

**Example output**

```json
{
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "created_at": "2026-11-05T10:16:00Z",
  "description": "Wants a quote for 40 seats.",
  "direction": "Outbound",
  "duration_minutes": 15,
  "end_at": "2026-11-05T10:15:00Z",
  "id": "6aeca64c637675f4c",
  "link": "https://crm.example.com/#Call/view/6aeca64c637675f4c",
  "name": "Discovery call with Ada",
  "related_id": "6aeca65cbcda4c086",
  "related_name": "Analytical Engines renewal",
  "related_type": "opportunity",
  "start_at": "2026-11-05T10:00:00Z",
  "status": "Held"
}
```

### Update account

Change an account's details. Fields left blank keep what it has.

**Inputs**

- Account (`account`, text, required): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Name (`name`, text): What the account is called. Leave blank to keep it.
- Website (`website`, text): Its website, such as https://acme.com.
- Email (`email`, text): Its email address.
- Phone (`phone`, text): Its phone number with its country code.
- Type (`account_type`, text): What it is to you. One of: `Customer`, `Investor`, `Partner`, `Reseller`.
- Street (`street`, text): Its billing street address.
- City (`city`, text): Its billing city.
- State (`state`, text): Its billing state or region.
- Postal code (`postal_code`, text): Its billing postal code or ZIP code.
- Country (`country`, text): Its billing country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the account is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The account's description
- `email` (text): Its primary email
- `id` (text): The account's ID
- `industry` (text): Its industry
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Its name
- `phone` (text): Its primary phone number
- `postal_code` (text): Postal code or ZIP code
- `state` (text): State or region
- `street` (text): Street
- `type` (text): What it is to you, such as Customer or Partner
- `website` (text): Its website

**Example output**

```json
{
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "",
  "email": "hello@analytical.example.com",
  "id": "6aeca65caff8e7fcc",
  "industry": "Software",
  "link": "https://crm.example.com/#Account/view/6aeca65caff8e7fcc",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Analytical Engines",
  "phone": "+442079460000",
  "postal_code": "NW1 5LR",
  "state": "",
  "street": "12 Marylebone Road",
  "type": "Customer",
  "website": "https://analytical.example.com"
}
```

### Update contact

Change a contact's details. Fields left blank keep what they have.

**Inputs**

- Contact (`contact`, text, required): The contact's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- First name (`first_name`, text): Their first name.
- Last name (`last_name`, text): Their last name. EspoCRM needs one for a new contact.
- Email (`email`, text): Their email address.
- Phone (`phone`, text): Their phone number with its country code, such as +1 415 555 0134.
- Title (`title`, text): Their job title, such as Head of Sales.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Street (`street`, text): Their street address.
- City (`city`, text): Their city.
- State (`state`, text): Their state or region.
- Postal code (`postal_code`, text): Their postal code or ZIP code.
- Country (`country`, text): Their country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the contact is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_id` (text): Their account's ID; empty if none
- `account_name` (text): Their account's name
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The contact's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The contact's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `state` (text): State or region
- `street` (text): Street
- `title` (text): Their job title

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca65cb55c304f8",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Contact/view/6aeca65cb55c304f8",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "state": "",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering"
}
```

### Update lead

Change a lead, such as its status. Fields left blank keep what they have.

**Inputs**

- Lead (`lead`, text, required): The lead's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- First name (`first_name`, text): Their first name.
- Last name (`last_name`, text): Their last name.
- Email (`email`, text): Their email address.
- Phone (`phone`, text): Their phone number with its country code, such as +1 415 555 0134.
- Title (`title`, text): Their job title, such as Head of Sales.
- Account name (`account_name`, text): The company or organisation they're with.
- Status (`status`, text): Where the lead stands, such as New or In Process.
- Source (`source`, text): Where the lead came from, such as Web Site.
- Website (`website`, text): Their website.
- Street (`street`, text): Their street address.
- City (`city`, text): Their city.
- State (`state`, text): Their state or region.
- Postal code (`postal_code`, text): Their postal code or ZIP code.
- Country (`country`, text): Their country.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the lead is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_name` (text): The company they work for, as typed on the lead
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `city` (text): City
- `converted_account_id` (text): The account it became; empty if none
- `converted_contact_id` (text): The contact it became; empty until converted
- `converted_opportunity_id` (text): The opportunity it became; empty if none
- `country` (text): Country
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The lead's description
- `email` (text): Their primary email
- `first_name` (text): Their first name
- `id` (text): The lead's ID
- `last_name` (text): Their last name
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Their full name
- `phone` (text): Their primary phone number
- `postal_code` (text): Postal code or ZIP code
- `source` (text): Where the lead came from, such as Web Site
- `state` (text): State or region
- `status` (text): Where the lead stands, such as New or In Process
- `street` (text): Street
- `title` (text): Their job title
- `website` (text): Their website

**Example output**

```json
{
  "account_name": "Analytical Engines",
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "city": "London",
  "converted_account_id": "",
  "converted_contact_id": "",
  "converted_opportunity_id": "",
  "country": "United Kingdom",
  "created_at": "2026-11-05T09:00:00Z",
  "custom_fields": {},
  "description": "Asked for a demo on the website.",
  "email": "ada@analytical.example.com",
  "first_name": "Ada",
  "id": "6aeca603c5e5ee841",
  "last_name": "Lovelace",
  "link": "https://crm.example.com/#Lead/view/6aeca603c5e5ee841",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Ada Lovelace",
  "phone": "+14155550134",
  "postal_code": "NW1 5LR",
  "source": "Web Site",
  "state": "",
  "status": "New",
  "street": "12 Marylebone Road",
  "title": "Head of Engineering",
  "website": "https://analytical.example.com"
}
```

### Update opportunity

Change an opportunity, such as moving it to another stage. Fields left blank keep what it has.

**Inputs**

- Opportunity (`opportunity`, text, required): The opportunity's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Name (`name`, text): What the opportunity is called. Leave blank to keep it.
- Amount (`amount`, number): How much it's worth, such as 12000. At least 0.
- Close date (`close_date`, date): When it's expected to close.
- Currency (`currency`, text): The amount's three-letter currency code, such as EUR. Defaults to EspoCRM's default currency.
- Stage (`stage`, text): The stage to move it to. Leave blank to keep it where it is.
- Account (`account`, text): The account's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Contact (`contact`, text): The primary contact's ID, from another EspoCRM step or the trigger, or a link to it in EspoCRM.
- Description (`description`, text): More about it, shown in EspoCRM.
- Assigned user (`assigned_user`, text): The user the opportunity is assigned to, or their user name or email.
- Team (`team`, text): A team to add it to, which decides who else can see it in EspoCRM.
- Other fields (`custom_fields`, object): Any other fields by their name in EspoCRM, such as {"industry": "Software"}. Fields an administrator added start with c, such as {"cLeadScore": 80}; their names are under Administration > Entity Manager > Fields.

**Outputs**

- `account_id` (text): The account's ID; empty if none
- `account_name` (text): The account's name
- `amount` (number): How much it's worth
- `assigned_user_id` (text): The ID of the user it's assigned to; empty if none
- `assigned_user_name` (text): Their name
- `close_date` (text): When it's expected to close (YYYY-MM-DD)
- `contact_id` (text): The primary contact's ID; empty if none
- `contact_name` (text): The primary contact's name
- `created_at` (text): When it was added to EspoCRM (ISO 8601, UTC)
- `currency` (text): The amount's currency, such as USD
- `custom_fields` (object): Fields an administrator added, by their API name, as EspoCRM gives them
- `description` (text): The opportunity's description
- `id` (text): The opportunity's ID
- `lead_source` (text): Where it came from, such as Web Site
- `link` (text): A link to it in EspoCRM
- `modified_at` (text): When it last changed (ISO 8601, UTC)
- `name` (text): Its name
- `probability` (number): How likely it is to close, in percent
- `stage` (text): Its stage, such as Proposal

**Example output**

```json
{
  "account_id": "6aeca65caff8e7fcc",
  "account_name": "Analytical Engines",
  "amount": 12000,
  "assigned_user_id": "6aeca42d024294e09",
  "assigned_user_name": "Grace Hopper",
  "close_date": "2026-12-15",
  "contact_id": "6aeca65cb55c304f8",
  "contact_name": "Ada Lovelace",
  "created_at": "2026-11-05T09:00:00Z",
  "currency": "USD",
  "custom_fields": {},
  "description": "",
  "id": "6aeca65cbcda4c086",
  "lead_source": "Web Site",
  "link": "https://crm.example.com/#Opportunity/view/6aeca65cbcda4c086",
  "modified_at": "2026-11-05T09:00:00Z",
  "name": "Analytical Engines renewal",
  "probability": 50,
  "stage": "Proposal"
}
```
