How to add token in email connector

0
Hi all, I am first time implementing email connector  in my application. Created the template and added the tokens but I am not understanding how do I pass the tokens(different username) at runtime. What should I change/add in microflow please help me with step by step solution.
asked
2 answers
0

Hello,

 

In your microflow, from EmailTemplate object try to retrieve associated TokenList. 

Then check whether the token list is empty or not, if it’s not empty then use ReplaceEmailTemplateTokens java action and pass the Main object, TokensList, EmailMessage object, DataObject. 





Hope it helps!

answered
0

I usually create an entity (EmailContext) that contains the runtime values. Then I use the CreateEmailFromTemplate microflow from EmailConnector, it’s quite straightforward then.

 So the flow is: 

Create and fill the context object (username etc.) – Retrieve template – Create EmailMessage with CreateEmailFromTemplate – Send the email with the SendEmail java action from EmailConnector

answered