Overview
This node allows you to interact with the "Motivos de Perda" (Loss Reasons) resource in RD Station CRM. It is designed to either list all loss reasons or retrieve a specific loss reason by its ID. This functionality is useful for sales and CRM automation workflows where understanding why deals are lost can help improve sales strategies, reporting, or trigger follow-up actions.
Common scenarios:
- Automatically fetching all active loss reasons to populate dropdowns or reports.
- Retrieving detailed information about a specific loss reason to analyze why a particular deal was lost.
- Integrating loss reason data into other systems or dashboards for enhanced sales insights.
Properties
| Name | Meaning |
|---|---|
| Recurso (Resource) | The resource to operate on; here it is fixed as "Motivo de Perda" (lossReason). |
| Operação (Operation) | The operation to perform: - Listar (getAll): List all loss reasons. - Obter (get): Get a loss reason by ID. |
| ID do Motivo de Perda (lossReasonId) | The unique identifier of the loss reason to retrieve. Required when using the "Obter" operation. |
| Parâmetros de Listagem (listParameters) | Parameters to filter and paginate the list of loss reasons: - Limite (limit): Max number of items to return. - Página (page): Page number. - Ordenação (order): Field to order by ("name" or "created_at"). - Direção da Ordenação (direction): Ascending or descending. - Status: Filter by status ("active", "inactive", or "all"). |
Output
The node outputs an array of JSON objects, each representing one loss reason or a single loss reason object depending on the operation:
For Listar (getAll):
The output JSON contains a list of loss reasons with their details as returned by the RD Station CRM API endpoint/deal_lost_reasons. Each item typically includes fields such as ID, name, status, creation date, and possibly other metadata.For Obter (get):
The output JSON contains the detailed information of the specified loss reason identified by the given ID.
No binary data is output by this node.
Example output structure for a single loss reason might look like:
{
"id": "12345",
"name": "Cliente não respondeu",
"status": "active",
"created_at": "2023-01-15T12:34:56Z"
}
Dependencies
- Requires an API key credential for RD Station CRM to authenticate requests.
- The node makes HTTP GET requests to the RD Station CRM API at
https://crm.rdstation.com/api/v1. - Proper configuration of the API credential within n8n is necessary for successful authentication.
Troubleshooting
Missing or invalid loss reason ID:
If the "Obter" operation is used without providing a valid ID, the node throws an error indicating that a valid loss reason ID must be supplied.API authentication errors:
Ensure the API key credential is correctly configured and has sufficient permissions to access the loss reasons endpoints.Rate limits or network issues:
Network failures or API rate limiting may cause request failures. Implement retry logic or check API usage quotas if errors occur.Empty or unexpected responses:
Verify that the requested loss reason ID exists and that filters for listing are correct.
Links and References
- RD Station CRM API Documentation (for loss reasons endpoints)
- n8n Documentation on HTTP Request Node (for understanding how API calls work in n8n)