Export from Workflow to Excel csv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2018 01:02 PM
Hi,
I am trying to figure if I am able to export variables from a workflow to an excel csv.
The process for our terminations is that we have a PowerShell script that disables the user, but it also appends to an excel csv a log of the user that was terminated. Now that we have moved to ServiceNow, my manager would like for the workflow to continuing adding to that csv log every time a termination occurs.
Can this be done? If so, please advise how would I go about it.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2018 01:23 PM
Anything and everything is possible but if your manager wants to have a record of it, would it be a good idea to keep that record in Servicenow? That way you can create reports of it and export to excel or csv if you like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2018 01:39 PM
Yes, that would be better. However, one of the main reasons that we need this is because when a user is terminated, HR grants access to that terminated users mailbox to the manager. We have a log that exports out that information to a csv on our team server and then every morning a Powershell Script runs and checks to see if 60 days have passed to remove that manager's rights to that mailbox.
So I need to have that option to export until I can work something in ServiceNow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2018 01:55 PM
Alright, well there are a multitude of ways to do it and it depends on what is activated in your SN and/or other APIs. If you have orchestration you can run powershell scripts from a workflow and you should be able to update a csv-file using that. If you dont have that it gets a bit trickier but we are doing something similar by having a rest webservice that can update the CSV file from rest messages from SN.
Not aware of an ootb feature that you can just activate, especially when the CSV-file has a really specific format which I'm guessing it does since you run scripts based upon it.