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:
Configure one or more destinations:
For webhook destinations, you are responsible for processing the webhook’s JSON payload once it’s sent from GoodData.
For email destinations, consider reviewing the email customization options.
For alerts, make sure to configure the desired evaluation frequency.
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.
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:
Go to Settings.
Under Destinations > Emails, click Create email.
Choose the SMTP server:
For the default GoodData SMTP, the sender’s name and email address currently cannot be changed.
For a custom SMTP server, provide the sender’s details, the SMTP server URL, and the necessary authentication credentials.
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:
Go to Settings.
Under Destinations > Webhooks, click Create webhook.
Configure the payload destination URL and, if necessary, provide a bearer authentication token. Click Create once everything is set up.
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:
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:
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