Skip to main content
Solved

Template Engine

  • January 27, 2025
  • 12 replies
  • 40 views

vanitharaj1208
Forum|alt.badge.img+14

Hi All, I'm trying to display who is enrichment result and this code works and displays it

But twice 

How to display it once and iterate using Entity.Identifier

 

Best answer by Kyle_M

but how to do in this action - Template engine Insight


To continue using the Entity Insight action, you would need to write a different template that does not loop over the JSON result for each entity. Instead you would access the keys directly.  For example here is my Entity Insight action where I created a simple template that partially replicates the one from your screenshot

This will be the output on the alert view:

Please let me know if you have any other questions

12 replies

vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 27, 2025

Can anyone suggest best way to resolve this


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 27, 2025

 

previously i used below syntax it works for only one ip but not for multiple ip 


Kyle_M
Staff
Forum|alt.badge.img+3
  • Staff
  • January 28, 2025

Hi @vanitharaj1208 

The action you are using will iterate over each entity and create one insight per entity with the template you created.  If the expected outcome is to have one insight with the details for each entity, then you can try using the Render Template action.  From there you can pass the ScriptResult to the Add General Insight action from the Siemplify integration. 


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 28, 2025

Hi @vanitharaj1208 

The action you are using will iterate over each entity and create one insight per entity with the template you created.  If the expected outcome is to have one insight with the details for each entity, then you can try using the Render Template action.  From there you can pass the ScriptResult to the Add General Insight action from the Siemplify integration. 


but how to do in this action - Template engine Insight


Kyle_M
Staff
Forum|alt.badge.img+3
  • Staff
  • Answer
  • January 29, 2025

but how to do in this action - Template engine Insight


To continue using the Entity Insight action, you would need to write a different template that does not loop over the JSON result for each entity. Instead you would access the keys directly.  For example here is my Entity Insight action where I created a simple template that partially replicates the one from your screenshot

This will be the output on the alert view:

Please let me know if you have any other questions


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 29, 2025

To continue using the Entity Insight action, you would need to write a different template that does not loop over the JSON result for each entity. Instead you would access the keys directly.  For example here is my Entity Insight action where I created a simple template that partially replicates the one from your screenshot

This will be the output on the alert view:

Please let me know if you have any other questions


sure ill try it


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 29, 2025

Hi @vanitharaj1208 

The action you are using will iterate over each entity and create one insight per entity with the template you created.  If the expected outcome is to have one insight with the details for each entity, then you can try using the Render Template action.  From there you can pass the ScriptResult to the Add General Insight action from the Siemplify integration. 


if i use render template action and pass it general insight it shows this 

 


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 29, 2025

To continue using the Entity Insight action, you would need to write a different template that does not loop over the JSON result for each entity. Instead you would access the keys directly.  For example here is my Entity Insight action where I created a simple template that partially replicates the one from your screenshot

This will be the output on the alert view:

Please let me know if you have any other questions


Hi @Kyle_M , Screen shot is blur


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 29, 2025

To continue using the Entity Insight action, you would need to write a different template that does not loop over the JSON result for each entity. Instead you would access the keys directly.  For example here is my Entity Insight action where I created a simple template that partially replicates the one from your screenshot

This will be the output on the alert view:

Please let me know if you have any other questions


Hi @Kyle_M , it works but entity  value is not reflecting

i have used same code.. let me know where am i making mistake

 

 


Kyle_M
Staff
Forum|alt.badge.img+3
  • Staff
  • January 29, 2025

Hi @Kyle_M , it works but entity  value is not reflecting

i have used same code.. let me know where am i making mistake

 

 


@vanitharaj1208 My apologies, that was an outdated screenshot. Please make the I in identifier uppercase and it should render: entity['Identifier']


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 29, 2025

Hi @Kyle_M , it works but entity  value is not reflecting

i have used same code.. let me know where am i making mistake

 

 


it works if it is captital I in Identifier for me...


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • January 29, 2025

To continue using the Entity Insight action, you would need to write a different template that does not loop over the JSON result for each entity. Instead you would access the keys directly.  For example here is my Entity Insight action where I created a simple template that partially replicates the one from your screenshot

This will be the output on the alert view:

Please let me know if you have any other questions


Thank you so much @Kyle_M ... it helped me to solve the requirement..