Currently a workflow only has access to the object that started the workflow and its parent. For example, a workflow started from an Incident only has access to the incident. A workflow started on an Artifact has access to the Incident and the Artifact.
It sounds like you want to do something with artifacts from a workflow started from an Incident. In that case it would be necessary to build your own Function and either bundle it into an App and deploy to an AppHost or run the Function on an integration server.
This is definitely a pain point. There is a roadmap item to provide an easy way to get access to all the incident data (tasks, artifacts, notes, etc) from any workflow but that isn't available yet.
Ben
------------------------------
Ben Lurie
------------------------------
Original Message:
Sent: Wed May 19, 2021 08:55 AM
From: Paweł
Subject: VirusTotal Function for SOAR - error function in manual task - artifact is not defined
Hmmm, but workflow should start after escalated and use first rule based on incident, so how can I use functions working on artifact in workflow? I hope there is no need to creating another rule for every function working in one workflow?
------------------------------
Paweł
Original Message:
Sent: Wed May 19, 2021 07:10 AM
From: Ben Lurie
Subject: VirusTotal Function for SOAR - error function in manual task - artifact is not defined
What is the Object Type specified for the workflow? And what is the rule configuration that starts the workflow?
Ben
------------------------------
Ben Lurie
Original Message:
Sent: Tue May 18, 2021 10:36 AM
From: Paweł
Subject: VirusTotal Function for SOAR - error function in manual task - artifact is not defined
Hello,
I facing problem with VirusTotal function in workflow. If I using manually on artifact, all works fine, but in workflow I get error (name 'artifact' is not defined) message like on screen below. The error occured after I tried mark task as a complete, then next step in workflow is virustotal function.
Does anyone have an idea, what could be wrong?
#virustotal
Regards

Pre-Process Script
typeLookup = { 'Email Attachment': 'file', 'Malware Sample': 'file', 'Malware MD5 Hash': 'hash', 'Malware SHA-1 Hash': 'hash', 'Malware SHA-256 Hash': 'hash', 'Other File': 'file', 'RCF 822 Email Message Fife': 'file', 'File Name': 'filename', 'URL': 'url', 'IP Address': 'ip', 'DNS Name':'domain'}if artifact.type in typeLookup: inputs.vt_type = typeLookup.get(artifact.type, artifact.type)else: inputs.vt_type = artifact.typeinputs.incident_id = incident.idinputs.artifact_id = artifact.idinputs.vt_data = artifact.value
Workflow

------------------------------
Paweł
------------------------------