Table of Contents
-
Introduction
-
Understanding the Dolibarr REST API
-
Why Use Zapier with Dolibarr?
-
Getting Started: Prerequisites for Integration
-
Setting Up API Access in Dolibarr
-
Creating Your First API Token
-
Understanding Zapier and Its Role in Automation
-
Step-by-Step: Connecting Dolibarr to Zapier
-
Example 1: Creating a New Dolibarr Contact from Google Sheets
-
Example 2: Generating an Invoice from a WooCommerce Order
-
Example 3: Creating a New Task in Dolibarr from a Form Submission
-
Example 4: Logging Email Activity into Dolibarr Third-Parties
-
Example 5: Updating Stock Levels Automatically from a CSV Upload
-
Advanced API Techniques with Zapier Webhooks
-
Mapping Data Fields Between Zapier and Dolibarr
-
Handling Authentication and Security Safely
-
Monitoring and Debugging Your Integrations
-
Rate Limits and API Call Best Practices
-
Alternative Tools to Zapier for Dolibarr Automation
-
Conclusion and Next Steps
1. Introduction
Enterprise resource planning systems like Dolibarr are incredibly powerful when connected to other tools in your digital ecosystem. Zapier, a no-code automation platform, enables businesses to create automated workflows (called Zaps) between Dolibarr and over 5,000 other applications. Thanks to Dolibarr's REST API, the possibilities are nearly endless.
This comprehensive guide explains how to use the Dolibarr REST API with Zapier, providing actionable examples that can help you save time, reduce manual data entry, and improve operational efficiency.
2. Understanding the Dolibarr REST API
Dolibarr offers a RESTful API for interacting with all major components of the ERP system, such as:
-
Third parties (companies, customers, suppliers)
-
Contacts
-
Products and services
-
Orders, quotes, and invoices
-
Projects and tasks
-
Stocks, warehouses, and shipments
This API uses standard HTTP methods (GET, POST, PUT, DELETE) and typically returns data in JSON format.
3. Why Use Zapier with Dolibarr?
Zapier helps non-developers automate workflows between apps. It’s particularly useful for:
-
Automating repetitive tasks
-
Creating workflows across tools (e.g., CRM, eCommerce, marketing)
-
Saving developer time and reducing integration costs
Dolibarr isn't a native Zapier app, but with Webhooks and custom API requests, you can still achieve deep integrations.
4. Getting Started: Prerequisites for Integration
Before connecting Zapier to Dolibarr, ensure you have:
-
Dolibarr version 9.0 or higher (v15+ recommended)
-
API module enabled in Dolibarr
-
A Zapier account (free or paid)
-
HTTPS-enabled Dolibarr installation
-
Basic familiarity with REST APIs and JSON formatting
5. Setting Up API Access in Dolibarr
-
Log into Dolibarr as admin
-
Go to Home > Setup > Modules > Web Services (REST API)
-
Enable the module
-
Generate an API key for a user (preferably with limited permissions)
The API URL structure is usually: https://yourdomain.com/api/index.php/
6. Creating Your First API Token
-
Go to Users & Groups > Select User > API Key tab
-
Click "Create API key"
-
Store the key securely
This token will be used for all HTTP requests made by Zapier.
7. Understanding Zapier and Its Role in Automation
Zapier works by triggering an action when an event occurs. Each Zap contains:
-
A trigger (e.g., new row in Google Sheets)
-
One or more actions (e.g., create a contact in Dolibarr)
You’ll use the "Webhooks by Zapier" app to connect to Dolibarr’s API.
8. Step-by-Step: Connecting Dolibarr to Zapier
-
Create a new Zap
-
Choose your trigger app (e.g., Google Forms, Gmail)
-
Add an action: Webhooks by Zapier > Custom Request
-
Set method: POST (for creating records)
-
Add Dolibarr API URL (e.g.,
.../thirdparties
) -
Add headers:
-
DOLAPIKEY: your_api_key
-
Content-Type: application/json
-
-
In the body, input your JSON payload
9. Example 1: Creating a New Dolibarr Contact from Google Sheets
Trigger: New row in Google Sheets Action:
-
Webhook POST to
/contacts
-
Use values from the spreadsheet to populate name, email, phone
This setup allows automatic addition of leads collected through forms.
10. Example 2: Generating an Invoice from a WooCommerce Order
Trigger: New WooCommerce order Action:
-
POST request to
/invoices
-
Include line items, client ID, total, tax info
Invoices can be auto-validated using a follow-up PUT request if needed.
11. Example 3: Creating a New Task in Dolibarr from a Form Submission
Trigger: New entry in Typeform Action:
-
POST to
/projects/tasks
-
Include title, project ID, duration, assigned user
Useful for automating internal workflows from user inputs.
12. Example 4: Logging Email Activity into Dolibarr Third-Parties
Trigger: New email in Gmail with label "Client" Action:
-
POST to
/thirdparties/note
-
Add email body as a public or private note on a third-party record
13. Example 5: Updating Stock Levels Automatically from a CSV Upload
Trigger: New file in Google Drive or Dropbox Action:
-
Use Zapier Code step to parse CSV
-
Send multiple PUT requests to
/products/{id}
to update stock
14. Advanced API Techniques with Zapier Webhooks
You can also:
-
Chain actions using Zapier Paths
-
Use filters to conditionally create vs. update
-
Set delays between steps
15. Mapping Data Fields Between Zapier and Dolibarr
Use Zapier’s field mapping UI to link form inputs or spreadsheet columns to API JSON keys. Always ensure:
-
Dates are in correct format (YYYY-MM-DD)
-
Currency fields use decimal points
-
IDs match Dolibarr records (e.g., customer ID, product ID)
16. Handling Authentication and Security Safely
-
Always use HTTPS for your Dolibarr instance
-
Restrict API users to necessary permissions
-
Regenerate keys regularly
-
Use Zapier’s built-in security features to mask sensitive data
17. Monitoring and Debugging Your Integrations
-
Check Zapier task history for each execution
-
Log errors in Dolibarr (use custom logging if needed)
-
Use test environment before going live
18. Rate Limits and API Call Best Practices
Dolibarr may enforce call limits depending on server configuration:
-
Avoid batch processing large datasets without delay steps
-
Use pagination for GET requests
-
Cache data locally when possible
19. Alternative Tools to Zapier for Dolibarr Automation
-
Integromat (Make.com)
-
n8n (self-hosted automation)
-
Pabbly Connect
-
Custom scripts using Node.js or Python + Dolibarr API
Each has its strengths, especially for complex workflows or self-hosted solutions.
20. Conclusion and Next Steps
Integrating Dolibarr with Zapier unlocks powerful automation opportunities without writing complex code. From lead management and invoicing to stock updates and task automation, the combination of Dolibarr's REST API and Zapier’s workflow engine can dramatically enhance business efficiency.
For best results:
-
Start with simple Zaps
-
Monitor and optimize your API usage
-
Expand as your processes evolve
Once you master these workflows, you’ll gain a competitive edge with a lean, automated ERP system tailored to your unique operations.