Cant seem to locate the URL Parameter in Bubble API? Any advice? Great videos, I have watched from first video - my head is spinning but I am soooo close, just cant locate URL Parameters.
Hey thanks for the kind words and glad you found the videos helpful. APIs can be a 2x4 to the head the first few times arounds 😂. Keys are (1) handling authentication and there are different types like OAuth 2.0 in this case or API key (2) making the requests and (3) handling the response in a useful way in Bubble. Good luck!
Hey yes, you can fetch a file from Google Drive using the Google Drive API and then save it to the Bubble.io database. However, note that the Bubble database doesn't directly store files but stores a reference (URL) to the file... which you might be able to overcome using the :savedto3 operator (manual.bubble.io/core-resources/data/operations-and-comparisons#saved-to-s3-1) which works for images but I'm not 100% confident to say so for other files types. Here are the general steps to do it thoguh: 1. Setup Google Drive API Similar to the Google Sheets API, setup Google Drive API in your Google Cloud Console, get your API keys or setup OAuth 2.0, and add necessary scopes (www.googleapis.com/auth/drive or www.googleapis.com/auth/drive.readonly) to access files from Google Drive. 2. Setup API Call in Bubble.io API Connector In the Bubble.io API connector, setup a GET call to Google Drive API to fetch a file. For example, to get the metadata and download URL of a file, the GET request would look like: www.googleapis.com/drive/v3/files/{fileId}?alt=media&key={YOUR_API_KEY}. The {fileId} is the ID of the file you want to fetch and {YOUR_API_KEY} is your API key or access token. 3. Save to Bubble.io Database Once you've got the file URL from Google Drive, you can create a new thing in your Bubble.io database and store the URL. For example, you might have a Data Type called "Document" with a field called "File URL". You can then create a new "Document" and set the "File URL" to the URL you got from the Google Drive API. 4. Access the File in Your App Once the file URL is stored in your Bubble.io database, you can use it in your app. For example, you could display the file in a document viewer element, or create a link that users can click to download the file. Remember that when dealing with larger files, be aware you may encounter performance issues or timeouts. Good luck.
@NoCodeAcademy Wow! I did not expect such complete answer! Thank a lot, I will test this tomorrow. I have a small experience in programming (php html css javascript) but I'm totally new with API, your videos help me even if I'm still unable to set a call properly, will try again your previous video also. Do you know any documentation or video to thoroughly understand google API & Oauth? Thanks again!
@@toba-bonjour you're welcome. For Google APIs and Oauth2.0 setup, study the implementation shown in th-cam.com/video/1XUu7-yIoUY/w-d-xo.html. Also, for APIs in general, take a look at Bubble's video about the topic th-cam.com/video/nO8PSqeJaWk/w-d-xo.html.
@@NoCodeAcademy Hey, I have successfully fetch a pdf from google Drive. I just called the file by his ID and select "file" from the Data type list (API connector). The file goes into the file manager with the name "api_initialize_file". I do not understand what you said about the fact that Bubble database does not directly store files but references (URL). Could you explain because to me the api_initialize_file (pdf) leads toward a true pdf when I click on it. Hope I am clear.
Hey, great video. I'm a little confused on how to get this done if we're sending multiple columns at the same time. I know you briefly touched on it but didn't really explained. Would you please explain how to map the data?
Hi thanks for the comment. If I were attempting to get or send multiple columns of data, I would simply string together several API calls, one for each column of data. There may be a more advanced way to work with range values but the video is more about the mechanics of making a connection. Hope that helps.
Hi I get Error Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential status": "UNAUTHENTICATED
Hi thanks for your comment. Check out th-cam.com/video/1XUu7-yIoUY/w-d-xo.html to ensure the OAuth 2 steps are setup correctly and see if that gets things going for you.
Cant seem to locate the URL Parameter in Bubble API? Any advice? Great videos, I have watched from first video - my head is spinning but I am soooo close, just cant locate URL Parameters.
got it, no worries.
Hey thanks for the kind words and glad you found the videos helpful. APIs can be a 2x4 to the head the first few times arounds 😂. Keys are (1) handling authentication and there are different types like OAuth 2.0 in this case or API key (2) making the requests and (3) handling the response in a useful way in Bubble. Good luck!
Interesting! Thank you for this video! Would it be possible to get a file from Drive API and store it in bubble database ?
Hey yes, you can fetch a file from Google Drive using the Google Drive API and then save it to the Bubble.io database. However, note that the Bubble database doesn't directly store files but stores a reference (URL) to the file... which you might be able to overcome using the :savedto3 operator (manual.bubble.io/core-resources/data/operations-and-comparisons#saved-to-s3-1) which works for images but I'm not 100% confident to say so for other files types.
Here are the general steps to do it thoguh:
1. Setup Google Drive API
Similar to the Google Sheets API, setup Google Drive API in your Google Cloud Console, get your API keys or setup OAuth 2.0, and add necessary scopes (www.googleapis.com/auth/drive or www.googleapis.com/auth/drive.readonly) to access files from Google Drive.
2. Setup API Call in Bubble.io API Connector
In the Bubble.io API connector, setup a GET call to Google Drive API to fetch a file. For example, to get the metadata and download URL of a file, the GET request would look like: www.googleapis.com/drive/v3/files/{fileId}?alt=media&key={YOUR_API_KEY}. The {fileId} is the ID of the file you want to fetch and {YOUR_API_KEY} is your API key or access token.
3. Save to Bubble.io Database
Once you've got the file URL from Google Drive, you can create a new thing in your Bubble.io database and store the URL. For example, you might have a Data Type called "Document" with a field called "File URL". You can then create a new "Document" and set the "File URL" to the URL you got from the Google Drive API.
4. Access the File in Your App
Once the file URL is stored in your Bubble.io database, you can use it in your app. For example, you could display the file in a document viewer element, or create a link that users can click to download the file.
Remember that when dealing with larger files, be aware you may encounter performance issues or timeouts. Good luck.
@NoCodeAcademy Wow! I did not expect such complete answer! Thank a lot, I will test this tomorrow. I have a small experience in programming (php html css javascript) but I'm totally new with API, your videos help me even if I'm still unable to set a call properly, will try again your previous video also. Do you know any documentation or video to
thoroughly understand google API & Oauth? Thanks again!
@@toba-bonjour you're welcome. For Google APIs and Oauth2.0 setup, study the implementation shown in th-cam.com/video/1XUu7-yIoUY/w-d-xo.html. Also, for APIs in general, take a look at Bubble's video about the topic th-cam.com/video/nO8PSqeJaWk/w-d-xo.html.
@@NoCodeAcademy Hey, I have successfully fetch a pdf from google Drive. I just called the file by his ID and select "file" from the Data type list (API connector). The file goes into the file manager with the name "api_initialize_file". I do not understand what you said about the fact that Bubble database does not directly store files but references (URL). Could you explain because to me the api_initialize_file (pdf) leads toward a true pdf when I click on it. Hope I am clear.
@@toba-bonjour Hey for any additional help, grab a time from the coaching link in the video description.
Could this be done in reverse? Inputting data into a form made on bubble and send that info into a sheet?
Hey yes, in case you didn't see that one yet it's over in this pt 2 video th-cam.com/video/QXXRd0nVQ0w/w-d-xo.html
Hey, great video. I'm a little confused on how to get this done if we're sending multiple columns at the same time. I know you briefly touched on it but didn't really explained. Would you please explain how to map the data?
Hi thanks for the comment. If I were attempting to get or send multiple columns of data, I would simply string together several API calls, one for each column of data. There may be a more advanced way to work with range values but the video is more about the mechanics of making a connection. Hope that helps.
In the 1st video you didn't show how u got the Headers Value
Hi I get Error Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential status": "UNAUTHENTICATED
Hi thanks for your comment. Check out th-cam.com/video/1XUu7-yIoUY/w-d-xo.html to ensure the OAuth 2 steps are setup correctly and see if that gets things going for you.