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

Module - Google Docs

Set of activities related to Google Docs.

Activities

Replace Text (Google Docs)

Replace text in a Google Docs document.


Technical Name Type Minimal Agent Version
replaceAllText asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document in which you want to replace some text.
textToBeReplaced string mandatory The text to search for in the document.
replaceText string mandatory The text that will replace the matched text.
matchCase boolean optional Indicates whether the search should be case sensitive (default value is false, that is case-insensitive).
requiredRevisionId string optional Each update to a Google Docs document generates a revision ID. If specified and it doesn't match the latest revision ID, the request might fail.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
occurencesChanged number Number of occurrences changed for the specified text.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Get Document (Google Docs)

Retrieve an existing Google Docs document.


Technical Name Type Minimal Agent Version
getGoogleDoc asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document you want to retrieve.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
googleDocument irpa_googleworkspace.googleDocument Object containing Google Document fields and data like header, footer, body, and so on.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Create Document (Google Docs)

Create a Google Docs document.


Technical Name Type Minimal Agent Version
createDocument asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
title string optional Name of the new document.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
createdDocument irpa_googleworkspace.createdDocument Object containing the document ID, its title, and its revision ID.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Insert Text (Google Docs)

Insert text in a specified Google Docs document.


Technical Name Type Minimal Agent Version
insertText asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document in which you want to insert text.
textToInsert string mandatory Text to be inserted.
isNewLine boolean optional Set this parameter to 'false' to insert text on the same line. The default value is 'true', which means that the text will be added in a new line.
textDirection irpa_googleworkspace.enums.TextDirection optional Defines the text insertion direction in the document. By default, the text will be inserted in top to down order.
requiredRevisionId string optional Each update to a Google Docs document generates a revision ID. If specified and it doesn't match the latest revision ID, the request might fail.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
updatedDocument irpa_googleworkspace.updatedDocument Object containing the document ID and the revision ID.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Create Header (Google Docs)

Create a header in specified Google Docs document.


Technical Name Type Minimal Agent Version
createHeader asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document in which you want to create a header.
headerText string mandatory Text to be inserted.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
docHeaderOrFooter irpa_googleworkspace.docHeaderOrFooter Object containing the document ID, the header ID, and the revision ID.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Delete Header (Google Docs)

Delete a header in a specified Google Docs document.


Technical Name Type Minimal Agent Version
deleteHeader asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document from which you want remove the header.
headerId string mandatory ID of the header to delete.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
updatedDocument irpa_googleworkspace.updatedDocument Object containing the document ID and the revision ID.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Create Footer (Google Docs)

Create a footer in a specified Google Docs document.


Technical Name Type Minimal Agent Version
createFooter asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document in which you want to create a footer.
footerText string mandatory Text to be inserted.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
docHeaderOrFooter irpa_googleworkspace.docHeaderOrFooter Object containing the document ID, the footer ID, and revision ID.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Delete Footer (Google Docs)

Delete a footer in a specified Google Docs document.


Technical Name Type Minimal Agent Version
deleteFooter asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document from which you want remove the footer.
footerId string mandatory ID of the footer to delete.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
updatedDocument irpa_googleworkspace.updatedDocument Object containing the document ID and the revision ID.

Errors:

Error Class Package Description
SequenceError irpa_core Error thrown if you used this activity without any authorization activity.
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
InvalidArgument irpa_core Error thrown if you used this activity without the 'GoogleDriveScope'.
Timeout irpa_core Error thrown if the activity times out.
Error irpa_core Generic Error.


Get File (Google Docs)

Retrieve one or several Google Docs files.


Technical Name Type Minimal Agent Version
getDocFiles asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string optional The ID of the Google Docs document for which you want to retrieve the details. If you don't set this parameter, all the Google Docs documents in the drive will be retrieved by default.
query string optional Query to filter the results.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
docMetadata Array.<irpa_googleworkspace.googleDriveContentMetadata> Metadata for the list of documents matching the search.

Errors:

Error Class Package Description
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
SequenceError irpa_core Thrown if this activty is used without any authorization activity.
InvalidArgument irpa_core Thrown if this activty is used without the GoogleDriveScope.
Timeout irpa_core Thrown if the activity times out.
Error irpa_core Generic Error


Delete Document (Google Docs)

Delete an existing Google Docs document.


Technical Name Type Minimal Agent Version
deleteGoogleDoc asynchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
documentId string mandatory The ID of the document to delete.
timeout number optional Timeout for the activity. The default is 30000ms.

Output Parameters:

Name Type Description
Returns boolean Returns 'true' if successful, otherwise throws an error.

Errors:

Error Class Package Description
GoogleDocsError irpa_googleworkspace Error thrown when the call to the Google Docs API failed.
SequenceError irpa_core Thrown if this activty is used without any authorization activity.
InvalidArgument irpa_core Thrown if this activty is used without the GoogleDriveScope.
Timeout irpa_core Thrown if the activity times out.
Error irpa_core Generic Error