Automation in Dashboards

Dashboards support automation of key actions, making it easier to streamline your workflow:

  • Create alerts on dashboard widgets to monitor metric changes and trigger notifications when thresholds are reached.
  • Schedule exports of dashboards at regular intervals, allowing users to receive updated reports automatically.

Both alerts and scheduled exports offer flexible delivery options, including email notifications and JSON payloads to webhooks, enabling seamless integration with external systems like workflow automation tools or notification platforms. This allows users to automate monitoring and reporting, ensuring that key stakeholders stay updated without needing to manually track dashboards.

An an administrator, follow the rest of this article, and ensure that you:

  1. Configure one or more destinations:

  2. Give users the workspace automation permission.

For dashboard users, see Create Alerts and Schedule Exports articles on how you can use these features, once the administrator has set things up.

Create Destinations

As an administrator, you need to set up destinations to enable users to create alerts and scheduled exports. A destination is a delivery channel that can be either a webhook or an SMTP mail server. When triggered, GoodData sends a JSON payload to a webhook or an email to the email destination.

Note that the name of the destination is what the dashboard user is going to see when they are creating alerts or scheduled exports, so ensure the name you choose is going to be meaningful to them.

Email

When creating an email destination, you can choose between:

  • Default SMTP server: Uses GoodData’s built-in email service
  • Custom SMTP server: Configure your own SMTP server for delivery

You can also white-label the sender’s name and email address.

When a user creates an alert or scheduled export using an email destination, the selected SMTP server sends the email to the user’s email address as defined in user management.

Steps:

  1. Go to Settings.

  2. Under Destinations > Emails, click Create email.

    Screenshot of the Destinations section in Settings, highlighting the Create webhook option.
  3. Choose the SMTP server:

    For the default GoodData SMTP, the sender’s name and email address currently cannot be changed.

    Screenshot of the Create email dialog, Default SMTP server option, with all values filled in and the Create button highlighted.

    For a custom SMTP server, provide the sender’s details, the SMTP server URL, and the necessary authentication credentials.

    Screenshot of the Create email dialog, Custom SMTP server option, with all values filled in and the Create button highlighted.
  4. After setting everything up, click Create.

Webhook

GoodData can send alerts and export data as a JSON payload to a webhook destination. As an administrator, you are responsible for creating and managing these webhook destinations. For testing, you can use tools like webhook.site to capture and inspect HTTP requests, which simplifies the process of validating your webhook configurations before deploying them in production environments.

Steps:

  1. Go to Settings.

  2. Under Destinations > Webhooks, click Create webhook.

    Screenshot of the Destinations section in Settings, highlighting the Create webhook option.
  3. Configure the payload destination URL and, if necessary, provide a bearer authentication token. Click Create once everything is set up.

    Screenshot of the Create webhook dialog, with prefilled dummy values for the SendGrid emailing service endpoint.

Webhook Payloads

Alert payload example:

{
  "data": {
    "alert": {
      "condition": "greater than",
      "currentValue": 9.0,
      "metric": "Metric",
      "status": "SUCCESS",
      "threshold": 8.0
    },
    "details": {
      "subject": "Hello, World!"
    },
    "recipients": [
      {
        "email": "admin@gooddata.com",
        "id": "admin"
      },
      {
        "email": "tester@gooddata.com",
        "id": "tester"
      }
    ],
    "remainingActionCount": 10
  },
  "timestamp": "2024-09-03T14:34:40.263549Z",
  "type": "automation-task.completed"
}

Scheduled export payload example:

{
  "timestamp": "2024-08-01T15:12:41.689159286Z",
  "data": {
    "details": {
      "message": "Hello,\nthis is your scheduled export",
      "subject": "Test Schedule"
    },
    "visualExports": [
      {
        "exportId": "<export_id>",
        "status": "DONE",
        "fileUri": "<presigned_generated_url>",
        "traceId": "ec020036de43"
      }
    ],
    "automation": {
      "id": "<destination_id>",
      "title": "Webhook test",
      "dashboardURL": "<host_url>/dashboards/#/workspace/<workspace_id>/dashboard/<dashboard_id>"
    },
    "recipients": [
      {
        "email": "jane.doe@gooddata.com",
        "id": "<user_id>"
      }
    ],
    "remainingActionCount": 123
  },
  "type": "automation-task.completed"
}

Note that visualExports is used in case of a dashboard export, and tabularExports in case of a widget export.

Webhook Error Payloads

If an error occurs, we send an error payload.

Example of a failed alert:

{
  "data": {
    "alert": {
      "condition": "greater than",
      "metric": "Metric",
      "status": "ERROR",
      "traceId": "847839egf3a0695c"
    },
    "details": {
      "subject": "Hello, World!"
    },
    "recipients": [
      {
        "email": "admin@gooddata.com",
        "id": "admin"
      },
      {
        "email": "tester@gooddata.com",
        "id": "tester"
      }
    ],
    "remainingActionCount": 10
  },
  "timestamp": "2024-09-03T14:34:40.263549Z",
  "type": "automation-task.completed"
}

Example of a failed scheduled export:

{
  "data": {
    "details": {
      "title": "example"
    },
    "tabularExports": [
      {
        "exportId": "5a422124df0c1342543b95eacc5b_982638b2f84c3e7e5a7fc5d7955",
        "status": "ERROR",
        "errorMessage": "Export failed due to internal exception",
        "traceId": "134839eff3e9515c"
      },
      {
        "exportId": "5a422124df0c1342543b95eacc5b_dc30f52a8f04d299bcea726d1f5",
        "status": "ERROR",
        "errorMessage": "Export failed due to internal exception",
        "traceId": "134839eff3e9515c"
      }
    ]
  },
  "timestamp": "2024-07-08T08:38:22.123200127Z",
  "type": "automation-task.completed"
}

Note that visualExports is used in case of a dashboard export, and tabularExports in case of a widget export.

Evaluation Frequency

The evaluation frequency determines how often GoodData checks whether any alerts are triggered. You can configure this setting on the Settings page:

Screenshot highlighting the Evaluation frequency section on the Settings page.

GoodData supports triggering automations at most once per hour, so your evaluation frequency shouldn’t be shorter than that. Also consider that the frequency you set should align with or exceed your cache invalidation schedule. For example, if you set the evaluation frequency to hourly but only refresh your data once daily, alerts could be triggered repeatedly by the same stale data.

Permissions

To create new alerts and scheduled exports, users must have the Workspace.CREATE_AUTOMATION permission. For more details on how to manage permissions, see Manage Workspace Permissions.

Users with this permission can create automations, while other users will continue to receive alerts and exports from active automations they are subscribed to. However, only the automation’s creator or an administrator can edit, pause, or delete the automation.

Administrators with the Workspace.MANAGE permission (or higher) can manage automations without needing the Workspace.CREATE_AUTOMATION permission. Additionally, automations can only be created for users who have access to the dashboard.

Please note that both alerts and scheduled exports respect user data filters. This means different users may receive different results, depending on which user data filters are applied to them.

Customize Emails

The appearance and behavior of both alert emails and scheduled export emails can be customized based on the following factors:

  • Enabling logo white-labeling hides the GoodData corporate address line and replaces the GoodData logo with your own branding.

  • Changing the primary color in your theme allows you to customize the color of the Open dashboard button.

  • The dashboard link in emails can be customized for each email destination through the configuration tab:

    Screenshot showing the configuration tab on email destination creation dialog, highlighting the custom dashboard URL field.

    Valid examples of the customized link syntax include:

    • https://example.gooddata.com/client/{workspaceId}/dashboard/{dashboardId}
    • https://example.gooddata.com/?client={workspaceId}&dashboard={dashboardId}
    • https://example.gooddata.com/client/{workspaceId}?dashboard={dashboardId}
    • https://example.gooddata.com/dashboard/{dashboardId}
    • https://example.gooddata.com/client/{workspaceId}
    • https://example.gooddata.com