Salesforce to Google drive file transfer - google-drive-api

I am trying to download all the attachments from salesforce to upload them in google drive and leave a google drive link in salesforce against each object to access the file from google drive. Is there a process or tool that I can use to implement in this?
I have tried connecting to salesforce API to access the files but I looking for ideal solution to perform this.

Related

Flutter URL to create and open a new google drive folder

I'm wondering is there a URL I can run that will create a new Google Drive folder and then open it in the Google Drive app (on phone or tablet).
I know you can create the folder via the google drive API, but not open the Google Drive app it seems.
I'm looking for something like the Google Maps URL where you specify e.g. destination coordinates in the URL and it opens with the route to those coordinates.
Many thanks for any help with this.
I'm afraid that creating a folder that way is not possible. You can however, do it through the API. The flow would be as follows:
Your application requests the user's authorization.
The user logs in to his Google account and accepts.
Your application creates a folder in his Google Drive instance.
Your application retrieves the link of the newly created folder.
Your application opens the URL. In case the user has the "Google Drive" application, and he has not set Google Drive links to open with another app by default, it will be open with the app.
You can read more about how to create a Drive Folder using the Google Drive API for Dart here:
Dart GoogleAPIs Package: Library to use several Google APIs.
Files create endpoint: Endpoint to call to create a folder. To create it, you will have to set the "mimeType" in the request body to: application/vnd.google-apps.folder

View and audit all App Scripts on GSuite domain

Is there a way for me to be able to view and audit all app scripts created in my gsuite domain being an admin, without it being shared with me? I know that I'm able to pull all files in drive using vault and I assume if the app script files were still in drive, I could probably have searched for them that way, but that doesn't work anymore.
Yes, you can use Vault to search for the Scripts projects. The GAS files will display this icon next to the script title https://ssl.gstatic.com/docs/doclist/images/mediatype/icon_1_script_x16.png
You can use Vault to download it but it will be a json file, you can't preview the GAS JSON file but you can use the Drive API to import it to your own account, more info at Import Google app script project from JSON file

Opening a file on Google Drive directly in a Google Drive App

If I open the shareable link I have got for a file from Google Drive in the browser, I always get either to the Drive's internal preview program or to a download page (See below).
I would like to know whether there is a programmatic way to launch a specific drive-connected application (with confirmed access permissions) to open a file for which I have the link (and thus, the ID as well).
I don't want to do this through the drive's interface, but rather within my program. Let's say I want to let the users browse their files and open them in the browser with their default app as they have defined it on their drive (and let's say I already know that app).
To make it clear, I just want to achieve what Google Drive's interface does in the browser: You click a file, and it opens in a new tab in your default app.
In my opinion, this is possible with the use of Advanced Drive Service and Drive Service.
Advanced Drive Service
The advanced Drive service allows you to use the Google Drive web API in Apps Script. Much like Apps Script's built-in Drive service, this API allows scripts to create, find, and modify files and folders in Google Drive. In most cases, the built-in service is easier to use, but this advanced service provides a few extra features, including access to custom file properties as well as revisions for files and folders.
and for the Drive Service, you can use getUrl() method to get the URL that can be used to open the File in a Google App like Drive or Docs.
This service allows scripts to create, find, and modify files and folders in Google Drive.
Detailed information and sample codes regarding these services can be found in the documentations.

Upload file in a specified google drive with google drive api

I am using Google Drive REST API. Using this app I can upload the file to Google Drive. But I faced some technical problem.
Is it possible to upload files to a specified Google Drive?
Is it possible to fix the access code of Google Drive?
Yes it's possible.
It is the access token that tells Drive which account it should operate on. So read and understand OAuth and you're good to go.

Sending Text data to Google Drive from Javascript

Is it possible to send data from the JavaScript to the Google Drive . I am trying to send my local storage datas to the google drive.
Kindly suggest me a solution for the same.
The Google Drive SDK documentation includes a complete JavaScript quickstart guide that shows how to upload a file to Drive from JavaScript:
https://developers.google.com/drive/quickstart
It should be pretty straightforward to edit the sample code to use local storage instead of the file uploaded from a form.