> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.google.drive.DeleteFileOrFolder

- Component: `appmixer.google.drive.DeleteFileOrFolder`
- Kind: Action
- Version: 2.0.0
- Visibility: Public
- Connector: [appmixer.google.drive 2.5.0](https://connectors.appmixer.com/connector/appmixer.google.drive/2.5.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.google.drive/2.5.0/component/appmixer.google.drive.DeleteFileOrFolder>

Delete a file or folder from your Google Drive permanently, or move it to the trash.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Google Drive File or Folder ID (`fileId`) | googlepicker | The ID of the Google Drive file or folder. |
| Move to trash (`moveToTrash`) | toggle | When enabled, the file or folder is moved to the trash (it can be restored for 30 days and the Deleted File or Folder trigger reports it). When disabled, it is deleted permanently. A folder moved to the trash takes its contents with it. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| GDrive File or Folder ID (`googleDriveFileId`) | string | - |
| File ID (`fileId`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.google.drive.DeleteFileOrFolder",
  "author": "David Durman <david@client.io>",
  "description": "Delete a file or folder from your Google Drive permanently, or move it to the trash.",
  "version": "2.0.0",
  "private": false,
  "auth": {
    "service": "appmixer:google:drive",
    "scope": [
      "https://www.googleapis.com/auth/drive",
      "https://www.googleapis.com/auth/drive.readonly"
    ]
  },
  "quota": {
    "manager": "appmixer:google:drive",
    "resources": "readandwrite",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "fileId": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object"
              }
            ]
          },
          "moveToTrash": {
            "type": "boolean"
          }
        },
        "required": [
          "fileId"
        ]
      },
      "inspector": {
        "inputs": {
          "fileId": {
            "type": "googlepicker",
            "view": [
              "DOCS",
              "FOLDERS"
            ],
            "index": 1,
            "label": "Google Drive File or Folder ID",
            "tooltip": "The ID of the Google Drive file or folder."
          },
          "moveToTrash": {
            "type": "toggle",
            "index": 2,
            "label": "Move to trash",
            "defaultValue": false,
            "tooltip": "When enabled, the file or folder is moved to the trash (it can be restored for 30 days and the Deleted File or Folder trigger reports it). When disabled, it is deleted permanently. A folder moved to the trash takes its contents with it."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "GDrive File or Folder ID",
          "value": "googleDriveFileId",
          "schema": {
            "type": "string",
            "example": "1pg87Zh20jkToMgYsM2p1kQhUb2YbKPbn"
          }
        },
        {
          "label": "File ID",
          "value": "fileId",
          "schema": {
            "type": "string",
            "example": "1pg87Zh20jkToMgYsM2p1kQhUb2YbKPbn"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
