Connect action for Google packages
- Updated: 2024/01/04
Connect action for Google packages
Use the Connect action to establish a connection with the Google server in order to use other actions from that same package to automate tasks. All of the fields in this action accept a credential from the Credential Vault, variable, or a user-input value.
Prerequisites
- If you have not already done so, create a project.
- Enable the APIs for the Google G Suite applications you want to automate, such as the Google Drive API, Google Calendar API, and Google Sheets API.
- Do the steps in Setting up OAuth 2.0 to generate the Client ID
and Secret.Note:
- Select the Web application option and enter a name.
- Based on the authentication mode, enter the relevant redirect
URI as given below:
- Authorization code (default
authentication mode): Add this authorized redirect URI
http://localhost:8888/Callback
. - Control Room managed: Add the Callback URL from page. See Create OAuth connection.
- Authorization code (default
authentication mode): Add this authorized redirect URI
Procedure
Next steps
The first time the bot runs, the Google login window is displayed. You must select the Google account and approve the requested access permissions.
The token file gets generated for the first time after you provide the access permissions when the bot gets deployed. It is created based on values that you provide in the Username, Client Id and Client secret field, and asks for credentials only the first time to provide the access permission. Next time it uses the same token file to connect to the Google Sheets.
The token file is located at C:\Users\<username>\AppData\Local\AutomationAnywhere\G-SuitAuth, where C:\Users\<username> is the user home directory of the respective system.
If you enter the correct credentials when providing access permissions for the first time and can connect to the Google Sheets successfully, then next time if there is a change in only the password, you need not delete the token file as it will work as expected.
Use other the actions from the same Google package to automate tasks. To use actions from another Google packages, establish a connection using the Connect action from that package.