I know you can view the logs and export them from Orchestrator as CSV after completing an automation…is there a way that I can have the robot do this automatically and send as an email prior to completing in the workflow?
sure, you just insert logs to an excel/csv file during robot execution using the excel scope or other csv activities, then put a send outlook mail activity before the last activity of your flowchart (with attaching the log csv file)
Thanks Shan, I just wanted to confirm there is no other way vs doing it manually by appending logs to .csv or .xlsx file. It’s nice because after execution you can export a clean .csv file with the Time, Level, Process, User and Message columns all formatted, so I wasn’t sure if I could automate the effort of simply exporting the file vs creating it manually while the robot runs.
Have you tried using an “Orchestrator HTTP Request” to download the csv straight from Orchestrator at the end of your process?
https://<server>/odata/RobotLogs/UiPath.Server.Configuration.OData.Reports?$filter=(JobKey eq <job key>)
Thanks @qbrandon! I didn’t think to try this, I will give this a shot today and see if that gives me what I need. Appreciate your input.
This is definitely on the right track, question is how can I build into the workflow to get the jobID to feed the request? I was able to do it manually through view the logs in Orchestrator but ideally I would want to have the robot do it all.
How to determine the jobId depends a lot on your use case, but you can start by running GetJobs and filtering by:
- MachineName
- ProcessName
- States
I could really use this solution for my automated processes but I have no idea on how to use the “HTTP Request” activity, could you please post an example so I can use? Thank you!
Main.xaml (6.0 KB)
Tested with 2018.1.3.
Note that on Orchestrator, I had to create a Role with only Log View privileges, and added that role the relevant robot user (by default, robot users do not have permission to access Logs)
Thank you for your quick response!
Unfortunately when I open your xaml I got the following error:
Can it be because I do not have the proper package installed? The Activity you use is “HTTP Request” right?
This activity requires at least 2018.1
Can you share what version you are using?
When I try to use the Get Jobs activity I am unable to create a variable for the output…I get a blue exclamation error saying Type “OrchestratorJobs” does not exist. Any ideas on that?
Hi qbrandon, sorry for my late response.
I’m using Studio version 2017.1.6522
Can this be achieved with the activity “HTTP Request”?
This is less convenient, but yes, this can be achieved with the HTTP Request activity.
You will need to:
- login (get a session token in exchange of a username/password)
- request the Report using the URL mentioned here-above.
The process is described here (Authentication):
The 2018.1 Orchestrator HTTP Request is more convenient because it automatically uses the robot credentials rather than have you manually handling user credentials.
Again, make sure that whatever user is used for auth, it needs to have the appropriate Orchestrator permissions.
Sorry for bumping an old topic but this seemed the most relevant. When calling /odata/RobotLogs/UiPath.Server.Configuration.OData.Reports() to retrieve a Log report the response type is file. How is this used with the “Orchestrator Http Request” activity as I can’t seem to map the response to any of the outputs or specify the file location etc? Thanks
In that case the “JSONResponse” string output is actually receiving the the raw CSV data which you can save to a file using Write Text File to a .csv
file. Again, your robot needs to have a role with log viewing permission.
Can someone please tell me how to export UiPath Orchestrator logs to csv file? I want to do it manually. I cannot see export button anywhere. If someone could share screenshot of where to click and export logs to csv, that would be great.
How to export them? Can you please share screenshot? Because in UiPath orchestrator, I cannot see Export option anywhere.