Attach list of records as an excel or CSV to email notification

Sanjay Sharma
Tera Expert

Hi,

My requirement is to attach list of records as an excel or CSV to email notification that is triggered by an UI action.

I know this can be done as a schedule report as per https://community.servicenow.com/community?id=community_blog&sys_id=abfde62ddbd0dbc01dcaf3231f961921 post but I want to send this email attachment when an event is trigger and generate excel/CSV file on-the-fly based on dynamic query.

Could any one please tell how can I accomplish it.

Thanks in advance.

1 ACCEPTED SOLUTION
5 REPLIES 5

sethivarun
Kilo Guru

hi,

what is the dynamic query that is being referred here? is it dynamic as in user isdynamic me kind of? OR, something else

Sanjay Sharma
Tera Expert

Here is Use case,  I have UI page that display data in a list view where a user make changes to status of a field to flag the data be included in Email notifications that is triggered by button action. 

I am able to capture user selections along with query parameters in the 'Processing script'  and thereby get the data to be sent via an email notification by using glide query. However,  I need advice on how to attach the these records as an excel/csv attachment to email notification that is triggered by event using gs.eventQueue().

Hope this make sense.

@sethivarun 

The 2nd link is not active 

 

Can you reshare the stuff.

Thanks