Are you getting an error email for a report schedule that was working earlier? Did you change the owner of that report schedule recently? If yes, this is a known issue and can be fixed pretty easily at your end.

This is the error message you may receive via email:

Error in exporting Report : [Report Name]. Please make sure the user ([User Name]) has permissions to run and export reports.

Problem

First of all, let's understand why the existing report schedule stopped working. When a user creates a Report Schedule record for the first time, our app prompts the user to authorize the app to run and send reports on their behalf. On successful authorization, our app stores a token for the user. So Report Sender only has tokens for those users who have authorized the app to run and send reports.

Now, when you change the owner of a Report Schedule record, there is a high probability that the new owner has never used Report Sender to schedule reports and thereby never authorized our app. So, our app doesn't have a token for the new owner. When our app tries to send this Report Schedule on the next run, it is not able to find a token and sends an error email about missing authorization.

Solution

The solution for this issue is pretty easy. Ask the Report Schedule owner to authorize Report Sender to run and sends reports on their behalf. This can be done as follows:

  • Log In to Salesforce through a normal method i.e. username and password
  • Go to the CloudAnswers Report Sender tab
  • If the Reauthorize button is showing, click that. Otherwise, click the New Schedule button.
  • When you see the following prompt, click Yes.

Tip: If you don't see this prompt, that means we already have a token saved and there could be a different issue.

  • Click Allow on the Allow Access screen.

If you clicked the New Schedule button it will open the New Schedule form, but the user can cancel out of it.

When you're done, try clicking Send Now on the report schedule to test it (Edit the report schedule and change the recipients first, if needed).

If that didn't fix your problem, double-check that the user can see the report that you are scheduling for them.

Did this answer your question?