L2 Hub
Google
gdrive
Move File

L2 Construct: move_file

drive google

Description

MoveFile moves a file from one folder to another in Google Drive. It takes the file ID of the file to be moved, the folder ID of the source folder, and the folder ID of the destination folder. You can use "root" as the SourceFolderID to indicate the root folder of the Drive. It returns a boolean indicating whether the operation was successful.

L2 Data

  1. Provider: google
  2. Module: gdrive
  3. Action: move_file

Example Step

{
  "name": "insert-your-step-name",
  "type": "l2",
  "l2_data": {
    "provider": "google",
    "module": "gdrive",
    "action": "move_file",
    "metadata": {}
  }
}
 

Input

Example

{
  "file_id": "1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc",
  "source_folder_id": "root",
  "destination_folder_id": "1GCZk30XFjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C8Xwe"
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/google/gdrive/move-file-input",
  "$ref": "#/$defs/MoveFileInput",
  "$defs": {
    "MoveFileInput": {
      "properties": {
        "file_id": {
          "type": "string"
        },
        "source_folder_id": {
          "type": "string"
        },
        "destination_folder_id": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["file_id", "source_folder_id", "destination_folder_id"]
    }
  }
}
 

Output

Example

{
  "success": true
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/google/gdrive/move-file-output",
  "$ref": "#/$defs/MoveFileOutput",
  "$defs": {
    "MoveFileOutput": {
      "properties": {
        "success": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["success"]
    }
  }
}