send email with dynamic data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 03:32 PM
Hi, I'm trying to send an email with dynamic data.
I made a task with 'Email template', 'Email subject', and 'Email body' fields. When a user selects an email template from the 'Email template' field, 'Email subject' and 'Email body' field will auto-populate with the email template's subject and body values.
When the task is closed complete, it will trigger a flow that sends an email with the task's 'Email subject' and 'Email body' field values.
Email body contains dynamic data such as ${parent.subject_person.name}. I expected the query to get the date from task record, but when I checked the sent email, the dynamic data querys were printed as it is.
How can I make the query work? and at which point should the query be substituted with actual data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 08:54 PM - edited 03-03-2025 08:54 PM
Hello @YounseoC ,
Can you please share the code you are using to populate the data in your email body?
If you found my response helpful, please mark it as correct and close the thread to benefit others.
Regards,
Kaustubh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:00 PM
it won't be evaluated on the fly.
It won't work that way
Please share entire configuration script etc for this.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 10:10 PM
Client Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 10:12 PM