Actions30
Overview
This node integrates with the Perfex CRM system via the WON API, allowing users to manage various CRM resources programmatically. Specifically, for the Cliente (Client) resource with the Listar (List/Get All) operation, it fetches a list of client records from the Perfex CRM.
Typical use cases include:
- Retrieving all clients or a filtered subset based on criteria such as active status or country.
- Paginating through large sets of client data by specifying page number and limit.
- Automating workflows that require up-to-date client information from Perfex CRM.
For example, a user might want to get all active clients located in Brazil, limiting results to 100 per page, to synchronize with another system or generate reports.
Properties
| Name | Meaning |
|---|---|
| Opções Adicionais | Collection of additional options to customize the listing: |
| - Limite | Maximum number of client records to return (minimum 1, maximum 1000). |
| - Página | Page number of results to return (starting at 1). |
| - Filtros | JSON string representing filters to apply to the search, e.g., {"active": 1, "country": "Brasil"}. |
Note: The property is named "options" and contains these sub-properties.
Output
The output is an array of JSON objects, each representing a client record retrieved from the Perfex CRM API. The exact structure depends on the API response but typically includes client details such as company name, VAT number, phone number, address, country, city, state, zip code, website, and active status.
Example output snippet (simplified):
[
{
"id": 123,
"company": "Example Company",
"vat": "12345678901",
"phonenumber": "+5511999999999",
"country": "Brasil",
"city": "São Paulo",
"state": "SP",
"zip": "01000-000",
"address": "Rua Exemplo, 123",
"website": "https://example.com",
"active": true
},
...
]
No binary data output is produced by this operation.
Dependencies
- Requires an API token credential for authenticating with the Perfex CRM WON API.
- The node uses Axios HTTP client internally to make requests to the configured API endpoint.
- The base URL and API token must be set in the node credentials configuration.
Troubleshooting
- Invalid JSON in Filters: If the filters JSON string is malformed, the node will throw an error when parsing. Ensure the filters are valid JSON.
- Authentication Errors: If the API token is invalid or missing, the node returns an authentication error. Verify the API token in credentials.
- Resource Not Found: If the API endpoint is unreachable or the resource does not exist, a "Resource not found" error may occur.
- Limit and Page Values: Setting limit outside the allowed range (1-1000) or page less than 1 may cause unexpected behavior or errors.
- API Rate Limits or Server Errors: Network issues or server-side problems can cause connection errors or HTTP errors; retry or check server status.
Common error messages and resolutions:
| Error Message | Cause | Resolution |
|---|---|---|
| "Erro de autenticação: Token inválido ou não fornecido" | Invalid or missing API token | Update or provide correct API token |
| "Recurso não encontrado" | Incorrect endpoint or resource ID | Verify resource existence and endpoint |
| "Dados inválidos: ..." | Invalid input data format | Check and correct input parameters |
| "Erro de conexão com o servidor" | Network or server unavailable | Check network connection and server status |
Links and References
- Perfex CRM Official Website
- WON API Documentation (replace with actual link if available)
- Axios HTTP Client
This summary focuses on the Cliente resource with the Listar operation, describing how to list clients with optional filtering and pagination using the Perfex CRM node in n8n.