Skip to main content

Screenshot Utilities

Learn how to use the screenshot capture utility steps in Torq.

Updated today

Use a screenshot utility step to generate visual snapshots of web content during workflow executions. These screenshots are stored as temporary files and can be used in later steps. There are two screenshot utility steps:

  • Screenshot HTML: Returns a screenshot image of the given HTML, raw or as a file.

  • Screenshot URL: Returns a screenshot image of the website for a given URL.

How to use

  1. Add the step: Drag and drop the Screenshot URL or Screenshot HTML step into your workflow.

  2. Define parameters: Click on the step to open the Properties panel and define the parameters.

    • Screenshot URL:

      • Enter the URL address, or source from a previous step.

      • Wait for all resources: Define whether the system must wait for all resources to be downloaded before capturing the screenshot.

    • Screenshot HTML:

      • Select the file type (raw HTML or file).

      • Wait for all resources: Define whether the system must wait for all resources to be downloaded before capturing the screenshot.

      • Input file: Enter the base64 hash value or URL to a file containing the raw HTML code to screenshot.

  3. Execution options: In the step Property panel, define the execution options for the step. Options include:

    • Return response as a file: This is set to No by default, and the response is saved as context. Toggle to Yes to return a file link.

    • Create a shareable link: The file can be returned as a tq file accessible in Torq workflows only, or toggle to Yes to return a URL that can be shared externally.

  4. Use screenshot: The screenshot is saved as a file that can be used in later steps. For example, attached to cases, displayed in case notes, or shared via messaging integrations. Outputs include file metadata and a link for downstream use.

Use case

When a new URL observable is added to a Torq case, generate a screenshot and attach it to the case. Add a comment to the case with details on whether the screenshot creation was successful or not.

  1. A new URL observable is added to a case, triggering the workflow.

  2. Use the Screenshot URL step to capture a screenshot of the webpage.

    • The URL address is sourced from the trigger event:

      {{ $.event.associated_observables.current.observable.value.url }}.

    • Toggle Return response as a file to Yes, so that it can be attached to the case.

  3. In parallel to the screenshot capture, defang the URL so it can be added to the case comment.

  4. If the screenshot capture is not successful, add a comment to the case stating that the screenshot failed.

    • For example, Screenshot attachment for URL `{{ $.defang_url.result }}` was not successful..

  5. If the screenshot capture is successful, add it to the case as an attachment.

    • Enter the case ID, give the file a useful name, and reference the step that generated the file.

  6. In the Add comment case step, add a comment to the case in the Text comment field.

    • For example, Screenshot for URL `{{ $.defang_url.result }}` was added as an attachment to the case..

  7. You can view the screenshot in the case as an attachment. You can see the addition of the attachment in the case timeline.

Did this answer your question?