Full Error Message:
Error while creating new document. Error message: Application unauthorized.
Please authorize before trying to access Google Drive.
-You may get this error message when trying to generate a document though your google drive has not been connected and app unauthorized.
How to resolve:
-First you need to make sure this user is an assigned app user by following our activation instructions.
-Second, you want to decide if you would like each app user to authorize their own drive or if you would like only one Salesforce user to authorize the app and the google drive for ALL app users to generate documents too. See this article for more detail on this optional feature.
-If you would like each user to authorize the app and their own drive, each user will need to go to “RS Documents Configuration” tab (can access from RS Documents app window or by clicking the + sign for more tabs) and click “Grant access.” Then you will follow the steps to connect your google drive account you would like to use to generate documents.
-NOTE: If you receive an error message when authorizing your Google Drive which refers to”Error: redirect_uri_mismatch” with custom domain, please go to AppExchange to upgrade your app package version to latest available. After you upgrade your package version, then proceed back to RS Documents Configuration tab to authorize app with your chosen google drive account.