Actions25
Overview
This node integrates with the Tiny ERP API v3 to manage customer data within the Tiny ERP system. Specifically, the Customer - Create operation allows users to create new customer records by providing various details such as name, contact information, and address.
Typical use cases include:
- Automating the addition of new customers from external systems or forms into Tiny ERP.
- Synchronizing customer databases between different platforms.
- Streamlining onboarding processes by programmatically creating customer profiles.
For example, a business could use this node to automatically add customers who sign up on their website directly into their ERP system, ensuring consistent and up-to-date customer records without manual entry.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | A collection of optional fields to specify customer details when creating or updating: |
| - Name | Customer's full name |
| - Description | (Not applicable for customer; present in product but ignored here) |
| - Price | (Not applicable for customer; present in product but ignored here) |
| - SKU | (Not applicable for customer; present in product but ignored here) |
| Customer's email address | |
| - Phone | Customer's phone number |
| - Document | CPF or CNPJ document number (Brazilian individual or company tax ID) |
| - Address | Customer's street address |
| - City | Customer's city |
| - State | Customer's state (UF) |
| - ZIP Code | Customer's postal code (CEP) |
These fields are all optional but provide detailed customer information to be stored in Tiny ERP.
Output
The node outputs JSON data representing the response from the Tiny ERP API after creating the customer. This typically includes the newly created customer's details such as their unique ID and all submitted fields as stored in the ERP system.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"id": "12345",
"nome": "John Doe",
"email": "john.doe@example.com",
"telefone": "555-1234",
"cpf_cnpj": "000.000.000-00",
"endereco": "123 Main St",
"cidade": "São Paulo",
"uf": "SP",
"cep": "01000-000"
}
Dependencies
- Requires an OAuth2 API credential configured in n8n to authenticate requests against the Tiny ERP API.
- The node makes HTTP requests to
https://erp.tiny.com.br/public-api/v3endpoints. - Proper permissions on the API key/credential to create customers are necessary.
Troubleshooting
- API Request Failures: Errors like
Tiny ERP API request failed: <message>indicate issues with authentication, network connectivity, or invalid input data. Verify that the OAuth2 credentials are correctly set up and have sufficient permissions. - Missing Required Fields: Although most fields are optional, some backend validations might require certain fields (e.g., name). Ensure required customer data is provided.
- Invalid Document Number: CPF/CNPJ must follow valid Brazilian formats; otherwise, the API may reject the request.
- Rate Limits: If many requests are sent rapidly, the API might throttle or block calls. Implement error handling and retries if needed.
Links and References
- Tiny ERP Public API Documentation (official API docs)
- n8n OAuth2 Credential Setup (for configuring authentication)
This summary covers the static analysis of the node’s execute() method focusing on the Customer resource and Create operation as requested.