Overview of the Google Drive plugin
Google Drive is Google's online file storage and synchronization service, which can be used for file storage and backup, as well as for project collaboration.
The Google Drive plugin contains functions and types that allow you to programmatically access your files on Google Drive.
Get started with Google API's
Google API's is a set of application programming interfaces (API's) developed by Google which allow for communication with Google Services.
Two Linx plugins support integration to Google API's:
Google Drive
Google Sheets
Google Drive is Google's online file storage and synchronization service, which can be used for file storage and backup, as well as for project collaboration.
Google Sheets is a web-based application for creating and editing spreadsheets.
To integrate Linx with a specific Google API, you need the following:
- A Google account
- A Google API project (set up on Google Console)
- An enabled API (e.g. Google Drive) added to your Google API project
- Connection credentials (e.g. a Service account key) created on Google Console
- A Linx solution containing:
- the Google Drive or Google Sheets plugin
- relevant Functions or Types from the plugin
- the Google API connection credentials
To integrate Linx with a Google API, do the following:
- Enable a specific Google API for your Google account
- Go to the Google API Console.
- Create a project for your Google account.
- Add and enable the Google Drive API for your project.
Do this:- Click Enable APIs and services, or go to the API library (available in menu on the left) to select an API.
- Click on the Google Drive API.
- Click Enable.
- Create Credentials for access to your Google Drive.
Do this:- Click Credentials (available in menu on the left).
- Click + Create Credentials (top menu), and select 'Service account Key'.
- Provide the requested details specific to your application.
- Create a Service account name and Service account ID.
- Click Continue to skip setting up an optional role for the service account.
- Click Done.
- Click Manage service accounts.
- Click on the Actions icon, then click Create key.
- Select JSON and click Create to download a credentials file for use in your Linx solutions.
- In this guide the Google Drive API is used as example, but the process is similar for Google Sheets.
- The steps are intended as guidelines and not as definitive documentation of Google API's. Our guidelines are correct at the time of publishing. References to Google developer documentation are included for your benefit.
- The exact display and flow of the steps above may depend on your Google account type, as well as the number of existing projects, enabled API's and credentials you already have.
- Create your Linx solution
- Add the Google Drive plugin to your Solution.
- Select a relevant Function or Type and drag it onto the design canvas.
- Provide your Google API connection details.
- Set the other properties for the selected Function / Type.
Steps:
Also see Google Developer.
Also see Google Developer.
Note:
Steps:
The content of the JSON file that you downloaded in Step 1.4(g) above, can be copied and pasted into the Expression Editor for this property.
Functions
About
- GetAbout: Gets information about the user, the user's Drive, and system capabilities.
Changes
- GetStartPageToken: Gets the starting pageToken for listing future changes.
- ListChanges: Lists the changes for a user or shared drive.
Comments
- CreateComment: Creates a new comment on a file.
- DeleteComment: Deletes a comment.
- GetComment: Gets a comment by ID.
- ListComments: Lists a file's comments.
- UpdateComment: Updates a comment with patch semantics.
Files
- CopyFile: Creates a copy of a file.
- CreateFile: Creates a new file.
- DeleteFile: Permanently deletes a file owned by the user without moving it to the trash.
- EmptyTrash: Permanently deletes all of the user's trashed files.
- ExportFile: Exports a Google Doc to the requested MIME type and returns the exported content.
- GenerateFieldIds: Generates a set of file IDs which can be provided in create or copy requests.
- GetFile: Gets a file's metadata or content by ID.
- ListFiles: Lists or searches files.
- UpdateFile: Updates a file's metadata and/or content with patch semantics.
Permissions
- CreatePermission: Creates a permission for a file or shared drive.
- DeletePermission: Deletes a permission.
- GetPermission: Gets a permission by ID.
- ListPermissions: Lists a file's or shared drive's permissions.
- UpdatePermission: Updates a permission with patch semantics.
Replies
- CreateReply: Creates a new reply to a comment.
- DeleteReply: Deletes a reply.
- GetReply: Gets a reply by ID.
- ListReplies: Lists a comment's replies.
- UpdateReply: Updates a reply with patch semantics.
Revisions
- DeleteRevision: Permanently deletes a file version for files with binary content in Google Drive, like images or videos.
- GetRevision: Gets a revision's metadata or content by ID.
- ListRevisions: Lists a file's revisions.
- UpdateRevision: Updates a revision with patch semantics.
Types
- ContentHintsData: Creates a reusable type for additional information about the content of a file.
- ThumbnailData: Creates a reusable type for thumbnail data of a file.
Links
Google Developer documentation