Asaas icon

Asaas

Integração com a API do Asaas

Actions4

Overview

The Asaas - Cliente: Criar node in n8n allows you to create a new customer (cliente) in the Asaas platform via its API. This is useful for automating customer onboarding processes, integrating CRM systems, or syncing user data between platforms. For example, you could use this node to automatically add new customers from a web form submission or another database into your Asaas account.

Properties

Name Type Meaning
Nome String The full name of the customer. Required.
CPF/CNPJ String The Brazilian tax identification number (CPF for individuals, CNPJ for companies). Required.
Email String The customer's email address. Can accept multiple values.
Telefone String The customer's landline phone number.
Celular String The customer's mobile phone number.
Endereço String The street address of the customer.
Número String The street number of the customer's address.
Complemento String Additional address information (e.g., apartment, suite).
Estado String The state (province) where the customer resides.
CEP String The postal code (CEP) of the customer's address.

Output

The node returns a JSON object representing the newly created customer as provided by the Asaas API. The structure typically includes:

{
  "id": "string",
  "name": "string",
  "cpfCnpj": "string",
  "email": "string",
  "phone": "string",
  "mobilePhone": "string",
  "address": "string",
  "addressNumber": "string",
  "complement": "string",
  "province": "string",
  "postalCode": "string",
  // ...other fields returned by Asaas
}
  • If an error occurs and "Continue On Fail" is enabled, the output will include an error field with the error message.

Dependencies

  • External Service: Requires access to the Asaas API.
  • API Key: You must configure valid Asaas API credentials in n8n under the credential type asaasApi.
  • n8n Configuration: No special environment variables are required beyond the API key setup.

Troubleshooting

Common Issues:

  • Missing Required Fields: If "Nome" or "CPF/CNPJ" are not provided, the request will fail.
  • Invalid CPF/CNPJ: Providing an incorrectly formatted CPF or CNPJ may result in an API error.
  • Authentication Errors: Invalid or missing Asaas API credentials will cause authentication failures.
  • Network Issues: Connectivity problems between n8n and the Asaas API endpoint can lead to timeouts or failed requests.

Error Messages:

  • "error": "Missing required parameter" – Ensure all required fields are filled.
  • "error": "Invalid CPF/CNPJ" – Check the format and validity of the CPF/CNPJ value.
  • "error": "Unauthorized" – Verify that your Asaas API credentials are correct and active.

Links and References


This summary provides a clear understanding of how to use the "Cliente: Criar" operation in the Asaas node within n8n, including its inputs, outputs, dependencies, and troubleshooting tips.

Discussion