L2 Hub
Google
gdrive
Copy File

L2 Construct: copy_file

drive google

Description

CopyFile creates a copy of the specified Google Drive file with a new title. It returns the ID of the newly created file.

L2 Data

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

Example Step

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

Input

Example

{
  "file_id": "1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc",
  "new_title": "Copy of Monthly Report Template"
}
 

Schema

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

Output

Example

{
  "new_file_id": "1FBZk29WEjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C7Wvd"
}
 

Schema

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