GitHub user dosubot[bot] added a comment to the discussion: Sending Dashboards as HTML in email
<!-- Answer --> Superset does not support sending entire dashboards as HTML in emails out of the box—dashboards are sent as screenshots (images), while individual charts with tabular data can be sent as HTML tables in the email body. This is because the report execution logic generates dashboard screenshots using a headless browser, not HTML tables or layouts [see details](https://github.com/apache/superset/discussions/35593). To customize Superset to send dashboards as HTML, you would need to change the report execution code to, for each dashboard, fetch the tabular data from all its charts, assemble those tables into a single HTML email, and bypass the screenshot generation step. The relevant code for this is in `superset/commands/report/execute.py` (where dashboards are currently handled as screenshots and charts as HTML tables) and `superset/reports/notifications/email.py` (which builds the HTML email body) [reference](https://github.com/apache/superset/blob/master/superset/commands/report/execute.py) [reference](https://github.com/apache/superset/blob/master/superset/reports/notifications/email.py). This would require non-trivial code changes: you'd need to extract all chart slices from the dashboard, fetch their data, and render them as HTML tables in the email. There is no built-in configuration or UI option for this. If your dashboards only contain tables, this approach is technically feasible but would require custom development. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/47ad1ad1-953c-4c65-8d82-78f80aee5732?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/47ad1ad1-953c-4c65-8d82-78f80aee5732?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/47ad1ad1-953c-4c65-8d82-78f80aee5732?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/47ad1ad1-953c-4c65-8d82-78f80aee5732?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/47ad1ad1-953c-4c65-8d82-78f80aee5732?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/47ad1ad1-953c-4c65-8d82-78f80aee5732?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/47ad1ad1-953c-4c65-8d82-78f80aee5732?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Superset%20does%20not%20support%20sending%20entire%20dashboards%20as%20HTML%20in%20emails%20out%20of%20the%20box%E2%80%94dashboards%20are%20sent%20as%20screenshots%20%28images%29%2C%20while%20individual%20charts%20with%20tabular%20data%20can%20be%20sent%20as%20HTML%20tables%20in%20the%20email%20body.%20This%20is%20because%20the%20report%20execution%20logic%20generates%20dashboard%20screenshots%20using%20a%20headless%20browser%2C%20not%20HTML%20tables%20or%20layouts%C2%A0%5Bsee%20details%5D%28https%3A//github.com/apache/superset/discussions/35593%29.%0A%0ATo%20customize%20Superset%20to%20send%20dashboards%20as%20HTML%2C%20you%20would%20need%20to%20change%20the%20report%20execution%20code%20to%2C%20for%20each%20dashboard%2C%20fetch%20the%20tabular%20dat a%20from%20all%20its%20charts%2C%20assemble%20those%20tables%20into%20a%20single%20HTML%20email%2C%20and%20bypass%20the%20screenshot%20generation%20step.%20The%20relevant%20code%20for%20this%20is%20in%20%60superset/commands/report/execute.py%60%20%28where%20dashboards%20are%20currently%20handled%20as%20screenshots%20and%20charts%20as%20HTML%20tables%29%20and%20%60superset/reports/notifications/email.py%60%20%28which%20builds%20the%20HTML%20email%20body%29%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/blob/master/superset/commands/report/execute.py%29%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/blob/master/superset/reports/notifications/email.py%29.%0A%0AThis%20would%20require%20non-trivial%20code%20changes%3A%20you%27d%20need%20to%20extract%20all%20chart%20slices%20from%20the%20dashboard%2C%20fetch%20their%20data%2C%20and%20render%20them%20as%20HTML%20tables%20in%20the%20email.%20There%20is%20no%20built-in%20configuration%20or%20UI%20option%20for%20this .%20If%20your%20dashboards%20only%20contain%20tables%2C%20this%20approach%20is%20technically%20feasible%20but%20would%20require%20custom%20development.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36841) GitHub link: https://github.com/apache/superset/discussions/36841#discussioncomment-15347057 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
