Google Docs¶
The Google Docs modules enable you to monitor, create, edit and retrieve documents in your Google Docs and Google Shared Drive (for G Suite users).
Getting Started with Google Docs¶
Prerequisites
-
A Google account
-
A G Suite account (only if you need to process documents in Google Shared Drive)
In order to use Google Docs with Ibexa Connect, it is necessary to have a Google account. If you do not have one, you can create a Google account at google.com.
Note
The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!
Connecting Google Docs to Ibexa Connect¶
To connect your Google Docs account to Ibexa Connect follow the general instructions for Connecting to services.
After you click the Continue button, Ibexa Connect will redirect you to the Google Docs website where you will be prompted to grant Ibexa Connect access to your account.
Confirm the dialog by clicking the Allow button.
Document¶
Watch Documents¶
Returns document details when a new document is created or modified in the selected folder.
Watch Documents |
Select whether you want to watch created (By Created Date) or modified (By Modified Date) documents. |
||
Choose a Drive |
Select what type of drive you want to monitor.
|
||
Folder ID / Shared Drive |
Select the folder you want to watch for created or modified documents. | If you have selected the Google Shared Drive option in the field above and you are not a G Suite user, the error |
Limit
Set the maximum number of documents Ibexa Connect will return in one execution cycle.
List Documents¶
Retrieves a list of documents from the selected folder.
Watch Documents |
Select whether you want to watch created (By Created Date) or modified (By Modified Date) documents. |
||
Choose a Drive |
Select the drive you want to retrieve documents from.
|
||
Folder ID / Shared Drive |
Select the folder you want to watch for created or modified documents. | If you have selected the Google Shared Drive option in the field above and you are not a G Suite user, the error |
Get Content of a Document¶
Retrieves a specified document.
Note
You may need to extend your permissions.
Get Content of a Document |
Select whether you want to map the document ID of the document or select the document from the drop-down menu manually. |
||
Document ID |
Select or map the document you want to retrieve. |
||
Choose a Drive |
Select the drive you want to retrieve the document from.
|
||
Filter |
Select the object you want to be returned in the module's output.
| For further mapping of these objects, please use Inline Objects Array (instead of inlineObjects). The Inline Objects Array objects are sorted in the same order they appear in the document. It will make any further processing easier. |
Create a Document¶
Allows you to create a new document in the selected folder.
Name |
Enter the name of the document. |
Content |
Enter the content of the document. HTML is supported. |
Choose a Drive |
Select the drive where you want to create the document.
|
New Document's Location |
Select the folder where you want to save the document. |
Insert Header |
Enable this option to insert the header to the document. |
Insert Footer |
Enable this option to insert the footer into the document. |
Create a Document From a Template¶
Creates a new document from the template document where the mustache variables ({{}}
) are used.
Create a Document from a Template |
|
||||
Document ID |
Select or map (based on the option selected above) the document with the variables ( |
||||
Values |
Enter the values that will be entered instead of the variables to the new document.
E.g. {{name}} variable in the source document will be displayed as the name field here, where the value can be inserted, for example, John. |
||||
Images Replacement |
Enter the link to the Image Object ID (You can retrieve the image IDs by using the We recommend that you add ALT text to images in your Google document. The module will more easily recognize them. Adding an ALT Text to the Google Docs image 1. Right-click on the image. 2. Select the ALT text option. 3. Enter the ALT text in the Title field and click OK. After the ALT text is added to the image, the ALT text is displayed in the field name in round brackets: |
||||
Title |
Enter the name for the new document. |
||||
New Drive Location |
Select the drive where you want to create the document.
|
||||
New Document's Location |
Select or map the folder where you want the document to be created. |
Insert a Paragraph to a Document¶
Appends or inserts a new text to an existing document.
Select a Document
-
By Mapping - select this option to map the document template.
-
By Dropdown - select this option to choose the document from the drop-down menu.
Choose a Drive
Select the drive that contains the document you want to insert a paragraph to.
-
My Drive
-
Shared With Me
-
Google Shared Drive (available for G Suite users only!)
Document ID
Select or map the document you want to edit.
Insert a Paragraph
Select how you want the new text to be inserted in the document.
-
By specification of location
By index Index
Enter the Index number where you would like to insert your text. The Get a Document module can be used to retrieve that number.
To display all characters (including hidden) in the document, you can use the Show add-on. You can find the add-on under Add-ons > Get add-ons > search for Show and install the Show add-on.
Inserted text
Enter the text you want to insert to the document.By segment ID Select the header and footer you want to insert the text content to and enter the text you want to insert to the corresponding fields.
If the header and/or footer already contains text, the new text will be added before the existing one. -
By appending to the body of the document
Appends entered text in the document's body content.
Note
The style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets.
-
By appending to the end of segment (Header and Footer)
Select the header and footer you want to insert the text content to and enter the text you want to insert to the corresponding fields. If the header and/or footer already contain a text, the new text will be added after the existing one.
Insert an Image to a Document¶
Inserts an image from the URL to the document.
Select a Document
-
By Mapping - select this option to map the document template.
-
By Dropdown - select this option to choose the document from the drop-down menu.
Choose a Drive
Select the drive that contains the document you want to insert an image to.
-
My Drive
-
Shared With Me
-
Google Shared Drive (available for G Suite users only!)
Document ID
Select or map the document you want to add an image to.
Insert an Image
Select how you want the new text to be inserted in the document.
-
By specification of location
By index Index
Enter the Index number where you would like to insert the image. The Get a Document module can be used to retrieve that number.
Image URL
Enter the URL of the image you want to insert into the document.The maximum image size is 50 MB. Must not exceed 25 megapixels. Only PNG, JPEG or GIF format is supported. -
By appending to the body of the document
Appends a specified image in the body content of the document.
-
By appending to the end of segment (Header and Footer)
Select the header and footer you want to insert an image to and enter the image URL you want to insert to the corresponding fields.
Height Magnitude in Points/Width Magnitude in Points
Define the size of the inserted image. The aspect ratio will be kept.
Replace an Image with a New Image¶
Replaces an existing image. The aspect ratio of the original image will be maintained.
Replace an Image | * By Mapping - select this option to map the target document and image to be replaced. * By Dropdown - select this option to choose the document from the drop-down menu. |
Choose a Drive | Select the drive that contains the document that you want to replace an image for. * My Drive * Shared With Me * Google Shared Drive (available for G Suite users only!) |
Document ID | Select or map the document that contains the image(s) you want to replace. |
Image URLs | Body: Image No. 1 (Location: Order of the existing image in the document) Enter the URL of the new image that will replace the existing one. |
Images Replacement | Add the images that you want to replace. Image Object ID Map the Object ID of the image. It can be retrieved using the Get a Document module ( Inline Objects Array ):Image URL Enter the URL of the new image. The Example |
Replace a Text in a Document¶
Finds a specified text and replaces it with the new one.
Choose a Drive |
Select the drive that contains the document that you want to replace a text of.
|
Document ID |
Select or map the document that contains the text you want to replace. |
Replace a Text |
Finds and replaces a text within the document.
|
Download a Document¶
Converts and downloads the selected document.
Choose a Drive |
Select the drive that contains the document you want to download.
|
Document ID |
Select or map the document that contains the text you want to replace. |
Type |
Select the target file format of the downloaded document. |
Delete a Document¶
Deletes a document.
Choose a Drive |
Select the drive that contains the document you want to delete.
|
Document ID |
Select or map the document you want to delete. |
Make an API Call¶
Allows you to perform a custom API call.
URL |
Enter a path relative to For the list of available endpoints, refer to the Google Docs API Documentation. |
Method |
Select the HTTP method you want to use: GET to retrieve information for an entry. POST to create a new entry. PUT to update/replace an existing entry. PATCH to make a partial entry update. DELETE to delete an entry. |
Headers |
Enter the desired request headers. You don't have to add authorization headers; we already did that for you. |
Query String |
Enter the request query string. |
Body |
Enter the body content for your API call. |
Example of Use - Get a Document¶
The following API call retrieves the details for the specified document in your Google Docs:
URL:
/v1/documents/1ujkf-GDgB0TQSYPrxbCSK4Uso54tHVMqHZEVZZxB6aY
Method:
GET
Details of the retrieved document can be found in the module's Output under Bundle > Body.
Make All Links in a Document Clickable¶
Finds all links in the document and makes them clickable.
Make All Links in a Document |
|
Choose a Drive |
Select the drive that contains the document you want to update the links in.
|
Document ID |
Select or map the document you want to update the links in. |