Send an email, that includes a graph, which is dynamically generated on web

I want to send an email, that includes a graph generated on a Dash server. I followed steps described here:

The problem is that the graph is rendered dynamically, based on query params I pass in the URL, as a result my email report does’t contain an image snapshot of the graph

E.g. my url looks like this:

The dash app parses the query params (foo, bar, baz, bax) and uses them to construct a query to a database. The data returned from the database is used to construct a graph.

Any ideas how to solve this problem?

I also tried to generate images offline, by running


However I get the following exception:

chart_studio.exceptions.PlotlyRequestError: You must be authenticated to generate an image via json.

Did you ever figure this out? I’m surprised no one has answer :blush: