Skip to content

Google Drive — Move

Type: googledrive-move  ·  Package: Google Drive v1.0.5  ·  Output: Dictionary<string,object>

Moves a file or folder to another Drive folder. Unlike Copy, it is the same item (it keeps its ID, link and permissions); only its location changes. It is the natural way to mark something as processed: move it from “Inbox” to “Processed”.

Looks up the item’s current folders and leaves it only in folderId: it is removed from every folder it was in. Moving a folder also moves its content.

ParameterTypeDefaultDescription
idstring—ID of the file or folder to move.
folderIdstring—Destination folder ID (root for the root of My Drive).
ParameterTypeDefaultDescription
sessionZoanGoogleDriveSession—Session from Google Drive — Connect. Inside Connect’s body it is inherited and you can leave it empty.

Returns a Dictionary with the item’s updated metadata: moved["parents"] now holds the destination ID.

MessageCause and fix
'id' is required.id is empty or its expression returned null.
'folderId' is required.folderId is empty or its expression returned null.
No Google Drive session available. Provide 'session' from a googledrive-connect activity, or place this activity inside the Connect activity's body …The activity is outside Connect’s body and received no session. Move it inside the body or pass the saved session.
The service drive has thrown an exception. HttpStatusCode is …Google rejected the call: unknown ID or no access, expired token or quota exceeded. See Google API errors.
Google Drive — Connect credential = credential("drive-operations")
└─ body:
Google Drive — Move id = file["id"] folderId = processedId → output: moved