diff --git a/content/applications/productivity/ai.rst b/content/applications/productivity/ai.rst index a636aec736..f62839d6ca 100644 --- a/content/applications/productivity/ai.rst +++ b/content/applications/productivity/ai.rst @@ -91,4 +91,5 @@ Below are some common requests that the *Ask AI* agent can assist with: ai/webpage ai/live-chat ai/server-actions + ai/email-templates ai/voice diff --git a/content/applications/productivity/ai/email-templates.rst b/content/applications/productivity/ai/email-templates.rst new file mode 100644 index 0000000000..0ba5f45fc7 --- /dev/null +++ b/content/applications/productivity/ai/email-templates.rst @@ -0,0 +1,63 @@ +===================== +AI in email templates +===================== + +.. |AI| replace:: :abbr:`AI (artificial intelligence)` + +Odoo allows |AI| prompts to be embedded directly into email templates. + +When an email is sent, the prompt is evaluated in context, and the generated content is inserted +into the message automatically. This feature makes it possible to create dynamic, personalized +emails at scale, while keeping templates concise and reusable. + +An AI-enabled email template contains one or more AI prompts that are evaluated at send time. Unlike +static templates, AI prompts: + + - Adapt the message content to the current record + - Use available context such as customer data, document content, or related records + - Generate natural language text automatically + +How AI prompts are evaluated in email templates +=============================================== + +When the database creates an email based on a template with an AI prompt, the prompt uses the +current record as context to complete the prompt's objective. If the email is sent in bulk, the +prompt is evaluated separately for each record. This allows a single template to produce +personalized content for multiple recipients. + +Adding an AI prompt to an email template +======================================== + +First, navigate to :menuselection:`Settings --> Technical --> Email Templates`. + +.. note:: + :ref:`Developer mode ` needs to be activated to view the *Technical* + menu. + +Select an existing template, or click :guilabel:`New` to create a new one. In the body of the +template, type `/`, to open the :ref:`powerbox `. Select +:guilabel:`Prompt` from the drop-down menu. This adds a banner to the template. In the banner, +enter a prompt describing the expected output. + +To utilize :ref:`dynamic placeholders ` within the prompt, type +`/`, then select :guilabel:`Dynamic Placeholder` from the drop-down menu. + + .. image:: email-templates/template-prompt.png + :alt: An email template with an AI prompt. + +.. note:: + Dynamic placeholders reference specific fields within the database to produce unique data in the + template. Adding these placeholders is what allows the database to customize the email based on + the record referenced. + +Example use cases +================= + +- Sales follow-ups: Automatically generate tailored follow-up emails based on opportunity stage, + customer activity, or recent communication. +- HR communication: Generate personalized onboarding or interview emails based on application or + employee data. +- Project updates: Create progress summaries using task descriptions and recent activity. + +.. seealso:: + :doc:`../../general/companies/email_template` diff --git a/content/applications/productivity/ai/email-templates/template-prompt.png b/content/applications/productivity/ai/email-templates/template-prompt.png new file mode 100644 index 0000000000..4b43b06baf Binary files /dev/null and b/content/applications/productivity/ai/email-templates/template-prompt.png differ