Expand my Community achievements bar.

SOLVED

sending notification email in AEM using template

Avatar

Level 4

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 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

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:

View solution in original post

4 Replies

Avatar

Community Advisor

Avatar

Correct answer by
Employee

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:

Avatar

Level 2

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 .

Avatar

Administrator

@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