Automation to Print output and set tag in warroom

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

Automation to Print output and set tag in warroom

L1 Bithead

Trying to create an automation to print output in the warroom, which works. 




Only thing is how can I give a tag automatically to the output in the warroom. 

I want to give the tag "Handover" to this output for example. 


Does anymore have any idea? 


L1 Bithead

Hi there, you have two ways to achieve this. 
1. Use CommandResults() to return the results in your automation instead of print function. Use Script helper for all the options with CommandResults(). You will see an option to tag the results.
2. If you are going to ultimately run this automation in a playbook task then you can just select an option in the playbook task to tag the results automatically. You have to navigate to the details section in the playbook task and type in the tag you want the result to be tagged with.

L1 Bithead

Hi Akoppad,
It's working now, was able to solve it with the following in my automation : 

# Retrieve the value of specific fields from Demisto
incident = demisto.incidents()[0]
field1 = custom_fields.get('handoversummary')
field2 = custom_fields.get('ongoingactionshandover')
field3 = custom_fields.get('handoveraction')


# Set the value of my_variable
my_variable = f"Handover Summary :\n {field1}\n\n Ongoing actions :\n {field2}\n\n Handover action :\n {field3}"


# Update the War Room with the variable value and custom tag
'Type': entryTypes['note'],
'ContentsFormat': formats['markdown'],
'Contents': '## handover \n\n {}\n'.format(my_variable),
'Tags': ['Handover']

  • 2 replies
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!