Original Message:
Sent: Mon April 20, 2026 05:31 PM
From: Mykhailo Honcharov
Subject: Script action won't add tags
Indeed my trigger is set to Incident Automatic but that should not be an issue as the documentation clearly states that incident.addArtifact:
Adds an artifact to the incident with the provided type, value, and description. Returns an artifact script object for further customization.
So I'm not entirely sure why can't I just run artifact.addTags on artifact returned by incident.addArtifact. And yet again I stumble upon the thing with IBM QRadar SOAR that there is still so much hustle to perform a simple operation that should be or even documented to be possible with a quite low effort. Odd...
------------------------------
Mykhailo Honcharov
Original Message:
Sent: Mon April 20, 2026 01:57 AM
From: Yohji Amano
Subject: Script action won't add tags
Hello Mykhailo.
I think you run the script where object type is incident.
I'm afraid that addTags is the method which is related to artifact object.
In this context, addTags can be used where object type is artifact.
Though it's not elegant, but I think the following is one of ways:
(substitute the hard-coded parts for your fits.)
1. create a custom field like a artifact_tag with json type.
2. create a script with the condition that object type is incident
ex.
---
import json
# tags are temporarily stored in incident custom field
artifact_tags = ['ioc1','ioc2']
incident.properties.artifact_tags = json.dumps(artifact_tags)
# add artifact to the incident
incident.addArtifact('IP Address', '1.2.3.4', 'test ip')
---
3. create a script with the condition that object type is artifact'
ex
---
import json
tags = json.loads(incident.properties.artifact_tags) # loads tags data from incident custom field
artifact.addTags(tags) # add tags
---
4. create a rule to run the script created in 3 with
- object type is artifact
- artifact is created
Then invoke the script created in 2.
Then by creating an artifact in 2. script, script 3. is subsequently invoked.
------------------------------
Yohji Amano
Original Message:
Sent: Fri April 17, 2026 05:39 AM
From: Mykhailo Honcharov
Subject: Script action won't add tags
Hello community,
I'm trying to add tags to my enriched artifacts within a single script action:
for alert in alerts: ip_artifact = incident.addArtifact('IP Address', alert.get('ip'), 'test artifact') ip_artifact.addTags(['ioc'])
addArtifact function is described as the one returning artifact script object to interact with further down in script so I guess artifact.addTags should apply to it as well. However, unfortunately, it does not - addTags have no result. The artifact is successfully created but without any tags in it. Am I missing something here?
------------------------------
Mykhailo Honcharov
------------------------------