@yanchr
I validated this using Lakeflow Jobs Dashboard tasks, the Jobs REST API and the Databricks Terraform provider. Here are the options I have tried and the findings:
1: Lakeflow Jobs Dashboard task (simplest approach)
Option A : Configure through UI
The Dashboard task UI provides attachment configuration directly.
Navigate to Jobs & Pipelines โ Job โ Tasks โ Dashboard task.
You can configure:
- Subscribers: Recipients who should receive the dashboard email.
- Dashboard filters: Apply specific filter values before generating the dashboard snapshot.
- Include pages: Select dashboard pages to attach as PDF.
- Include data: Select widgets and export their data as CSV, TSV, or Excel.
What I validated:
Using an existing dashboard task, I verified that the UI exposes Include pages and Include data, with page/widget selection and CSV, TSV, and Excel format options.
The UI also correctly displayed attachment settings previously configured through the Jobs API.
Option B : Configure through Databricks Asset Bundles (YAML)
The equivalent bundle configuration is:
resources:
jobs:
dashboard_email_job:
name: dashboard-email-with-attachments
tasks:
- task_key: dashboard_snapshot
dashboard_task:
dashboard_id: ${var.dashboard_id}
warehouse_id: ${var.warehouse_id}
subscription:
subscribers:
- user_name: user@example.com
attachment:
data_attachment:
widgets:
- page_id: page_99999
widget_id: bar_99999
file_format: FILE_FORMAT_CSV
Mention that FILE_FORMAT_EXCEL and FILE_FORMAT_TSV are alternative values.
2: Jobs REST API (tested end-to-end)
For programmatic config, the Jobs API supports attachments under: dashboard_task.subscription.attachment
Here's a minimal example:
{
"name": "dashboard-email-with-attachments",
"tasks": [
{
"task_key": "send_dashboard",
"dashboard_task": {
"dashboard_id": "YOUR_DASHBOARD_ID",
"warehouse_id": "YOUR_WAREHOUSE_ID",
"subscription": {
"paused": false,
"subscribers": [
{
"user_name": "user@example.com"
}
],
"attachment": {
"page_attachment": {
"page_selection": "PAGE_SELECTION_SUBSET",
"page_ids": ["YOUR_PAGE_ID"]
},
"data_attachment": {
"file_format": "FILE_FORMAT_CSV",
"widgets": [
{
"page_id": "YOUR_PAGE_ID",
"widget_id": "YOUR_WIDGET_ID"
}
],
"include_applied_filters": true
}
}
}
}
}
]
}Submit the payload using:
curl -X POST \
"$DATABRICKS_HOST/api/2.2/jobs/create" \
-H "Authorization: Bearer $DATABRICKS_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @job.json
You can then verify the saved configuration using:
databricks jobs get <job-id> --output json
My Actual test results:
- Jobs API accepted the PDF page and CSV widget attachment configuration.
- GET response retained both attachment objects.
- Dashboard task execution completed with Success .
- Email delivery was confirmed.
- The received email contained both a PDF attachment and a tabular-data attachment


3:Terraform : Native Attachment Support (v1.140.0)
I also tested the Databricks Terraform provider versions v1.109.0 and v1.137.0.
Both terraform validate and terraform plan failed with:
Error: Unsupported block type
Blocks of type "attachment" are not expected here.
But, The latest tested provider, v1.140.0 (published October 26, 2026), exposes native page_attachment and data_attachment blocks under dashboard_task.subscription.attachment.
supported Terraform structure:
resource "databricks_job" "dashboard_email" {
name = "dashboard-email-with-attachments"
task {
task_key = "dashboard_snapshot"
dashboard_task {
dashboard_id = var.dashboard_id
warehouse_id = var.warehouse_id
subscription {
paused = true
subscribers {
user_name = var.recipient_email
}
attachment {
page_attachment {
page_selection = "PAGE_SELECTION_SUBSET"
page_ids = ["page_99999"]
}
data_attachment {
file_format = "FILE_FORMAT_CSV"
include_applied_filters = true
widgets {
page_id = "page_99999"
widget_id = "bar_99999"
}
}
}
}
}
}
}
Validation: I successfully deployed the dashboard job using Terraform provider v1.140.0 with native PDF/CSV attachment configuration. terraform validate, plan, and apply all passed. The Jobs API confirmed the attachment settings were retained, the dashboard task run completed with SUCCESS and email delivery also confirmed.
Recommendation: For straightforward scheduled dashboard emails, use the Lakeflow Jobs Dashboard task UI, which supports PDF page and widget-data attachments.
For declarative automation, Terraform provider v1.140.0 is a validated option, with successful deployment, execution, and email receipt confirmed.
The Jobs REST API remains an alternative for programmatic configs or older Terraform provider versions that lack native attachment support.
References:
Dashboard task for Lakeflow Jobs
Jobs REST API