Perfex CRM icon

Perfex CRM

Consumir API do Perfex CRM

Overview

This node integrates with the Perfex CRM API to manage leads. Specifically, for the "Lead" resource and the "Create" operation, it allows users to create new lead records in their Perfex CRM system by providing required and optional lead details.

Common scenarios where this node is beneficial include:

  • Automating lead creation from form submissions or other data sources.
  • Integrating lead generation workflows with marketing campaigns.
  • Synchronizing leads from external systems into Perfex CRM.

For example, a user can collect lead information from a website form and use this node to automatically add those leads into Perfex CRM with relevant details such as source, status, assigned user, and contact information.

Properties

Name Meaning
Campos Obrigatórios (requiredFields) Collection of mandatory fields needed to create a lead:
- Fonte (source): Lead source (required)
- Status (status): Lead status (required)
- Nome (name): Lead name (required)
- Responsável (assigned): ID of the user responsible for the lead (required)
Campos Opcionais (optionalFields) Collection of optional fields that can be provided when creating a lead:
- ID do Cliente (client_id): Related client ID
- Tags (tags): Tags associated with the lead
- Contato (contact): Contact person
- Cargo (title): Position or title
- Email (email): Email address
- Website (website): Website URL
- Telefone (phonenumber): Phone number
- Empresa (company): Company name
- Endereço (address): Address
- Cidade (city): City
- CEP (zip): Postal code
- Estado (state): State
- País (country): Country
- Idioma Padrão (default_language): Default language
- Descrição (description): Description
- Data de Contato Personalizada (custom_contact_date): Custom contact date
- Contatado Hoje (contacted_today): Whether contacted today
- É Público (is_public): Whether the lead is public
- Último Contato (lastcontact): Date of last contact

Output

The node outputs an array of JSON objects corresponding to each input item processed. For the "create" operation on leads, the output JSON contains the response data returned by the Perfex CRM API after successfully creating a lead. This typically includes the newly created lead's details such as its ID and all submitted fields.

No binary data output is produced by this node.

Example output snippet (simplified):

{
  "id": 123,
  "name": "John Doe",
  "status": "New",
  "source": "Website",
  "assigned": "45",
  ...
}

Dependencies

  • Requires an active connection to the Perfex CRM API.
  • Needs credentials containing the API base URL and an API authentication token.
  • The node uses HTTP requests (GET, POST, PUT, DELETE) via Axios library to communicate with the API.
  • Proper configuration of the API credential in n8n is necessary before using this node.

Troubleshooting

  • Common issues:

    • Missing required fields will cause the API to reject the request.
    • Incorrect or expired API tokens will result in authentication errors.
    • Network connectivity problems may cause request failures.
    • Providing invalid IDs (e.g., for assigned user) may cause errors.
  • Error messages:

    • Authentication errors usually indicate invalid API key/token; verify and update credentials.
    • Validation errors from the API often specify which required field is missing or invalid.
    • If the node throws an error but "Continue On Fail" is enabled, the error message will appear in the output JSON under an error property.
  • Resolution tips:

    • Double-check all required fields are filled correctly.
    • Ensure the API credentials are valid and have sufficient permissions.
    • Test connectivity to the Perfex CRM API endpoint outside n8n if needed.
    • Use the node’s error output to identify specific issues and adjust inputs accordingly.

Links and References

Discussion