πππππππππππππSet-Upππππππππππππππ
We have detailed video tutorials for each of the actions/elements we have in this plugin. Watch them to understand and use it at ease.
ππ You must set up your Google Cloud account and create a Google Cloud Project before you can use this plugin. Takes less than 5 mins if you follow the instructions. It is a one time process which is necessary to get your client-id and client-secret. ππ
β Go to
https://console.cloud.google.com/β Log in to your Google account.
β Create a new project.
β Enable Google Docs API.
β Create credentials for the API along with redirect URI.
β Note down the Client-ID and Client-secret.
βΈ Step (1 to 6) is explained in detail:
βΈ Watch YouTube video here:
https://www.youtube.com/watch?v=k1Y-jR1bpOIππππππππππInstalling the Pluginππππππππππ
β Log in to your Bubble account
β Go to Plugins
β Search for βGoogle Docs by Ritz7β
β Install the plugin
πππππππππππUsing the Pluginπππππππππππ
ππ Note: In all the actions, we have a field named "Authorization". This field should be in the following format: Bearer <Access-Token>. Access Token will be valid for 60 mins from the time it is generated and you can regenerate it using the Refresh Token. And this step is explained in detail here:
https://www.youtube.com/watch?v=AsyYBqPsJpAππ
β Drag and drop the element "G-Docs".
β Add an action called "Get Docs Auth-Code via URL" which requires you can add Client-ID and redirect URI. This will return an URL that needs to be opened.
Note: The redirect URI should match exactly as you have set while configuring in Google Cloud.
β Add Next step: You will have to open the URL you get from the previous step.
Note: This will ask your permission for your app to use your Google Account. Once you permit, the element will automatically fetch the code from the URL.
β Generate Auth Token via code: Call an Action "Get_Access_Token-via_Code". This will require you to pass the client-ID, client-secret, code (you will get it from the element 'G-Docs' and the param is named as 'G-Docs_Auth_Code') and redirect URI (this should match the one added in the Google Cloud Project)
Note: You will also get Refresh Token along with Access token from step-4. You use Refresh Token to get the Access Token once the old Access Token expires.
β Use "Get_Access_Token-via_R-Token" action to get the Access token from Refresh Token. This requires you to provide client-ID, client-secret and refresh token.
ππ Actions ππ
β½ Create Document
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Name: Name of the document which will be created.
β Outputs:
β» Details of the document created.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=WdUTAyUWqHsβ½ Insert text
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where text will be inserted.
β» Text: The text that will be inserted in the document.
β» Index: It is the index where text will be inserted in the document.
β» Segment-ID: The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=V93lYaZkSD4β½ Replace all text
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document_ID: ID of the document where text will be replaced.
β» Text: Text to search for in the document which needs to be replaced.
β» Replace_Text: Text which will be replaced by the searched text from the document.
β» Match_Case: Indicates whether the search should respect case: true - the search is case sensitive. false - the search is case insensitive.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=V93lYaZkSD4β½ Create paragraph bullets
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where bullets will be inserted.
β» Segment-ID: The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
β» Start Index: It is the index where paragraph bullets will start.
β» End Index: It is the index where paragraph bullets will end.
β» Bullet Preset: Refer to the documentation to understand all the bullets you can use.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=haMO7dbBHDYβ½ Delete paragraph bullets
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where bullets will be deleted.
β» Start Index: It is the index from where bullets will be deleted.
β» End Index: It is the index where bullets deletion will end.
β» Segment-ID: The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=haMO7dbBHDYβ½ Insert an image
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where image will be inserted.
β» Index: It is the index where image will be inserted in the document.
β» Segment-ID: The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
β» URL: It is the URL of the image which will be inserted in the document.
β» Height: It is the height of the image in pixels.
β» Weight: It is the weight of the image in pixels.
β Outputs:
β» ID of the image inserted in the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=TwKLhebSZlwβ½ Replace an image
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where new image will be replaced.
β» Index: It is the index of existing image which will be replaced by new image in the document.
β» Segment-ID: The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
β» Image-ID: It is the ID of the existing image which will be replaced by new image.
β» URL: It is the URL of the new image which will be replaced by old image in the document.
β» Height: It is the height of the image in pixels.
β» Weight: It is the weight of the image in pixels.
β Outputs:
β» ID of the image replaced in the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=TwKLhebSZlwβ½ Insert Table
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where table will be inserted.
β» Index: It is the index where table will be inserted.
β» No. of rows: It is the no. of rows to be added in the table.
β» No. of columns: It is the no. of columns to be added in the table.
β» Segment-ID: The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=O62_zrIssFkβ½ Insert Table Row
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where rows will be inserted in the table.
β» Index: It is the index of the table in the document.
β» Row Index: It is the index of the row after which row needs to be added.
β» Column Index: It is the index of column from where row will be added.
β» Insert Below: If its true, rows will be inserted below the given index or else false.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=O62_zrIssFkβ½ Insert Table Column
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where columns will be inserted in the table.
β» Index: It is the index of the table in the document.
β» Row Index: It is the index of the row where column will be added.
β» Column Index: It is the index of column from where row will be added.
β» Insert Right: If its true, columns will be inserted right to the given index or else false.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=O62_zrIssFkβ½ Delete Table Row
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where rows will be deleted in the table.
β» Index: It is the index of the table in the document.
β» Row Index: It is the no. of rows to be deleted in the table.
β» Column Index: It is the no. of columns to be deleted in the table.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=zA8aiEwTIcUβ½ Delete Table Column
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where text will be inserted.
β» Index: It is the index of the table in the document.
β» Row Index: It is the no. of rows to be deleted in the table.
β» Column Index: It is the no. of columns to be deleted in the table.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=zA8aiEwTIcUβ½ Merge Table Cells
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where text will be inserted.
β» Index: It is the index of the table in the document.
β» Row Index: It is the index of the row.
β» Column Index: It is the index of the column.
β» Row Span: It is the number which will merge the cells vertically.
β» Column Span: It is the number which will merge the cells horizontally.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=1BeyPcBc410β½ Unmerge Table Cells
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where text will be inserted.
β» Index: It is the index of the table in the document.
β» Row Index: It is the index of the row.
β» Column Index: It is the index of the column.
β» Row Span: It is the number which will unmerge the cells vertically.
β» Column Span: It is the number which will unmerge the cells horizontally.
β Outputs:
β» Details of the document.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=1BeyPcBc410β½ Insert page break
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where text will be inserted.
β» Index: It is the index where break will happen.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=ihmd9gi8SBgβ½ Insert section break
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where text will be inserted.
β» Index: It is the index where break will happen.
β» Section Type: It has 2 types of section - CONTINUOUS, PAGE_BREAK where continuous means break will happen on next line and page_break means break will happen on next page.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=ihmd9gi8SBgβ½ Create a header
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where header will be created.
β Outputs:
β» ID of the header created
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=WTWPZxhlLVEβ½ Delete a header
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where header will be deleted.
β» Header-ID: It is the ID of header which will delete the header.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=WTWPZxhlLVEβ½ Create a footer
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where footer will be created.
β Outputs:
β» ID of the footer created
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=eECCxYHULwcβ½ Delete a footer
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Document-ID: ID of the document where footer will be deleted.
β» Header-ID: It is the ID of footer which will delete the footer.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=eECCxYHULwc