Skip to main content
shikhasoni1
Level 3
Jan 29, 2025 3:20 PM UTC
Solved

sending notification email in AEM using template

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 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
MonalikaKapoor
MonalikaKapoorAccepted solution
Adobe Employee
Feb 4, 2025 9:39 AM UTC

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:

4 replies

arunpatidar
Community Advisor
Community Advisor
Jan 29, 2025 3:25 PM UTC
MonalikaKapoor
Adobe Employee
MonalikaKapoorAdobe EmployeeAccepted solution
Adobe Employee
Feb 4, 2025 9:39 AM UTC

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:

Translate
Level 2
Feb 6, 2025 2:24 PM UTC

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 .

Translate
kautuk_sahni
Level 9
Feb 10, 2025 10:30 AM UTC

@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!

Translate
Kautuk Sahni