How to add a tag to the “Tags” field in the Alert [em_alert] table using a script in subflow?

Snowl13052025
Tera Contributor

Hi everyone,
I’m trying to add a tag to the Tags field in the Alert [em_alert] table using a script in subflow. Could someone please help me with the correct script or method to do and use in subflow.

I’d appreciate it if you could also explain 

Thanks in advance!

1 ACCEPTED SOLUTION

Sanjay191
Tera Sage

Hello @Snowl13052025 
Please follow the below steps and i hope this work for you and if any think else please let me know
1.Create a flow to call the subflow .

Sanjay191_0-1749454691137.png

2.Create a subflow to write a script in custom action(pass input as  alert record sysId) as per your requirement.

Sanjay191_1-1749454751310.png

3. Created a custom action for the script logic and create a tag to associate with particular created alert.

take input of record sys_id

Sanjay191_2-1749454941691.png
and script logic that create the tags(that store in label table)

Sanjay191_3-1749454966340.png


Sanjay191_0-1749455873828.png

 




this above is for the script logic and if you want to use flow actions you can also do by using the flow action to create the tags so you did not need to write the script logic and all.
please refer the below you Tube video better idea 

https://www.youtube.com/watch?v=gpanlZsAq0w

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You



View solution in original post

2 REPLIES 2

Sanjay191
Tera Sage

Hello @Snowl13052025 
Please follow the below steps and i hope this work for you and if any think else please let me know
1.Create a flow to call the subflow .

Sanjay191_0-1749454691137.png

2.Create a subflow to write a script in custom action(pass input as  alert record sysId) as per your requirement.

Sanjay191_1-1749454751310.png

3. Created a custom action for the script logic and create a tag to associate with particular created alert.

take input of record sys_id

Sanjay191_2-1749454941691.png
and script logic that create the tags(that store in label table)

Sanjay191_3-1749454966340.png


Sanjay191_0-1749455873828.png

 




this above is for the script logic and if you want to use flow actions you can also do by using the flow action to create the tags so you did not need to write the script logic and all.
please refer the below you Tube video better idea 

https://www.youtube.com/watch?v=gpanlZsAq0w

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You



Thank you for your time @Sanjay191 😊