Get notification on failed workflows
  • 20 Feb 2024
  • 1 Minute to read
  • Dark
    Light

Get notification on failed workflows

  • Dark
    Light

Article Summary

When a workflow fails, you must identify and fix the issue quickly. You have several options to receive a notification when a workflow fails.

🗒️ Note
  • Workflow failure notifications are on the workflow level, and you must set the notification method and recipients for each workflow. Alternatively, you can set a global System Event alert upon workflow failure. 
  • Only published workflows will generate a failure notification.

Set up notifications

  1. Go to the Workflows page.
  2. Click the three-dot menu button.
  3. Select Manage notifications.

Manage notifications for a failed workflow

Email and webhook

Set the email address list and webhooks in the manage notification window. 

Set email list and webhook to notify on failed workflow

Email

Both organizational and external email addresses are supported. The email notification includes information about the execution failure:

  • Workspace name
  • Workflow name
  • The entity that triggered the workflow
  • Event ID
  • Date and time the workflow failed
  • Step on which the workflow failed

Failed workflow email notification

Webhook

A JSON event containing the failure information is sent to all webhooks listed in the manage notifications window for a given workflow.

Torq webhooks and external webhooks are supported. Be sure to use authentication headers as needed.

{
  "account_name": "acme-prod",
  "description": "env: environment variable \\\"RECIPIENT\\\" should not be empty",
  "error": "failed parsing environment variables",
  "execution_id": "0839a47c-338b-43cb-85e8-6b0d12e8fa27",
  "failed_step_name": "ask_a_question",
  "timestamp": "Tuesday, 14-Jun-22 09:46:07 UTC",
  "triggered_by": "Scheduled Event - e1a24a77-63b1-43e0-85e8-bb64cfe0b12e",
  "workflow_id": "05ca53bc-429d-48a9-85e8-0b7cc8b386ce",
  "workflow_name": "workflow_name"
}

Workflow execution failure as a trigger

You can set the workflow execution failure to trigger a Torq workflow to implement an automatic response.

  1. Create a webhook integration.
  2. Copy the endpoint of your webhook integration and add it to the Webhooks list in the Manage notifications window for a workflow.
  3. Create a new workflow and set the webhook integration you created in step 1 as the trigger. The execution failure information is available in the workflow by using $.event.body.
  4. Publish the workflow.

Slack message

You can send DMs and messages to channels by sending emails to Slack integration email addresses.

To attach an email address to a DM or channel, follow these steps in Slack.

  1. Right-click the DM or channel you want to message and select View conversation details or View channel details.
    View conversation or channel details in Slack.
  2. Go to the Integrations tab.
  3. Click Send emails to this channel or Send emails to this conversation.
    Slack message notification for a failed workflow.
  4. Copy the email address.
  5. In Torq, add the email address to the Emails list in a workflow's Manage notifications.

The Slack message will include information about the execution failure.
Slack message notification for a failed workflow.



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.