- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
07-09-2023 07:57 AM
Trying to create an automation to print output in the warroom, which works.
print(handover)
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?
07-10-2023 07:11 AM
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.
07-10-2023 07:16 AM
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
demisto.results({
'Type': entryTypes['note'],
'ContentsFormat': formats['markdown'],
'Contents': '## handover \n\n {}\n'.format(my_variable),
'Tags': ['Handover']
})
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!