Here are the simplified steps for using your plugin
Set up the GCP(Google Cloud Platform) enabling the docs API.
Visit here for instructions :
https://app.goodspeed.studio/version-test/google-docs-plugin Step by step process of using the Plugin
Take any button or group and attach this action to it.
1. Go to the "Google-doc-redirect-uri" action.
2. Enter the "Client ID" and "Redirect URL" that you got from Google Cloud Platform (GCP).
3. After entering these details, you'll be directed to a screen where you can grant access for creating Google Docs.
4. The "State" field is where you can input any Bubble object that you want to reference later after the redirection.
Remember, the "Client ID" and "Redirect URL" are crucial from GCP, and the "State" can hold any Bubble object for future reference.
Now upon redirection you need to attach a workflow as the user lands on
that page.
5. Obtain the code from the redirect uri as follows & send this to the workflow of gcloud-api-google-oauth : Extract the code part from the URL using regex and remember to remove the "code=" text from it.
6. Similarly obtain the state from the url as earlier and save it somewhere so that can be used later or refered in reference to deciding the text & title of the Google doc.
7. Next step is where you create the google doc for this you use the workflow as gcloud-api-google-docs-creation :
Here you need to enter two variables
a. Authorization : Here we need to enter the access token obtained from step 5 it needs to be preceded by Bearer and set in the Authorization variable.
b.You can set the name of the Google doc Title here. It can be static or some bubble object(needs to be text).
8. Last step is to enter the text in the document created in the last step.
For this we need to enter three variables in Google-Docs -Text to doc
Documentid: Document id obtained from step 7.
Authorization: Here we need to enter the access token obtained from step 5/7 it needs to be preceded by Bearer and set in the Authorization variable, similar to one set in step 7.
Text : text that needs to be entered in the Google Doc.
9. Finally you can direct the user to the google doc using this link :
https://docs.google.com/document/d/{documentId}