SAP Help Home SAP Intelligent RPA Help Portal SAP Intelligent RPA Community

Module - Google Authorization

Activities for getting authorization for Google Account.

Activities

Authorize Google (OAuth Client ID)

Get authorization for a Google Account.


Technical Name Type Minimal Agent Version
authorizeViaOAuthClientID asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
clientCredentialFilePath string mandatory Path to the client credentials JSON file. You get the client credentials by creating a credential in Google Cloud Platform.
scopes irpa_googleauthorization.Scopes mandatory Scopes that are required to access Google resources.
userEmail string mandatory Email ID of the user to authenticate and authorize.
storeRefreshToken boolean optional true If set to '€飺lse'€™, the refresh token will not be stored and the user will have to provide the consent for every bot run.
webBrowser irpa_googleauthorization.enums.WebBrowser optional Edge Web browser to launch for completing the Google authorization.
timeout number optional 60000 Timeout for the activity in ms.

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid argument
NotFound irpa_core Client Credentials file not found
NotSupported irpa_core Client Credentials file must be in JSON format
Timeout irpa_core Authorization timed out
GoogleAuthError irpa_googleauthorization Error during authorization


Authorize Google (Service Account)

Get authorization for a Google Account.


Technical Name Type Minimal Agent Version
authorizeViaServiceAccount synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
serviceAccountKeyPath string mandatory Key path (JSON) of the service account on the local disk.
scopes irpa_googleauthorization.Scopes mandatory Scopes that are required to access Google resources.
userEmail string optional Email ID of the user to impersonate (isDomainWideDelegationEnabled must be true).

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid argument
NotFound irpa_core Service Account Key file not found
NotSupported irpa_core Required Service Account Key file in JSON format


Disconnect (Google)

Disconnect a Google Account.


Technical Name Type Minimal Agent Version
disconnect synchronous WIN-2.0.0


Select Google Authentication

Set the authentication that will be used for the Google activities. Before running an automation using Google activities, you must register the authentication on the agent.


Technical Name Type Minimal Agent Version
selectGoogleAuthentication asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
name string optional Name of the authentication to use. If the name is not specified, then the default authentication on the agent will be used.

Sample Code:

await irpa_googleauthorization.googleAuth.selectGoogleAuthentication('name');

Errors:

Error Class Package Description
GoogleAuthError irpa_googleauthorization Error during authorization