Example of using Create Folder action from Google Drive package
- Updated: 2023/11/21
Example of using Create Folder action from Google Drive package
Build a bot that creates a folder in Google Drive.
Prerequisites
- Set up an OAuth2 application in Google Cloud Platform. For more information, see Set up OAuth2 in the Google Cloud Platform.
- Configure OAuth connection in the Control Room. For more information, see Configure OAuth 2.0 connection in Control Room.
- Create a parent folder in Google drive. In the example, the aa-docs/monthly-reports is used as the parent folder.
Suppose that ACME Inc stores all its monthly reports on Google Drive. To streamline the process, the company decides to develop a bot that creates a new folder at the beginning of each month and then uploads the reports to the folder.
In this example, the bot performs the following tasks:
- Uses the Datetimepackage to retrieve the current date.
- Uses the Create Folder action from theGoogle Drivepackage to create a folder with the current date as its name.
- Displays the ID of the new folder.