sending notification email in AEM using template | Community
Skip to main content
shikhasoni1
New Participant
January 29, 2025
Solved

sending notification email in AEM using template

  • January 29, 2025
  • 3 replies
  • 881 views

Hi

 

I am using AEM Cloud. I want to send email notification to owner and one team when an asset version is created. This email template should be from crx/de. How can i include email template in the workflow step and where can i create email template in crx/de? How to make some of the fields configurable in aem wf model ?

 

one more question : Is implementing launcher or creating event is recommended to start the workflow on an event.

 

@arunpatidar 

Best answer by MonalikaKapoor

Hi @shikhasoni1,
You can create your email template node (e.g., under /apps/your-project/email-templates) in CRX/DE and include placeholders (using AEM Expression Language) for dynamic fields.

In your workflow model, add a “Send Email” process step and configure the step to read the email template from its CRX/DE path and bind configurable fields (like recipient, subject) using workflow variables (e.g., ${wf:variableName}) defined via the step’s dialog. Expose configuration properties via the workflow step dialog and use these properties in your email template by referencing them with Expression Language. You can use a launcher (workflow launcher configuration) to trigger the workflow when an asset version is created. Launchers are preferred over custom events as they are built-in, robust, and require less custom coding.

You may check these documentations for more details:

3 replies

kautuk_sahni
Employee
February 10, 2025

@shikhasoni1 Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
MonalikaKapoor
MonalikaKapoorAccepted solution
Employee
February 4, 2025

Hi @shikhasoni1,
You can create your email template node (e.g., under /apps/your-project/email-templates) in CRX/DE and include placeholders (using AEM Expression Language) for dynamic fields.

In your workflow model, add a “Send Email” process step and configure the step to read the email template from its CRX/DE path and bind configurable fields (like recipient, subject) using workflow variables (e.g., ${wf:variableName}) defined via the step’s dialog. Expose configuration properties via the workflow step dialog and use these properties in your email template by referencing them with Expression Language. You can use a launcher (workflow launcher configuration) to trigger the workflow when an asset version is created. Launchers are preferred over custom events as they are built-in, robust, and require less custom coding.

You may check these documentations for more details:

New Participant
February 6, 2025

you can create the workflow and sendEmail service which can read the templates from aem template .You need to setup SMTP configuration for sending an email .

arunpatidar
New Participant
January 29, 2025