Automatically add attachments like screenshots, source code, and other relevant documents to cases. This ensures that all essential information and context are included, boosting the accuracy of investigations.
Learn how to use attachments during a case investigation.
At this stage, we recommend avoiding potentially malicious files as attachments, as other users may accidentally download and open them.
Automatically Managing Attachments: Essential Steps
Efficiently manage case attachments using steps provided by Torq:
Add attachment to case
Get attachment download link
List case attachments
Remove attachment from case
Adding an Attachment
To add an attachment to a case, use the Add attachment to case step. You will need to:
Name the Attachment: Give the attachment a descriptive name.
Select the Input Type:
Raw Data: Input raw data directly from the workflow context to save as a file attachment.
File: Provide file content either in base64 format or via a file URL to attach it to the specified case.
File links can be available through trigger events or steps configured to return the output as a file. By default, file links are non-shareable and have the format: tqfile://steps/XXXXXXX
. These links require the file
function to access the file content and add it as an attachment to a case:
{{ file $.<path_to_non_shareable_file_url> }}
. Read more about working with files.
Accessing an Attachment
Use the Get attachment download link step to generate a downloadable link for an attachment.
To get the file content into the workflow context, use the Send an HTTP Request step with the GET method and provide the link as the URL input (read more).
Including Images in Case Descriptions or Notes
To add images:
Attach the Image: Use the Add Attachment to Case step to upload the image.
Embed the Image: Use the
static_link
output field from the Add Attachment to Case step to insert the image into the case description or notes. In the Change Case Description or Add a New Note to Case steps, apply the following HTML tag (adjusting the path based on the step name):<img src="{{ $.add_attachment_to_case.attachment.static_link }}">
Example: Adding a Screenshot to a Case
The output from the Screenshot HTML step is saved as a file and attached to the case.
The
static_link
is then used to display the screenshot directly in a note.
Saving the screenshot as a file is optional. This process will also work if the screenshot is passed as a Base64 string directly to the Add Attachment to Case step.