function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amack DawgAmack Dawg 

How to Embed specific Dashboard 'Component' in an VF/HTML email?

I am trying to send specific dashboard components in regular html emails, and doing some basic reading suggests this certainly isn't an overtly offered feature by Salesforce (yet) but I was wondering if any one had any workarounds?

I noticed each component can be opened as a PNG, is there someway to create a visualforce page that flattens the latest refreshed Component into a PNG and then links that back into an HTML/VF email?
James LoghryJames Loghry
In order to meet this requirement, as you said you'll need to find a way to remove the javascript-ness from the dashboard components.  One thought is to convert the component to a PNG as you suggested.   Here's a post that suggests you can utilize URL paramters to generate a dashboard image: https://vanityforce.wordpress.com/2013/02/03/two-methods-for-embedding-a-report-or-dashboard-chart-in-visualforce-or-standard-pagelayout/

Another idea you might consider is utilizing Google Charts and perhaps using their API for generating an image for emailing.  More on that here: https://developers.google.com/chart/interactive/docs/printing