# GSuite Supported Activities

> GSuite activities supported by the Activity Migrator tool when migrating Studio automation projects.

Refer to the tables below for the GSuite activities that are supported when using the **Activity Migrator** tool. Each row lists the Source classic activity, the Destination modern activity/activities it migrates to, and the most notable transformations the migrator performs. 

## Scopes

| **Source activity** | **Destination activity/activities** | **Notes** |
| ---| ---| --- |
| Google Workspace Scope (`GSuiteApplicationScope`) | `GSuiteApplicationScope` | Stays as-is; inner activities migrated in place. |
| Use Google Drive (`GoogleDriveApplicationScope`) | `Sequence` (when `UseConnectionService=true`) **or** `GSuiteApplicationScope` (OAuth) | Auth-only scope; injects `ConnectionId` into child activities via scope context. OAuth path sets `OAuthClient = Custom` if both `CredentialID` and `CredentialSecret` are bound, otherwise `UiPath`. |
| Use Google Document (`GoogleDocsApplicationScope`) | `Sequence` / `GSuiteApplicationScope` (+ optional `CreateDocumentConnections` prepended for `CreateNew` / `CreateIfNotExists`) | Document-lifecycle scope. The `Action` enum drives whether a Create activity is prepended; the new document's ID is wired into child activities through a pre-allocated `newDocument` variable. |
| Use Google Spreadsheet (`GoogleSheetsApplicationScope`) | `Sequence` / `GSuiteApplicationScope` (+ optional `CreateSpreadsheetConnections` prepended for `CreateNew` / `CreateIfNotExists`) | Same shape as Docs scope; pre-allocates `newSpreadsheet`. |

## Gmail

| **Source activity** | **Destination activity/activities** |
|---------|------------------|
| Send Email (`SendEmail`) | `SendEmailConnections` |
| Get Mail Messages (`GetMailMessages`) | `GetEmailListConnections` (default) **or** `GetEmailByIdConnections` (+ optional `MarkAsReadUnreadConnections`) when `EmailId` is set. List path appends an `Assign` to convert `List<GmailMessage>` back to the classic `GmailMessage[]`. |
| Change Labels (`ChangeLabels`) | `RemoveEmailLabelsConnections` + `ApplyEmailLabelsConnections`. Labels to remove are computed as `email.LabelIds.Except(["SEND","DRAFT"])`; labels to apply merge the builder + variable inputs, dedupe, and exclude reserved labels. |

## Calendar

| **Source activity** | **Destination activity/activities** |
|---------|------------------|
| Add Attendee (`AddAttendee`) | `GetEventByIdConnections` + `ModifyEventConnections` (sets `ChangeRequiredAttendees=AddRemove`, wraps single email into an array). |
| Create Event (`CreateEvent`) | `CreateEventConnections` (+ `Assign` for `EventId`, `EventUrl` outputs). |
| Delete Event (`DeleteEvent`) | `GetEventByIdConnections` + `DeleteEventConnections`. Maps `InstancesOption` → `DeleteType` enum (`THIS_EVENT`/`THIS_AND_FOLLOWING_EVENTS`/`ALL` → `SingleEvent`/`FutureOnly`/`PastAndFuture`). |
| Modify Event (`ModifyEvent`) | `GetEventByIdConnections` + `ModifyEventConnections` (+ `Assign` for `EventId` output). Sets `ChangeRequiredAttendees=Overwrite`. |
| Search Events (`SearchEvents`) | `GetEventByIdConnections` (when `EventId` set) **or** `GetEventListConnections`. When the classic `Result` (raw `Event[]`) is bound, an HTTP bridge re-fetches the raw `Event` JSON; see *HTTP Bridge* below. |

## Drive

| **Source activity** | **Destination activity/activities** |
|---------|------------------|
| Copy File (`CopyDriveFile`) | `CopyFileConnections` (+ a prepended `GetFileFolderConnections` when `NewParentId` is null, to resolve the file's current parent) (+ `Assign` for the `Result` ID). |
| Move File (`MoveDriveFile`) | `MoveFileConnections` (+ a prepended `GetFileFolderConnections` when `NewParentId` is null). |
| Create Folder (`CreateFolder`) | `CreateFolderConnections` (+ `Assign` for `Result` ID). `ConflictResolution` hardcoded to `AddSeparate`. |
| Create Document (`CreateDocument`) | `CreateDocumentConnections` (+ `Assign` for `Result` ID). |
| Create New Spreadsheet (`CreateNewSpreadsheet`) | `CreateSpreadsheetConnections` (+ two `Assign` activities: `FileURL` ← `item.Url`, `SpreadsheetId` ← `item.ID`). |
| Delete File (`DeleteFile`) | `DeleteFileOrFolderConnections`. `PermanentlyDelete` hardcoded to `true` to match classic behaviour. |
| Share File (`CreateFilePermission`) | `ShareFileFolderConnections`. |
| Delete File Permission (`DeleteFilePermission`) | `DeleteFileFolderPermissionConnections`. |
| Update File Permission (`UpdateFilePermission`) | `UpdateFileFolderPermissionConnections` (+ HTTP bridge for the `Result` output, see below). |
| Get File Permissions (`GetFilePermissions`) | `GetFileFolderPermissionsConnections` (+ HTTP bridge for the `Result` output). |
| Download File (`DownloadFile`) | `DownloadFileConnections`. `ConflictResolution` hardcoded to `Replace` to preserve classic always-overwrite behaviour. |
| Upload File (`UploadFile`) | `UploadFilesConnections` (+ `Assign` for `Result` ID). `FilesInputMode` hardcoded to `Single`; `LocalFilePath` wrapped with `LocalResource.FromPath(...)`. |
| Find Files and Folders (`FindFiles`) | `GetFileListConnections` (+ optional `Assign` for `FirstResultId`) (+ HTTP bridge `ForEach` for the `Result` output). Hardcodes the search location to `"root"` (My Drive) — see action items below. |
| Get File Info (`GetFileInfo`) | `GetFileFolderConnections` (+ HTTP bridge for the `Result` output). |

## Documents

| **Source activity** | **Destination activity/activities** |
|---------|------------------|
| Read All Text (`ReadAllText`) | `ReadTextConnections`. `ReadTextMode` hardcoded to `AllText`. |
| Insert Text (`InsertText`) | `WriteTextConnections`. Maps `Position` (`START`/`END`) → `WriteTextMode` (`BeginningOfDocument`/`EndOfDocument`). `AT_INDEX` is unsupported (action required). |
| Replace Text (`ReplaceText`) | `FindAndReplaceTextConnections`. `ReplaceBehavior` hardcoded to `AllReccurences`. |
| Get Document (`GetDocument`) | `GetDocumentConnections` (+ HTTP bridge for the `Result` output). |

## Sheets

| **Source activity** | **Destination activity/activities** |
|---------|------------------|
| Add New Sheet (`AddNewSheet`) | `AddSheetConnections`. `ConflictResolution` hardcoded to `Fail`. |
| Read Range (`ReadRange`) / Write Range (`WriteRange`) | `ReadRangeConnections<DataTable>` / `WriteRangeConnections`. Concatenates `SheetName` + cell/range reference into one `"Sheet!Range"` string. `WriteRange.WriteMode` hardcoded to `Overwrite`. |
| Read Cell (`ReadCell`) / Write Cell (`WriteCell`) | `ReadCellConnections<object>` / `WriteCellConnections`. `WriteCell.Value` cast `string` → `object`. |
| Read Column (`ReadColumn`) / Read Row (`ReadRow`) | `ReadColumnConnections` / `ReadRowConnections` (+ `Assign` to bridge `DataRow.ItemArray` for `ReadRow`). |
| Append Row (`AppendRow`) | `WriteRowConnections`. `WriteMode` hardcoded to `Append`. |
| Get Cell Color (`GetCellColor`) | `GetCellColorConnections` (+ HTTP bridge for the `Color` output). |
| Delete Sheet (`DeleteSheet`) / (`RenameSheet`) | `DeleteSheetConnections` / `RenameSheetConnections`. |
| Delete Range (`DeleteRange`) | `DeleteRangeConnections`. Maps `Shift` (`UP`/`LEFT`) → `DeleteMode` (`Rows`/`Columns`). |
| Clear Range (`ClearRange`) | `DeleteRangeConnections` with `DeleteMode` hardcoded to `None`. |
| Auto Fill Range (`AutoFillRange`) | `AutoFillRangeConnections`. |
| Copy Paste Range (`CopyPasteRange`) | `CopyPasteRangeConnections`. |
| Add Delete Columns (`AddDeleteColumns`) | `DeleteColumnConnections` (DELETE) **or** `ForEach<int>` + `WriteColumnConnections` (INSERT). |
| Add Delete Rows (`AddDeleteRows`) | `DeleteRowsConnections` (DELETE) **or** `ForEach<int>` + `WriteRowConnections` (INSERT). |

## Apps Script

| **Source activity** | **Destination activity/activities** |
|---------|------------------|
| Run Script (`RunScript`) | `RunScriptConnections` (+ `Assign` to convert `IDictionary<string, object>` → `Dictionary<string, object>` for the `Result` output). Flattens `RequiredScopes` (`IEnumerable<IEnumerable<string>>`) → `string[]` via `SelectMany().ToArray()`. |

## Helper Activities

Several classic activities expose outputs typed as raw Google API types (`Google.Apis.Drive.v3.Data.File`, `Permission`, `Calendar.v3.Data.Event`, `Sheets.v4.Data.Color`, `Docs.v1.Data.Document`). The modern equivalents return UiPath wrapper types (`GDriveRemoteItem`, `GDriveItemPermission`, `GSuiteEventItem`, `System.Drawing.Color`, …). These types are not assignment-compatible, so a workflow that consumes the raw output downstream would break after migration.

The **HTTP Bridge** closes this gap. When the migrator detects a bound classic output and can resolve the relevant identifiers from the source as literal expressions, it appends an `HttpRequestConnections` + `Assign` pair:
* Assign (`System.Activities.Statements.Assign`)
* Google Workspace HTTP Request (`UiPath.GSuite.Activities.HttpRequestConnections`)

The bridge is used by `SearchEvents`, `UpdateFilePermission`, `GetFilePermissions`, `FindFiles`, `GetFileInfo`, `GetDocument`, and `GetCellColor`.
