- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-19-2022 09:44 AM
We publish guides/playbooks on a 3rd party site for our analyst to use when troubleshooting an incident.
that 3rd party site has an api.
I've successfully pulled the guide / page into the warroom and it displays and returns correctly using return_results
return_results(decoded_contents)
However, I want to take the decoded_contents and dump them onto a new tab in the incident layout.
I created a long text field and tried doing the following:
demisto.executeCommand("setIncident", {'customFields': {"teplaybookdetail": "decoded_contents"}})
This throws the following error:
"Error from Scripts is : Script failed to run: Error: Failed to decode (loop) data from docker code script: invalid character '{' after object key:value pair This may happen when you don't return an explicit entry (or entries) from a script. for entry structure please review the 'Script Helper' (2605) (2604) (2603)"
I've successfully used the same command to set other fields.
Any thoughts or advice?
Thanks,
Boyd
09-27-2022 04:38 PM
Hi @JoshBoyd – I was not able to replicate this error, but the following, slightly simpler line of code should also work; please give this a try:
demisto.executeCommand("setIncident", {"teplaybookdetail": "decoded_contents"})
If that still doesn't work, could you share the full YML file of your script?
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!