- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-31-2024 04:47 PM
I am attempting to create an email from an HTML template but am receiving an error stating "Item not found (8) on list..." followed my the HTML contents of my saved list. I am sure it is looking for the key attribute that is required for the script, however I am not sure what it is asking for.
Based on docs, the key argument is the "The context key to store the HTML body". I did some searches but am still confused on what it is needing to successfully execute.
Cortex XSOAR
02-01-2024 09:59 AM
@CodyReavis Is it possible that the HTML template has a context key variable in ${} notation and the key is not present in the context? Please upload some screenshots if possible.
Thanks,
Rahul Vijaydev
02-01-2024 10:03 AM
Absolutely, so here is the variables set
The listTemplate is taken directly from XSOAR while the incident.details is taken from and ID I set in the HTML.
Here is the output of the error:
To me, that is signifying that it cannot find the key, but I am still unsure what that context key is based on the docs I have read here:
https://xsoar.pan.dev/docs/reference/scripts/create-email-html-body
02-02-2024 02:00 PM
I see the problem. The list template should be the name of the list only and not part of the ${} notation. for ex. !CreateEmailHTMLBody listTemplate=DefenseStormAlertTemplate ...
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!