Get the output of demisto.results() inside an automation for "msgraph-download-file"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get the output of demisto.results() inside an automation for "msgraph-download-file"

L4 Transporter

Hello,

We'd like to use the command "msgraph-download-file" insde an automation, then use the FileID to import a csv and finally convert it to pandas. The problem we find is that the output of "msgraph-download-file" is completely different when it's is used inside an automation.

How can we get this file inside an automation?

3 REPLIES 3

L4 Transporter

Josep_0-1684500120813.png

 

L4 Transporter

How about just opening the file with the automation after the playbook downloads and returns it?

 

Pass in the entryid of the file to the automation, and just have the automation go open it?

 

entry_id = demisto.args().get('entry_id')

res = demisto.getFilePath(entry_id)
if not res:
    return_error("No file with that entry id found")

file_path = res.get("path")

with open(file_path, 'rb') as f:
    data = f.read()

# do something with the data.

 

 

Thanks for the response,

we'd like to all the process inside the automation, download the file, open it and finally convert it to pandas.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!