diff --git a/components/zoho_workdrive/actions/download-file/download-file.mjs b/components/zoho_workdrive/actions/download-file/download-file.mjs index 9eef2d47a9e15..9080869675251 100644 --- a/components/zoho_workdrive/actions/download-file/download-file.mjs +++ b/components/zoho_workdrive/actions/download-file/download-file.mjs @@ -7,7 +7,7 @@ export default { key: "zoho_workdrive-download-file", name: "Download File to Tmp Direcory", description: "Download a file to the /tmp directory. [See the documentation](https://workdrive.zoho.com/apidocs/v1/filesfolders/downloadserverfile)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { app, @@ -78,11 +78,12 @@ export default { }, }, async run({ $ }) { - const fileName = this.fileName || this.fileId.label; + const fileId = this.fileId?.value ?? this.fileId; + const fileName = this.fileName ?? this.fileId?.label ?? "file"; const filePath = getFilePath(fileName); const fileContent = await this.downloadFile({ - fileId: this.fileId.value, + fileId, }); fs.writeFileSync(filePath, fileContent); diff --git a/components/zoho_workdrive/package.json b/components/zoho_workdrive/package.json index c4b44187c19bc..d361bdf9bb8b2 100644 --- a/components/zoho_workdrive/package.json +++ b/components/zoho_workdrive/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoho_workdrive", - "version": "0.2.1", + "version": "0.2.2", "description": "Pipedream Zoho WorkDrive Components", "main": "zoho_workdrive.app.mjs", "keywords": [