-
Notifications
You must be signed in to change notification settings - Fork 1
Setup instructions
Benjamin BALET edited this page Oct 27, 2017
·
3 revisions
This project can be edited from script.google.com either by importing all the files of the project (using Google Drive REST API or manually) or by copying the shared script.
Please note that this project requires OAuth2 library developed by Google.
You need to edit the script so as to make it point to your Jorani instance. Please change these variables:
- CLIENT_ID OAuth2 client's id created into in your Jorani instance.
- CLIENT_SECRET OAuth2 client's password created into in your Jorani instance.
- BASE_URL Location of your Jorani instance, e.g. 'https://demo.jorani.org/'.
You need to edit the manifest of the script (appsscript.json) by changing the content of:
- openLinkUrlPrefixes with the location of your Jorani instance, e.g. 'https://demo.jorani.org/'.
- urlFetchWhitelist with the location of the Jorani API, e.g. 'https://demo.jorani.org/api'.
Deployment instructions:
- Deploy this script in your organization and note the {SCRIPT ID}. Don't forget to editing variables and the manifest file.
- Create an OAuth2 client in your Jorani instance redirect url must include {SCRIPT ID} as in: https://script.google.com/macros/d/{SCRIPT ID}/usercallback
- Report CLIENT_ID and CLIENT_SECRET in the beginning of script.
- Report BASE_URL of your Jorani instance.
- Each user must add this addon from their GMail settings. they can use the {Deployment ID} that you communicate to them. Deployment ID and Script ID are two different things!
Authorizations:
- GMail will ask a lot of permission (User storage, fetch external API, read the content of the current email, etc.).
- Then user will be prompted its Jorani login and passowrd the first time.