SugarCRM
Manage accounts, contacts, and opportunities in SugarCRM via its REST v11 API.
This tool lists, reads, and creates records in any SugarCRM module. It performs the OAuth2 password-grant token exchange itself, so you only supply the instance credentials once — no separate login step.
What it does
- list_records — list/filter records of a module (
GET /rest/v11/{module}) - get_record — fetch a single record by id (
GET /rest/v11/{module}/{id}) - create_record — create a new record (
POST /rest/v11/{module})
Every call is authenticated by an access token that the tool obtains via
POST /rest/v11/oauth2/token (grant_type=password) and then sends in the
OAuth-Token request header — exactly as the Sugar Developer Guide specifies.
apiKey setup
SugarCRM's REST login is a username/password OAuth2 exchange against your own
instance, so the apiKey input packs everything needed as a pipe-delimited
string:
siteUrl|username|password
Optionally append a custom OAuth client id and secret (defaults to the built-in
sugar platform client with an empty secret):
siteUrl|username|password|clientId|clientSecret
Examples:
https://acme.sugarcrm.com|admin|s3cret
https://acme.sugarcrm.com|integration_user|p4ss|my_client_id|my_client_secret
- siteUrl — your instance base URL (no trailing
/rest/...), e.g.https://acme.sugarcrm.com. - username / password — a SugarCRM user with API access. A dedicated integration user is recommended.
- clientId / clientSecret — only needed if you created a custom OAuth key under Admin → OAuth Keys; otherwise omit them.
Inputs
| Input | Required | Description |
|---|---|---|
apiKey |
yes | siteUrl|username|password (optionally |clientId|clientSecret) |
operation |
yes | One of: list_records, get_record, create_record |
module |
yes | Module name, e.g. Accounts, Contacts, Opportunities, Leads |
recordId |
for get_record | Record GUID |
filter |
optional | JSON filter array for list_records (Sugar filter param) |
fields |
optional | Comma-separated field list to return |
maxNum |
optional | Max records for list_records (default 20) |
data |
for create_record | JSON object of field names to values |
Outputs
result— the raw JSON response body from SugarCRM (as a string)status— the HTTP status code (e.g.200,201)
Examples
List the 10 most recent accounts whose name starts with "A":
operation: list_records
module: Accounts
filter: [{"name":{"$starts":"A"}}]
fields: id,name,website,phone_office
maxNum: 10
Read a single contact:
operation: get_record
module: Contacts
recordId: 9c8b7a6d-1234-5678-90ab-cdef01234567
fields: id,first_name,last_name,email1
Create an opportunity:
operation: create_record
module: Opportunities
data: {"name":"Acme Q3 Expansion","amount":"50000","sales_stage":"Prospecting"}
Notes
- Response bodies are capped at ~5 MB.
- A non-2xx HTTP status is still returned in
result/statusfor list/get/create so you can inspect Sugar's error payload; a network or token-exchange failure fails the step with anerrorenvelope.
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
errorresultstatus
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey |
string | yes | — | SugarCRM instance credentials packed as 'siteUrl|username|password', e.g. 'https://acme.sugarcrm.com|admin|s3cret'. Optionally append a fourth and fifth field 'siteUrl|username|password|clientId|clientSecret' (defaults to platform client 'sugar' with empty secret). The tool exchanges these via POST /rest/v11/oauth2/token (grant_type=password) and sends the returned access token in the OAuth-Token header. |
operation |
string | yes | — | One of: list_records, get_record, create_record |
module |
string | no | — | Module name for every operation, e.g. Accounts, Contacts, Opportunities, Leads. |
recordId |
string | no | — | Record id (GUID) for get_record. |
filter |
string | no | — | Optional JSON filter array for list_records, e.g. [{"name":{"$starts":"A"}}]. Passed as the SugarCRM 'filter' query parameter. |
fields |
string | no | — | Comma-separated field list to return for list_records/get_record, e.g. 'id,name,website'. |
maxNum |
string | no | 20 |
Max number of records to return for list_records (SugarCRM 'max_num' parameter). |
data |
string | no | — | JSON object of field names to values for create_record, e.g. {"name":"Acme Inc","website":"https://acme.com"}. |