Zoho Write and CRM - How to attach merged document to CRM Record?

Zoho Write and CRM - How to attach merged document to CRM Record?

Hi there, 

I'm trying to set a function that is ready on the custom functions gallery of Zoho Write, which is the one named 'Attach to a Zoho CRM record'.  

The instructions indicate: 
/*
Create the deluge connection with the scopes WorkDrive.files.READ
Replace connection name in Line Number - 22.
 */

I'm not so familiar to coding and deluge and I'm wonder if I could get instructions on how to create this connection with the Scopes WorkDriveFile.READ. 

I have tried different things, but none seem to work. 

Your help on this will be highly appreciated. 

Cheers