1. Overview
Odoo is a suite of open-source business management software tools including CRM, e-commerce, billing, accounting, manufacturing, warehouse, project management, and inventory management. The Community version is a libre software, licensed under the GNU LGPLv3.
With the GoInsight Odoo node, you can integrate your Odoo instance with other applications and services, automating your business processes. This allows you to perform a wide range of operations, including:
- Contact Management: Create, retrieve, update, and delete contacts in your Odoo database.
- CRM: Manage your sales pipeline by creating, retrieving, updating, and deleting CRM opportunities.
- Productivity: Create, manage, and track notes and to-do tasks.
- Customizability: Interact with any Odoo model (resource) using the generic "Custom Resource" operations, allowing for immense flexibility.
2. Prerequisites
Before using this node, you must have an active Odoo instance (either on-premises or Odoo.sh/Odoo.com). You will need the URL of your instance, the database name, a username, and the corresponding password or API key to configure the credentials.
3. Credentials
For a detailed guide on how to obtain and configure credentials, please refer to our official documentation: Credentials Configuration Guide.
4. Supported Operations
The Odoo node allows you to interact with various resources such as Contacts, Opportunities, Notes, Todos, and any Custom Resource (model). The following summary table outlines the supported operations.
Summary
Resource | Operation | Description |
---|---|---|
Contact | Create a Contact | Creates a new contact. |
Contact | Delete Contacts | Deletes one or more specified contacts. |
Contact | Get Contacts | Retrieves a list of contacts. |
Contact | Update a Contact | Updates a specified contact's information. |
Custom Resource | Create a Custom Resource | Creates a new record in any Odoo model. |
Custom Resource | Delete a Custom Resource | Deletes a record from any Odoo model by ID. |
Custom Resource | Get a Custom Resource | Retrieves a single record from any Odoo model by ID. |
Custom Resource | Get many Custom Resources | Retrieves multiple records from any Odoo model. |
Custom Resource | Update a Custom Resource | Updates an existing record in any Odoo model. |
Note | Create a Note | Creates a new note. |
Note | Delete Notes | Deletes one or more notes. |
Note | Get a Note | Retrieves detailed information about a specific note. |
Note | Update a Note | Updates an existing note. |
Opportunity | Create an Opportunity | Creates a new opportunity in Odoo CRM. |
Opportunity | Delete Opportunities | Deletes one or more existing opportunities. |
Opportunity | Get Opportunities | Retrieves opportunity information from Odoo CRM. |
Opportunity | Update an Opportunity | Updates an existing opportunity. |
Todo | Create a Todo | Creates a new todo task. |
Todo | Delete Todos | Deletes one or more todo tasks by their IDs. |
Todo | Get Todos | Retrieves a list of todo tasks. |
Todo | Update a Todo | Updates an existing todo task. |
Operation Details
Create a Contact
Creates a new contact in Odoo with support for basic information and address details.
Input Parameters
- ContactName: Contact name (required).
Options
- Email: Email address (optional).
- Phone: Phone number (optional).
- Mobile: Mobile number (optional).
- Website: Website address (optional).
- JobPosition: Job position/title (optional).
- InternalNotes: Internal notes/comments (optional).
- TaxID: Tax ID/VAT number (optional).
- Address: Address information in JSON format (optional).
Output
- Success (bool): Whether the operation was successful.
- ContactID (number): The ID of the created contact.
- ContactName (string): The name of the created contact.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Delete Contacts
Deletes specified contacts from Odoo with support for multiple contact deletion.
Input Parameters
- ContactIDs: Contact IDs to delete as comma-separated string (required).
Output
- Success (bool): Whether the operation was successful.
- DeletedCount (number): Number of contacts successfully deleted.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Get Contacts
Retrieves a list of contacts from Odoo with support for field selection and result limiting.
Options
- FieldsList: Fields to return as comma-separated string (optional).
- Limit: Maximum number of records to return. 0 means return all records (optional).
- ContactIds: Contact IDs to retrieve as comma-separated string (optional). If empty, returns all contacts.
Output
- Success (bool): Whether the operation was successful.
- Contacts (object-array): Array of contact objects.
- TotalCount (number): Total number of contacts returned.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Update a Contact
Updates specified contact information in Odoo with support for field-level updates.
Input Parameters
- ContactID: ID of the contact to update (required).
Options
- ContactName: Contact name (optional).
- Email: Email address (optional).
- Phone: Phone number (optional).
- Mobile: Mobile number (optional).
- Website: Website address (optional).
- JobPosition: Job position/title (optional).
- InternalNotes: Internal notes/comments (optional).
- TaxID: Tax ID/VAT number (optional).
- Address: Address information in JSON format (optional).
Output
- Success (bool): Whether the operation was successful.
- ContactID (number): ID of the updated contact.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Create a Custom Resource
Creates a new record in any Odoo model with specified field data.
Input Parameters
- ModelName: Odoo model name to create record in (e.g., res.partner, project.task).
- FieldsData: Field data to create the record with, as JSON string or key:value pairs.
Output
- Success (bool): Whether the operation was successful.
- RecordId (number): ID of the created record.
- Model (string): Odoo model name that was operated on.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Delete a Custom Resource
Deletes a record from any Odoo model by ID.
Input Parameters
- ModelName: Odoo model name to delete record from (e.g., res.partner, project.task).
- RecordId: ID of the record to delete.
Output
- Success (bool): Whether the operation was successful.
- RecordId (number): ID of the deleted record.
- Model (string): Odoo model name that was operated on.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Get a Custom Resource
Retrieves a single record from any Odoo model by ID with optional field selection.
Input Parameters
- ModelName: Odoo model name to retrieve record from (e.g., res.partner, project.task).
- RecordId: ID of the record to retrieve.
Options
- FieldsList: Comma-separated list of fields to return (optional).
Output
- Success (bool): Whether the operation was successful.
- Record (object): Retrieved record data.
- RecordId (number): ID of the retrieved record.
- Model (string): Odoo model name that was operated on.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Get many Custom Resources
Retrieves multiple records from any Odoo model with support for filtering, pagination, and field selection.
Input Parameters
- ModelName: Odoo model name to retrieve records from (e.g., res.partner, project.task).
Options
- ReturnAll: Whether to return all records or limit the results.
- Limit: Maximum number of records to return (ignored if ReturnAll is true).
- Offset: Number of records to skip for pagination.
- FieldsList: Comma-separated list of fields to return (optional).
- Filters: JSON-formatted filter conditions for querying records.
Output
- Success (bool): Whether the operation was successful.
- Records (object-array): Array of retrieved records.
- TotalCount (number): Total number of records returned.
- Model (string): Odoo model name that was operated on.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Update a Custom Resource
Updates an existing record in any Odoo model with specified field data.
Input Parameters
- ModelName: Odoo model name to update record in (e.g., res.partner, project.task).
- RecordId: ID of the record to update.
- FieldsData: Field data to update in the record, as JSON string or key:value pairs.
Output
- Success (bool): Whether the operation was successful.
- RecordId (number): ID of the updated record.
- Model (string): Odoo model name that was operated on.
- UpdatedFields (object): Fields that were updated in the record.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Create a Note
Creates a new note in Odoo with memo content and optional title.
Input Parameters
- Memo: Note content/memo (required).
Options
- Name: Note title (optional).
Output
- Success (bool): Whether the operation was successful.
- NoteID (number): The ID of the created note.
- Memo (string): The content of the created note.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Delete Notes
Deletes one or more notes from Odoo. Supports batch deletion using comma-separated note IDs.
Input Parameters
- NoteIDs: Note IDs to delete, comma-separated (e.g., "1,2,3") (required).
Output
- Success (bool): Whether the operation was successful.
- DeletedCount (number): Number of notes successfully deleted.
- NoteIDs (string): Comma-separated list of note IDs that were deleted.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Get a Note
Retrieves detailed information about a specific note from Odoo.
Input Parameters
- NoteID: Note ID to retrieve (required).
Options
- Fields: Comma-separated list of fields to return (optional, returns all fields if not specified).
Output
- Success (bool): Whether the operation was successful.
- Note (object): Complete note information as returned from Odoo.
- NoteID (number): The ID of the retrieved note.
- Memo (string): The content of the note.
- Name (string): The title of the note.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Update a Note
Updates an existing note in Odoo with new memo content and/or title.
Input Parameters
- NoteID: Note ID to update (required).
- Memo: Updated note content/memo (required).
Options
- Name: Updated note title (optional).
Output
- Success (bool): Whether the operation was successful.
- NoteID (number): The ID of the updated note.
- Memo (string): The updated content of the note.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Create an Opportunity
Creates a new opportunity in Odoo CRM with support for basic information and opportunity details.
Input Parameters
- OpportunityName: Opportunity name (required).
Options
- Email: Email address (optional).
- Phone: Phone number (optional).
- ExpectedRevenue: Expected revenue amount (optional).
- InternalNotes: Internal notes/comments (optional).
- Priority: Priority level 1-3 (optional).
- Probability: Success probability percentage 0-100 (optional).
Output
- Success (bool): Whether the operation was successful.
- OpportunityID (number): The ID of the created opportunity.
- OpportunityName (string): The name of the created opportunity.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Delete Opportunities
Deletes an existing opportunity from Odoo CRM.
Input Parameters
- OpportunityIDs: Opportunity ID(s) to delete, supports single ID or comma-separated multiple IDs (required).
Output
- Success (bool): Whether the operation was successful.
- OpportunityIDs (number-array): The list of IDs of the deleted opportunities.
- DeletedCount (number): The number of opportunities deleted.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Get Opportunities
Retrieves opportunity information from Odoo CRM. Can get single or multiple opportunities by ID(s) or retrieve all opportunities with pagination. Supports comma-separated IDs (both full-width and half-width commas).
Options
- OpportunityIDs: Opportunity ID(s) to retrieve, comma-separated for multiple IDs (optional, supports both full-width and half-width commas. If provided gets specified opportunities, otherwise gets all opportunities).
- Limit: Maximum number of opportunities to retrieve (1-1000, default 50).
- Fields: Comma-separated list of fields to retrieve or JSON array (optional).
Output
- Success (bool): Whether the operation was successful.
- Opportunities (object-array): Array of opportunity objects or single opportunity object.
- TotalCount (number): Number of opportunities returned.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Update an Opportunity
Updates an existing opportunity in Odoo CRM with new information.
Input Parameters
- OpportunityID: Opportunity ID to update (required).
Options
- OpportunityName: New opportunity name (optional).
- Email: New email address (optional).
- Phone: New phone number (optional).
- ExpectedRevenue: New expected revenue amount (optional).
- InternalNotes: New internal notes/comments (optional).
- Priority: New priority level 1-3 (optional).
- Probability: New success probability percentage 0-100 (optional).
Output
- Success (bool): Whether the operation was successful.
- OpportunityID (number): The ID of the updated opportunity.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Create a Todo
Creates a new todo task in Odoo with task details and optional properties.
Input Parameters
- Name: Todo task title (required).
Options
- Description: Todo task description (optional).
- ProjectID: Project ID to associate the task with (optional).
- UserID: User ID to assign the task to (optional).
- DateDeadline: Task deadline in YYYY-MM-DD, YYYY-MM-DD H:i:s, or YYYY-MM-DD H:i format (optional).
- Priority: Task priority: 0=Low, 1=Normal, 2=High (optional).
Output
- Success (bool): Whether the operation was successful.
- TodoID (number): The ID of the created todo task.
- Name (string): The title of the created todo task.
- Description (string): The description of the created todo task.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Delete Todos
Deletes one or more todo tasks from Odoo by their IDs.
Input Parameters
- TodoIDs: Comma-separated list of todo task IDs to delete (required, e.g., "1,2,3").
Output
- Success (bool): Whether the operation was successful.
- DeletedCount (number): Number of todo tasks successfully deleted.
- TodoIDs (string): Comma-separated list of the deleted todo task IDs.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Get Todos
Retrieves a list of todo tasks from Odoo with optional filtering and pagination.
Options
- Limit: Maximum number of records to return (optional, default: 10, max: 100).
- Offset: Number of records to skip for pagination (optional, default: 0).
- Fields: Comma-separated list of fields to return (optional, default: common fields).
- Domain: JSON-formatted domain filter array (optional).
Output
- Success (bool): Whether the operation was successful.
- Todos (object-array): Array of todo task objects.
- TotalCount (number): Number of todo tasks returned.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
Update a Todo
Updates an existing todo task in Odoo with new task details.
Input Parameters
- TodoID: Todo task ID to update (required).
- Name: Updated todo task title (required).
Options
- Description: Updated todo task description (optional).
- ProjectID: Updated project ID to associate the task with (optional).
- UserID: Updated user ID to assign the task to (optional).
- DateDeadline: Updated task deadline in YYYY-MM-DD format (optional).
- Priority: Updated task priority: 0=Low, 1=Normal, 2=High (optional).
Output
- Success (bool): Whether the operation was successful.
- TodoID (number): The ID of the updated todo task.
- Name (string): The updated title of the todo task.
- Description (string): The updated description of the todo task.
- StatusCode (number): Operation status code: 200 (success), 500 (Odoo error), -1 (parameter error).
- ErrorMessage (string): Error description if operation failed, empty on success.
5. Example Usage
This section will guide you through creating a simple workflow to create a new contact in Odoo whenever a new lead is qualified in another system.
The workflow will look like this: Trigger: New Lead -> Odoo: Create a Contact -> Answer.
1. Add the Tool Node
- On the workflow canvas, click the + icon to add a new node.
- In the panel that appears, select the "Tools" tab.
- Find and select Odoo from the list of tools.
- In the list of supported operations for Odoo, click Create a Contact. This will add a "Create a Contact" node to your canvas.
2. Configure the Node
- Click on the newly added Create a Contact node to open its configuration panel on the right.
- Configure Credentials: At the top of the panel, find the credentials field. Click the dropdown menu and select the Odoo credentials you have already configured.
- Fill in Parameters:
- ContactName: Map this field to the name of the new lead from your trigger step. For example, @{trigger.lead.name}.
- Email: Map this to the lead's email address, e.g., @{trigger.lead.email}.
- Phone: Map this to the lead's phone number, e.g., @{trigger.lead.phone}.
- JobPosition: Map this to the lead's job title, if available.
3. Run and Validate
- Once all required parameters are filled in correctly, any error indicators on the workflow canvas will disappear.
- Click the "Test Run" button in the top-right corner of the canvas to execute the workflow.
- After a successful execution, you can log in to your Odoo instance and navigate to the Contacts app to verify that the new contact has been created. You can also click the log icon in the top-right corner to view the detailed input and output of the node.
After completing these steps, your workflow is configured to automatically create a new contact in Odoo for every new qualified lead, helping to keep your CRM data synchronized.
6. FAQs
Q: I am getting an "Access Denied" error. What should I do?
A: This error typically means the user account configured in the credentials does not have the necessary permissions for the operation you are trying to perform on a specific model.
- Check User Permissions: Log in to Odoo as an administrator and go to Settings > Users & Companies > Users. Find the user you are using for the integration and check their "Access Rights" tab to ensure they have the appropriate permissions (Create, Read, Write, Delete) for the model in question (e.g., res.partner for contacts, crm.lead for opportunities).
- Check Record Rules: Odoo's "Record Rules" can restrict access to certain records even if the user has model-level permissions. Go to Settings > Technical > Security > Record Rules and check if any rules are preventing access.
Q: How do I find the ModelName for the "Custom Resource" operations?
A: You can find the model name in Odoo by enabling developer mode.
- Go to Settings > General Settings.
- Click on "Activate the developer mode".
- Navigate to the view for the resource you are interested in (e.g., go to the CRM app and open a pipeline).
- In the top-right corner, click the debug icon (it looks like a bug) and select "Edit Action".
- The "Model" field in this view will show you the technical name of the model, for example, crm.lead.
Q: How should I format the FieldsData for creating or updating custom resources?
A: The FieldsData parameter accepts a JSON object. The keys of the object are the technical field names of the Odoo model, and the values are the data you want to set. For example, to create a new task in the project.task model, your JSON might look like this: {"name": "My New Task", "project_id": 1, "user_id": 2}.
7. Official Documentation
For more detailed information on Odoo's models and API capabilities, please refer to the Odoo Official Documentation.
Leave a Reply.