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

Who rated this post

L3 Networker

Hi SanDev, all output is queued to display after the automation finishes which is why demisto.results doesn't work. The only way around this would be to use the Demisto API to call the Print command to print to the war room. Here is what I did to test this functionality:

 

import time

i = 1
id = demisto.incident().get("id")

while i < 3:
    body = {
	    "investigationId": id,
	    "data": f"!Print value=`I have looped {i} times.`"
    }
    
    demisto.executeCommand("demisto-api-post", {"uri":"/entry", "body": body})
    time.sleep(1)
    i += 1
    
return_results("All Done")

 

 

Hope this helps!

View solution in original post

Who rated this post