npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-tiny-erp-guidevit

v1.0.0

Published

n8n node for Tiny ERP API integration

Downloads

59

Readme

n8n-nodes-tiny-erp

This is an n8n community node that provides integration with the Tiny ERP API v3. It allows you to interact with Tiny ERP's comprehensive business management system directly from your n8n workflows.

Tiny ERP Logo

Features

This node supports the following Tiny ERP resources and operations:

🛍️ Products

  • Get all products
  • Get product by ID
  • Create new products
  • Update existing products
  • Delete products
  • Get product stock information

👥 Customers

  • Get all customers
  • Get customer by ID
  • Create new customers
  • Update existing customers
  • Delete customers

📦 Orders

  • Get all orders
  • Get order by ID
  • Create new orders
  • Update existing orders
  • Update order status

🧾 Invoices

  • Get all invoices
  • Get invoice by ID
  • Create new invoices
  • Send invoices

📊 Stock Management

  • Get stock movements
  • Update product stock
  • Get stock updates

📞 Contacts

  • Get all contacts
  • Get contact by ID
  • Create new contacts
  • Update existing contacts

🏢 Account

  • Get account information

Installation

Community Nodes (Recommended)

  1. Go to Settings > Community Nodes in your n8n instance
  2. Click Install a community node
  3. Enter n8n-nodes-tiny-erp
  4. Click Install

Manual Installation

  1. Navigate to your n8n installation directory
  2. Run: npm install n8n-nodes-tiny-erp
  3. Restart your n8n instance

Local Development

  1. Clone this repository
  2. Install dependencies: npm install
  3. Build the project: npm run build
  4. Link to your n8n installation: npm link
  5. In your n8n directory: npm link n8n-nodes-tiny-erp

Prerequisites

Before using this node, you need to:

  1. Create a Tiny ERP Account: Sign up at Tiny ERP
  2. Set up OAuth2 Application:
    • Go to your Tiny ERP developer console
    • Create a new OAuth2 application
    • Note down your Client ID and Client Secret
    • Set the redirect URI to your n8n OAuth callback URL

Configuration

Setting up OAuth2 Credentials

  1. In n8n, go to Credentials

  2. Click Create New Credential

  3. Search for "Tiny OAuth2 API"

  4. Fill in the required fields:

    • Client ID: Your Tiny ERP OAuth2 Client ID
    • Client Secret: Your Tiny ERP OAuth2 Client Secret
    • Authorization URL: https://accounts.tiny.com.br/realms/tiny/protocol/openid-connect/auth
    • Access Token URL: https://accounts.tiny.com.br/realms/tiny/protocol/openid-connect/token
  5. Click Connect my account to authorize the connection

Usage Examples

Example 1: Get All Products

{
  "resource": "product",
  "operation": "getAll",
  "options": {
    "limit": 50,
    "page": 1,
    "search": "laptop"
  }
}

Example 2: Create a New Customer

{
  "resource": "customer",
  "operation": "create",
  "additionalFields": {
    "nome": "João Silva",
    "email": "[email protected]",
    "telefone": "+55 11 99999-9999",
    "cpf_cnpj": "123.456.789-00",
    "endereco": "Rua das Flores, 123",
    "cidade": "São Paulo",
    "uf": "SP",
    "cep": "01234-567"
  }
}

Example 3: Update Product Stock

{
  "resource": "stock",
  "operation": "updateStock",
  "productId": "12345",
  "stockQuantity": 100
}

Example 4: Update Order Status

{
  "resource": "order",
  "operation": "updateStatus",
  "id": "67890",
  "status": "enviado"
}

API Endpoints

The node connects to the Tiny ERP API v3 at:

  • Base URL: https://erp.tiny.com.br/public-api/v3
  • Authentication: OAuth2 with Bearer token
  • Documentation: Tiny ERP API v3 Swagger

Error Handling

The node includes comprehensive error handling:

  • Authentication Errors: Automatically handled through OAuth2 refresh tokens
  • Rate Limiting: Respects API rate limits with appropriate error messages
  • Validation Errors: Clear error messages for invalid input data
  • Network Errors: Retry logic for temporary network issues

Supported Order Statuses

When updating order status, you can use these values:

  • pendente - Pending
  • aprovado - Approved
  • producao - In Production
  • enviado - Shipped
  • entregue - Delivered
  • cancelado - Cancelled

Rate Limits

Tiny ERP API has rate limits. The node respects these limits and will provide appropriate error messages if limits are exceeded. For high-volume operations, consider implementing delays between requests.

Troubleshooting

Common Issues

  1. Authentication Failed

    • Verify your Client ID and Client Secret
    • Ensure the redirect URI matches your n8n instance
    • Check if your OAuth2 application is active
  2. Invalid Endpoint

    • Verify the resource and operation combination
    • Check the Tiny ERP API documentation for endpoint availability
  3. Missing Required Fields

    • Review the required fields for each operation
    • Ensure all mandatory data is provided

Debug Mode

Enable debug mode in n8n to see detailed API requests and responses:

  1. Set environment variable: N8N_LOG_LEVEL=debug
  2. Restart n8n
  3. Check logs for detailed API communication

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

v1.0.0

  • Initial release
  • Support for Products, Customers, Orders, Invoices, Stock, Contacts, and Account resources
  • OAuth2 authentication
  • Comprehensive error handling
  • Pagination support

Note: This is a community-maintained node and is not officially supported by Tiny ERP or n8n. Use at your own discretion and always test thoroughly in a development environment before using in production.