How Do You Automate Workflows in Odoo?
A practical guide to automation rules, server actions and scheduled actions in Odoo, and when to write custom modules
Odoo automates workflows with automation rules, server actions, scheduled actions and Studio. Learn which to use, how to set them up and pitfalls.
Odoo automates workflows through automation rules (formerly automated actions), which run a server action when a record is created, updated, reaches a date or meets a condition; scheduled actions, which run on a timer; and Studio for no-code changes. Complex logic belongs in a custom module, where code can be versioned, tested and upgraded safely.
Odoo's flexibility is a strength and a risk. It is easy to add an automation through the interface and forget it exists until an upgrade breaks it. This guide explains each tool, when to use it, and how to keep automations maintainable.
What automation tools does Odoo provide?
- Automation rules. Event-driven rules on a model: on creation, on update, on a field change, based on a date field, on UI change, or via webhook in recent versions. See Odoo's automation rules documentation.
- Server actions. The "do this" part: update a record, create a record, send an email or SMS, add followers, create an activity, or execute Python code.
- Scheduled actions. Server actions that run at intervals, such as nightly clean-up or daily reminders.
- Studio. A no-code tool (Enterprise) for adding fields, views, approvals and automation rules.
- Custom modules. Python and XML code in an addon, which is the most robust option for complex or business-critical logic.
When should you use each option?
- Automation rule plus a simple server action: assign a salesperson, set a field, create a follow-up activity, send a template email.
- Automation rule plus Python code: small calculations or validations that standard actions cannot express. Keep it short.
- Scheduled action: anything time-based that is not tied to a specific record change, such as flagging overdue quotations every morning.
- Studio: adding fields, simple approvals and views without development.
- Custom module: multi-step logic, integrations, anything touching accounting or stock valuation, or code you want under version control and tests.
How do you create an automation rule step by step?
The exact menu location varies by version, but the process is consistent:
- Enable developer mode in Settings.
- Go to Settings, Technical, Automation Rules (or open Studio and choose Automations).
- Create a rule and select the model, for example Sales Order or Lead/Opportunity.
- Choose the trigger, such as "On save" with a field filter, "Stage is set to", or a date-based trigger like "Based on date field" with a delay.
- Set the domain filter to limit which records qualify, for example only quotations above a certain value.
- Add actions: update record, create activity, send email, or execute code.
- Test on a staging database with realistic records.
- Activate and monitor the logs and chatter on affected records.
What are useful automation examples?
- CRM: when a lead is created from the website, assign it to a sales team based on country and schedule a call activity. Odoo's CRM documentation covers lead assignment features that may already do this natively.
- Sales: when a quotation is sent and not confirmed after a set number of days, create a follow-up activity for the salesperson.
- Inventory: when stock for a key product falls below a level, notify purchasing (consider native reordering rules first).
- Helpdesk or projects: when a ticket stage changes to "Waiting on customer", send a template email.
- Accounting: notify the finance lead when an invoice above a threshold is posted. Avoid automations that change posted accounting entries.
Always check whether a native feature already exists before automating. Odoo often has built-in rules for assignment, reminders and reordering.
How do you use Python code in server actions safely?
Python in server actions runs in a restricted environment with access to variables such as record, records, env and model. Guidelines:
- Keep it short. If it grows beyond a few lines, move it to a module.
- Avoid loops that write to many records in a single trigger; they slow down saves for users.
- Guard against recursion. An update rule that writes to the same field can trigger itself repeatedly.
- Do not hard-code IDs. Use external IDs or search by a stable field.
- Document it in the rule name and a description: what, why and who owns it.
How do automations connect Odoo to other systems?
Odoo exposes an external API using XML-RPC and JSON-RPC, and recent versions support webhooks in automation rules. Patterns we use:
- Outbound webhook from an automation rule when an order is confirmed, sent to an integration service.
- Inbound API calls from a CRM or e-commerce platform to create customers or orders.
- Scheduled pulls for systems that cannot push events.
For more detail, see our article on Odoo API integration with NetSuite and SAP.
How do you keep Odoo automations maintainable?
- Keep an inventory of every automation rule and scheduled action, with owner and purpose.
- Use a staging database for testing and for every version upgrade.
- Prefer modules for anything critical, so code lives in Git and moves through environments.
- Review after upgrades. Field names and models can change between major versions.
- Archive, do not delete, rules you are unsure about, so you can restore them.
Should you use Studio or developer mode?
Studio is friendlier for business users and keeps changes inside a customisation layer, while developer mode exposes the full technical menus. A sensible rule: let trained admins use Studio for fields, views and simple rules, and reserve developer-mode code for people who also maintain the staging and upgrade process.
Key takeaways
- Odoo automates work with automation rules, server actions, scheduled actions, Studio and custom modules.
- Use rules and simple actions for straightforward tasks; move complex logic into modules.
- Check native features before automating.
- Keep Python in server actions short, avoid recursion, and never hard-code IDs.
- Maintain an automation inventory and test every change on staging.
Frequently asked questions
What is the difference between automated actions and automation rules in Odoo?
They are the same concept. Recent Odoo versions renamed automated actions to automation rules and refreshed the interface. Both define a trigger on a model and the server actions to run when it fires.
Do I need Odoo Enterprise for automation rules?
Automation rules are available through the technical settings in developer mode, while Studio, which offers a friendlier interface, is an Enterprise feature. Check your edition and version, as menu locations and availability can change.
Can Odoo automation rules call external APIs?
Recent versions support sending webhooks from automation rules, and Python code actions can be used for simple calls. For reliable integrations with retries and logging, an external integration service or a custom module is usually safer.
How do I schedule a recurring task in Odoo?
Use a scheduled action under Settings, Technical, with developer mode enabled. Set the model, the code or action to run, and the interval. Test it on staging and check the next execution date after saving.
Why is my Odoo automation rule not firing?
Common causes are a domain filter that excludes the record, a trigger field that is not actually changing, the rule being archived, or a date-based trigger waiting for its scheduled check. Review the rule settings and test on a single record.
Want Odoo automation that survives upgrades?
Insyrge designs Odoo automations and integrations with clean ownership, staging and documentation. See our ERP CRM integration service, our custom app development, or contact us.
Need Help Implementing This in Your Business?
Our certified Zoho consultants and automation experts can help you design and deploy custom workflows tailored to your operations.
Book Free Consultation