- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 08:08 AM
I have a requirement to send an email with an excel attachment containing the records based on a query in a custom table.
Detailed Explanation:
1) Email should be triggered to Department head after 35 days when users in that department doesn't made response to tasks in custom table.
2)There are multiple departments and each department head to receive an email with attachment containing the users from their department.
Kindly advice if there is a way to achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:16 AM
Hello @Dharaneetharan
Sorry, I forgot to share the document.
How to generate excel file from a script in Servic... - ServiceNow Community
Here, you can refer.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:15 AM
you cannot generate excel as an attachment and add to record
why not use CSV?
how is your flow configured to run now?
you can use custom flow action and use script to create CSV file and then attach it to your record and then send email using Notification and in that notification use "Include attachment" checkbox
Generate CSV file through script
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