getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.
http://redash.io/
BSD 2-Clause "Simplified" License
26.21k stars 4.36k forks source link

Scheduled reports by email #14

Open arikfr opened 10 years ago

tanminhnu commented 9 years ago

Hi arikfr,

Does the re:dash project support the daily email reports?

arikfr commented 9 years ago

@Thomasmisfit not at the moment, but it's high on the list of next things to implement.

vincetse commented 8 years ago

:+1:

Any thoughts when this might get on the roadmap again? It'll be a pretty neat feature to have.

arikfr commented 8 years ago

@thelazyenginerd it's on the roadmap, but I can't commit on specific dates for feature releases.

ChiragKParmar commented 8 years ago

@arikfr this would be really good feature to have.

arikfr commented 8 years ago

@ChiragKParmar I agree :-)

shahneil88 commented 8 years ago

@arikfr - Would this flow be ideal?

1) Run a cron to query the DB at said time interval. 2) Save the query result in a file (Somewhere in /opt/redash folders). 3) Run a python job to pick up that file , attach it and send email to designated email address

arikfr commented 8 years ago

@shahneil88 it's possible, but then why use Redash? IMO, a better approach would be to get the query result from Redash via the API, and send it by email.

I even have an example script that does that: https://gist.github.com/arikfr/a730451c01d1dd326412

alenave commented 8 years ago

@arikfr has this feature implemented?

abeniwal commented 8 years ago

+1

arikfr commented 8 years ago

@alenave it wouldn't be open if it was implemented...

pjatx commented 7 years ago

@arikfr thanks for the script! going to adapt for my org now.

ultymike commented 7 years ago

+1

rahul-pande commented 7 years ago

+1

nickihm commented 7 years ago

+1

gamefundas commented 7 years ago

+1 a much awaited feature for ReDash

praneeth-sajepa commented 7 years ago

+1

foaadnami commented 7 years ago

+1

arpitset commented 7 years ago

+1

sandeep89 commented 6 years ago

+1

asafmaor commented 6 years ago

+1

yoavbls commented 6 years ago

+1

aanari commented 6 years ago

+1

Miggleness commented 6 years ago

+1

RichardLitt commented 6 years ago

Thanks all. Please do not post +1s: we know this is an open issue. :)

ronin1 commented 6 years ago

@arikfr suggested we use the API to email the report as CSV. That is ok but the killer feature is to email a specific configured dash board with charts, graphs and the raw CSV report data on an interval (nightly or weekly). Sure we can write code to scrape the dashboard HTML and use that as our email body but it isn't as nice

OscarBeiro commented 6 years ago

+1

dobesv commented 6 years ago

I was able to cobble something together using Zapier that does this. Not ideal but I thought I'd share this workaround for anyone who wants it in the meantime:

Trigger: Schedule (Every Week)

You can get {query id} (a number) and {api key} (a random alphanumeric string) from them embed URL of the query.

Action: WebHooks by Zapier -> GET

URL

https://redash.vaultdrop.com/api/queries/{query id}/results.csv

Query String Params

api_key = ...

Send as JSON

No

Action: Code by Zapier > JavaScript

Code

output = {html: `
<html>
<body>
<table colspacing=0 colpadding=0>
  <thead>
    <tr>
      ${inputData.csv.split('\n')[0].split(',').map(h => `<th style="text-align: right; padding: 2px">${h}</th>`).join('\n    ')}
    </tr>
  </thead>
  <tbody>
      ${inputData.csv.split('\n').splice(1).map(
          (line, n) => `<tr>\n${line.split(',').map(v => `<td style="text-align: right; padding: 2px; background-color:${n&1?'#f2f2f2':'white'}">${v}</td>`).join('\n')}</tr>`).join('\n')}
</tbody>
</table>
</body>
</html>
`
};

Action: Mandrill > Send Email

Put the HTML output into the message body. Other mail sending methods that support HTML will work as well.

dobesv commented 6 years ago

Actually with Zapier you need a paid plan to really use it well for this purpose. I created a serverless AWS project that can be used to run a report and email it on a schedule, since I don't have any other use for Zapier right now:

https://github.com/dobesv/redash-scheduled-email

BouchaaraAdil commented 5 years ago

Hey guys i managed to send reports of each query in CSV form in mail, Please is there a way to send reports in png screenshots form.

indupulikkot commented 5 years ago

@BouchaaraAdil Could you please share the code

nitindatta commented 5 years ago

Hi, This issues was opened in 2013 and it 2019 now, is there any plan to do this ? I am asking this as this has come up as requirement from my client so before starting to invest in some workaround i wanted to check if there are any future plan for this feature.

arikfr commented 5 years ago

This issues was opened in 2013 and it 2019 now, is there any plan to do this ?

I'm not sure for how long you been using the project, but it's not like we been sitting on our hands in this time :-) It just so happens that this feature didn't hit our roadmap yet.

zailaib commented 5 years ago

+1

jay-chuang commented 5 years ago

@shahneil88 it's possible, but then why use Redash? IMO, a better approach would be to get the query result from Redash via the API, and send it by email.

I even have an example script that does that: https://gist.github.com/arikfr/a730451c01d1dd326412

hello, your url link is error, could you update it?

rywager commented 5 years ago

@arikfr - Few months since last post on this, any roadmap plans yet? Feature would be amazing!

jp-castro commented 5 years ago

I'll cast my vote for this longstanding request to be implemented as well.

rywager commented 4 years ago

+1 vote for this

hwinkel commented 4 years ago

Just installed redash, and for some reason I was thinking this is naturally there. But is not. Any Idea this will ever arrive? Before we look further.

dobesv commented 4 years ago

For PNG reports you could setup a scheduled job somewhere (AWS Lambda or a cron job on a server) that uses urlbox to pull a PDF or PNG of the page and send it somewhere.

sandeep89 commented 4 years ago

https://github.com/practo/redash-summary you can use this very basic table can be sent as an alert using this. You are welcome to contribute for any graphs PNG if you can.

Benoss commented 4 years ago

Having a way to send a dashboard as a PDF and/or an email with charts flatten as PNG on a regular basis or as trigger of an alert would be really awesome! Doing it as an external service is working but a bit painful to maintain.

ilikeido2010 commented 4 years ago

+1 vote for this function. it will be an amazing improvement if have this. pdf version is enough for user.

jeffcjlee commented 4 years ago

+1

gamefundas commented 4 years ago

7 years since this was opened. :) I don't think this is part of the overall vision.

rywager commented 4 years ago

Maybe the vision should evolve?

ferez96 commented 4 years ago

+1

brad-natelborg commented 4 years ago

+1

macEar commented 4 years ago

+1

shivakumarss commented 4 years ago

+1 still its open :(