Monthly Email with Excel Attachment from a Table

Tejas Adhalrao
Mega Sage

Hi  ,

I have a requirement to automatically send a monthly email containing all records from a table as an Excel attachment.

What is the best way to achieve this in ServiceNow?

Ideally, the solution should:

  • Generate an Excel file with all records from the table.
  • Run automatically every month.
  • Email the Excel file to a list of recipients.

Has anyone implemented a similar requirement? Any guidance or best practices would be appreciated.

Thank you!

2 REPLIES 2

Mark Manders
Tera Patron

Scheduled report/scheduled export.

But be aware that there are limitations to the size of the attachment and the number of records. Not every table can be exported entirely. 

HasanM
Tera Guru

Hi @Tejas Adhalrao ,

You can do this out of the box with a Scheduled Report, no code needed:

  1. Create a List report on your table with the columns you need, and save it.
  2. From the dropdown next to Save, select Schedule. Set Run to Monthly, Type to Excel, and add your recipients (users, groups or email addresses).
  3. Use Execute Now on the schedule to test it.

Points to note: Excel export limits and email attachment size limits mean large tables may be cut off or fail to send. The report also runs as the schedule's "Run as" user, so check what data that user can see. For very large tables, consider an Export Set instead.

If this answer helped you, please mark it as Helpful and Accept as Solution so others with the same question can find it.