Add tag to payload through Workflows

@Fidelicatessen Still unable to find a way to add tags to the payload being sent through workflows, do you know when support for those will be added or if it’s already added but no documented?


Hi @karanpreet.singh

I think the tags must be added before workflows – workflows filters on the tags already present.

You can add tags to the entity and you can add tags to the alert condition – both of these will result in tags coming through in the payload which the workflow can then filter on.

If you need to add tags after the issue has already been created, at the stage where the workflow is filtering issues and notifying, I’m not certain that’s possible. @mmoser2 may know something I don’t, though.

@Fidelicatessen The entities already have tags added but I can’t find a way to send the tags in the payload to the webhook. The variables in the documentation don’t mention anything about tags.

Hello @karanpreet.singh,

I just wanted to reach out to let you know I have moved your two posts as well as the reply from @Fidelicatessen to its own thread for visibility. We will continue to provide further support as needed here so please do not hesitate to ask any questions you may have!

@karanpreet.singh It is possible today. Apologies for not showing an example in the doc.
Can you share your webhook template here, sanitized for sensitive data.

@karanpreet.singh , Sorry for the softness of this reply.
This is not my specific area of expertise. I am about to validate this answer, but I figured I would go ahead and share it here first. I am told that if your tag’s name is “foo”, then you would use this in your Webhook Template :
{{ json }}
Note that accumulations is plural, and tag is singular.
I will validate this as well, and ensure the docs are updated.

Tried this, and it did not work for me. See the source field below.

	"id": {{ json issueId }},
	"issueUrl": {{ json issuePageUrl }},
	"title": {{ json annotations.title.[0] }},
	"priority": {{ json priority }},	
	"alertPolicyNames": {{ json accumulations.policyName }},
	"alertConditionNames": {{ json accumulations.conditionName }},  
  	"destinationField_1": {{json Enrich1}},
	"workflowName": {{ json workflowName }},
  	"description" : {{json annotations.title}},
   	"details": {{json annotations.description}},  
   	"source3": {{json "$TARGETS"}},
	"source": {{json accumulations.tag.Myappid}}

Thank you for reaching out @pvangala. I am looping in a support engineer as this is a bit out of my scope and I want to make sure you get the right help. The team will get a response out to you shortly. If you have any changes or updates on your end please reach out and let us know.

@pvangala - I believe the issue with your payload is "source3": {{json "$TARGETS"}},. You will need to be using accumulations to pass these targets. The $TARGETS variable is an array so it may not be compatible with the endpoint where you are receiving this.

1 Like