Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How to generate csv file for a particular report through script.

Intakhab Khan
Tera Contributor

Hi,

 

I have a requirement in which there is custom table where we provide report in reference field and MID Server and all and it executes on a daily basis. For which I have to create a script Include where I have to fetch report data as a csv file to send it to the EDH (Enterprise Data Hub).

Please help me to convert a report data into csv file through scripting.

 

Thanks,

Intakhab Khan

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Intakhab Khan 

if you create a scheduled report for your report and keep type as CSV, it will create a attachment and that you can use to external system

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@Intakhab Khan 

if you create a scheduled report for your report and keep type as CSV, it will create a attachment and that you can use to external system

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Dr Atul - LNG
Tera Patron

Hi @Intakhab Khan 

 

 

No need to create the script, if you are in the report you can do under scheduling

 

AGLearnNGrow_0-1738831127097.png

 

****************************************************************************************
Regards
Dr Atul G. - Learn N Grow Together ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
******************************************************************************************

Hi @Intakhab Khan 

 

Is something wrong in my answer? so that i can improve.

****************************************************************************************
Regards
Dr Atul G. - Learn N Grow Together ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
******************************************************************************************