Share Files and Folders in Google Drive from Rows in Google Sheets
With Document Studio, you can share files and folders in your Google Drive with users that are listed in Google Sheets.
For instance, you may have the employee onboarding documents in a Google Drive folder and the list of new hires in a Google Sheet. You can easily write a workflow that automatically shares the onboarding documents with the new hires through sharing in Google Drive.
In addition to folders, you can also share individual files in your Google Drive with the help of Document Studio.
Share Files and Folders in Google Drive
Install the Document Studio add-on and open your Google Sheet to launch the add-on. You may either open an existing Google Sheet or create a new sheet and add data in the sheet.
Inside the Document Studio app, provide a descriptive name for your workflow and choose the specific worksheet in your Google Spreadsheet that contains the merge data. Click on Continue
to move to the conditions page.
If you want the workflow to run only if the row data satisfies certain conditions, you can specify the criteria here or skip to process all rows in the sheet.
Next, choose Google Drive
from the list of available tasks.
Configure Google Drive Service
Choose Share File
or Share Folder
as the Drive Service and select the folder in your Drive that you would like to share with the recently hired employees.
Next, enter the email address column title in the Viewer
field of the Share section to automatically share the item with the employee. You may also enter multiple email addresses in the Viewer, Editor or Commenter fields depending on the kind of access you want to grant.
You may check the Send notification email
checkbox to send an email to the employee when the folder is shared.
Preview and Save
Click the Preview
button and you should see file or folder shared with the email of the employee listed in the first row of the Google Sheet. Click Done
to locally apply your changes.
Click on Continue
to proceed to the triggers screen. If you want the workflow to be automatically triggered every hour, so that any new rows added in that duration are processed automatically, you can choose the option Run workflow every hour
and then click on the Save
button.
The workflow will now appear in the workflow dashboard where you can edit, delete or manually run the workflow.
If you would like to share multiple files or folders in Google Drive for the same record in Google Sheet, you can add multiple Google Drive
tasks in the same workflow.