MailDesk docs
Odoo integrations

Turn absence emails into Time Off requests

6 min read Odoo 18.0

Open a Time Off request from an absence email, link the email to a request that already exists, and let the AI propose the dates for you to check. Approval stays in Odoo.

Who this is for: HR staff and managers who receive absence emails (daily use) and MailDesk administrators (one-time setup per mailbox).

You need:

  • The MailDesk Time Off Integration module (maildesk_mail_client_hr_holidays). It is a separate module.
  • MailDesk Basic and MailDesk Pro.
  • The Odoo Time Off app (hr_holidays).
  • A connected mailbox that syncs.
  • Optional, for absence auto-replies: the MailDesk Automation module. See Automation.

Which MailDesk plan includes this module is described in Plans and included features.

Before you begin

  • Install the module on your Odoo database and check that Time Off is installed. Install steps are in Install MailDesk.
  • Administrators: turn the integration on for each mailbox that needs it (Step 1). It is off by default.
  • Users: you need normal Odoo Time Off access. The panel works as you, so your HR access rules still apply. You also need access to the mailbox. See Security and access rights.

Step 1: Turn on Time Off for a mailbox (administrator)

  1. Open MailDesk ▸ Configuration ▸ Mailboxes ▸ Mailbox Accounts and open the mailbox.
  2. Open the Settings tab and find the card Time Off Linking & Absence Automation.
  3. Switch Enable on. The card shows its options.
  4. Set the options you need, then save the mailbox.

The Time Off Linking and Absence Automation card on the Settings tab of a mailbox account, with the Enable toggle switched on

What you should see: the card expands and shows Defaults, Permissions and Absence Automation.

Group Options
Defaults Default Time Off Type, Default Employee, Employee Resolution (Exact Email Match, Default, then Email Match or Manual Selection), Create State (Draft or To Approve)
Permissions Allow Create Time Off, Allow Link Time Off, Allow Unlink Time Off
Automation (next to Permissions) Auto-link by Reply Headers (Time Off), Auto-link by Subject Token (Time Off), Log Agent Replies (Time Off), Log Customer Replies (Time Off)
Absence Automation Enable Absence Behavior and the options it shows (see below)

Set the defaults once

Choose a Default Time Off Type. The AI route in Step 3 needs it. Turn the integration on for hr@ or a manager queue and leave it off on other mailboxes.

Step 2: Open the Time Off panel on an email

  1. Open an email in MailDesk.
  2. Click the Time Off panel button (calendar icon) on the email toolbar.

The Time Off button, a calendar icon, on the toolbar of an open email

What you should see: the Time Off panel opens beside the message. If no request is linked, it says No Time Off request linked yet and shows Create Time Off, Extract with AI and Link Existing.

The Time Off panel for an email that has no request linked yet

Step 3: Create a request from the email

Choose one of two ways.

Create it yourself

  1. Click Create Time Off.
  2. Odoo opens a new Time Off request. MailDesk fills in the request name from the email subject, the employee (see Employee Resolution), the Default Time Off Type, and today's date as start and end.
  3. Set the real dates and the type, then save.

The Time Off request form opened from the panel and filled in from the email

Let the AI propose it

  1. Click Extract with AI.
  2. Read the AI Time Off draft. It shows Employee, Type hint, From, To, Confidence and the reason. A Missing line lists what the AI could not find.
  3. Click Create draft request to create the request, or Cancel to drop the draft.

What you should see: the request appears in the panel as a card with the employee, type, dates and state. The first linked request carries the Primary badge.

The panel showing the new request as a linked card

What the AI does and does not do

Extract with AI sends the email subject, the sender address and the email text to your AI provider. The request is created only after you click Create draft request. The draft panel is read-only: to change a value, cancel and correct the request in Odoo. The request uses the Default Time Off Type of the mailbox, not the Type hint. The employee comes from the sender's work email, or from the mailbox rules. If no employee or no default type is found, MailDesk shows an error and creates nothing. AI features belong to MailDesk Pro; see AI permissions and data access.

MailDesk never approves

A request created with Create draft request starts in the state set by Create State: Draft or To Approve. A request you create yourself starts as Odoo normally starts it. MailDesk does not approve requests. Approval stays in Odoo Time Off.

  1. In the panel, click Link Existing.
  2. In Link Existing Time Off, choose the Time Off request.
  3. Tick Make Primary if this request should be the main one for the email. (This option appears when the email already has linked requests.)
  4. Click Link Time Off.

The Link Existing Time Off window with the request field

Unlinking is safe

Unlinking removes only the link between the email and the request. The request is not changed or deleted.

Step 5: Check the email in Time Off

Open the request in Odoo. The linked email appears in its chatter with an Open in MailDesk link.

A linked email shown in the chatter of the Time Off request

What you should see: in MailDesk, the toolbar button shows a badge with the number of linked requests.

Log options

The options Log Agent Replies (Time Off) and Log Customer Replies (Time Off) are on the card, but the module does not post a separate message into the request's chatter. The linked email itself is the record.

Absence automation (optional, administrator)

With Enable Absence Behavior on, the mailbox reacts while its employee is on approved leave. Your administrator can set:

  • Absence Mode: Auto-Reply Only, Notify Backup or Auto-Reply and Notify Backup.
  • Backup User: who gets notified.
  • Forward While Absent: an address that receives every incoming email.
  • Absence Auto-Reply: the reply text. You can use {subject}, {from_name}, {from_addr}, {account_name} and {return_date}.

These rules need the Automation module with incoming runs enabled. They apply only while an approved (validated) leave covers the current time for the mailbox's employee. MailDesk finds that employee from Default Employee, then from the mailbox owner's user, then from the mailbox address.

How automatic linking works

When Auto-link by Reply Headers (Time Off) or Auto-link by Subject Token (Time Off) is on, MailDesk links a follow-up email on its own, but only when the match is exact. Both options are on by default. A scheduled action does the work in the background, so the link can appear a few minutes after the email arrives.

  • Reply headers: the reply belongs to an email that is already linked.
  • Subject token: the subject contains [LEAVE-123], [TIMEOFF-123] or [TIME-OFF-123], which names one request.

If it does not work

Symptom Check Safe next step
There is no Time Off Linking & Absence Automation card. Is the module installed? Is the Settings tab open? Install the module, then reload the mailbox form.
There is no Time Off button on emails. Is Enable on for this mailbox? Do you have access to this mailbox? Ask an administrator to turn it on or give you access.
Create Time Off, Extract with AI or Link Existing is missing. The permission options on the card. Ask an administrator to switch on Allow Create Time Off or Allow Link Time Off.
The AI route says the employee or the Time Off type is missing. Does the sender's address match an employee work email? Is a Default Time Off Type set? Set the default type, or use Create Time Off and choose the employee by hand.
Odoo shows an access error. Your Time Off access rights. Ask your Odoo administrator for Time Off access.
No auto-reply is sent while someone is absent. Is Enable Absence Behavior on, the Automation module installed, and the leave approved? Check the leave state in Odoo, then see Automation.

For other problems, see Troubleshooting.

Next step

Automation explains the rules behind absence auto-replies.