Tiny ERP icon

Tiny ERP

Interact with Tiny ERP API v3

Overview

This node integrates with the Tiny ERP API v3, allowing users to manage various resources such as products, customers, orders, invoices, stock, contacts, and account information. Specifically, for the Customer resource with the Update operation, it updates an existing customer's details in the Tiny ERP system by sending a PUT request with the provided customer data.

Typical use cases include:

  • Updating customer contact information like email or phone.
  • Modifying address details or document numbers (CPF/CNPJ).
  • Adjusting other customer-related fields stored in Tiny ERP.

For example, if a customer's phone number or address changes, this node can be used to update those details automatically from another system or workflow.

Properties

Name Meaning
ID The unique identifier of the customer to update.
Additional Fields Optional fields to update on the customer record. Includes:
- Name: Customer's name
- Description: Description of the item (if applicable)
- Price: Price value (not typical for customer but available in additional fields)
- SKU: Code or SKU
- Email: Customer's email address
- Phone: Customer's phone number
- Document: CPF or CNPJ document number
- Address: Customer's address
- City: City
- State: State (UF)
- ZIP Code: Postal code (CEP)

These fields allow flexible updating of customer information according to what is needed.

Output

The node outputs JSON data representing the updated customer object returned by the Tiny ERP API after the update operation. This typically includes all customer fields as stored in Tiny ERP, reflecting the new state after the update.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "id": "12345",
  "nome": "Updated Customer Name",
  "email": "newemail@example.com",
  "telefone": "1234567890",
  "cpf_cnpj": "000.000.000-00",
  "endereco": "New Address",
  "cidade": "CityName",
  "uf": "ST",
  "cep": "12345-678"
}

Dependencies

  • Requires an OAuth2 API credential configured in n8n to authenticate requests against the Tiny ERP API.
  • Network access to https://erp.tiny.com.br/public-api/v3 is necessary.
  • No additional external dependencies beyond the configured API authentication.

Troubleshooting

  • Common issues:

    • Invalid or missing customer ID will cause the API to fail.
    • Providing invalid field formats (e.g., malformed email or document number) may result in API errors.
    • Authentication failures if the OAuth2 token is expired or misconfigured.
  • Error messages:

    • "Tiny ERP API request failed: <error message>" indicates an issue communicating with the API. Check credentials and network connectivity.
    • "Unknown operation: update" would indicate a misconfiguration in the operation parameter (unlikely here since it's fixed).
  • Resolutions:

    • Verify the customer ID exists in Tiny ERP before attempting update.
    • Ensure all required fields are correctly formatted.
    • Refresh or reconfigure the OAuth2 credentials if authentication errors occur.

Links and References

Discussion