For the complete documentation index, see llms.txt. This page is also available as Markdown.

Upload

Upload objects to Google Drive.

Task version: 1.1.0

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

SourceDirectory : String

Source directory.

Default: - Example: c:\temp, \network\folder

FileMask : String

Windows-style filemask. Empty field = all objects ().

If you want to upload only one file, define exact filename as filemask.

Consider using .zip (for example) when uploading multiple objects at the same time.

Default: Example: . , ?file.*, foo*.txt, singlefile.txt

TargetFolderId : String

Id of the target Google Drive folder.

Default: - Example: 42o3j8D7cmhMJFAAlbZb5B_8u9OqnAIkn

🗝ServiceAccountKeyJSON : String

The JSON service account key generated in the Google Cloud portal.

Value can be either JSON string or full filepath to JSON file.

Default: - Example: { "type": "service_account", "project_id": "something", "private_key_id": "fdsafdsafdsalmnop12345678909876543212344", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIE.......Hw==\n-----END PRIVATE KEY-----\n", "client_email": "someone@something.iam.gserviceaccount.com", "client_id": "123456789012345678900", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www....nt.com" } , C:\temp\ServiceAccountKeyJSON.json

IncludeSharedDrives : Boolean

Whether to enable support for shared drives.

Default: False Example: false

Name
Description

ThrowErrorOnFailure : Boolean

Value indicating whether upload error should stop the Task and throw an exception (true) or try to add the error message to Result.ErrorMessages and continue to upload next file.

Default: True Example: true

ThrowErrorIfNoMatch : Boolean

Throw error if there are no file(s) in the path matching the filemask.

Default: - Example: false

Task Result

Name
Description

Success : Boolean

Gets a value indicating whether upload was executed successfully. Example: true

Data : List<UploadResult>

List of upload result(s). Example: { {"id", "filename"}, {"id", filename"} }

ErrorMessage : List<Object>

Gets error message. Example: { {"An error occured..."}, {"An error occured..."} }

Task Changelog

Changelog for Task Frends.GoogleDrive.Upload.

[1.1.0]

Added

  • Added a flag for shared drive support in the file search

[1.0.1] - 2023-12-07

Changed

  • Input.ServiceAccountKeyJSON and Result.ErrorMessage documentation update.

[1.0.0] - 2023-11-15

Added

  • Initial implementation

Last updated

Was this helpful?