This is a little Google Workspace add-on to simplify the workflow of social workers.
Lots of time is spent manually copying emails into case notes and saving them to a resident, so there is an official record of the communication.
This add-on intends to speed that up by automatically duplicating an email as a case note belonging to the social care ID the user gives. The user can also provide a summary explaining why the material has been copied, and choose if they want to copy a single email or an entire thread.
It works with an API endpoint defined here.
- Copy all the code across into a new script.google.com project.
- Add values for the
PropertyService
keysendpoint
andtoken
to match the API endpoint the add-on needs to POST to. - Share the add-on for testing, or publish it for a wide release.
Google add-ons handle secrets using the PropertyService.
You can add secrets by adding utility functions like this to the project editor, and running them inside the editor:
function changeToken(){
PropertiesService.getScriptProperties().setProperty("token", "example")
}
function changeEndpoint(){
PropertiesService.getScriptProperties().setProperty("endpoint", "https://example.com")
}