diff --git a/components/zoho_crm/actions/download-attachment/download-attachment.mjs b/components/zoho_crm/actions/download-attachment/download-attachment.mjs index 82ee54b2ef675..e5a54193486a7 100644 --- a/components/zoho_crm/actions/download-attachment/download-attachment.mjs +++ b/components/zoho_crm/actions/download-attachment/download-attachment.mjs @@ -5,7 +5,7 @@ export default { key: "zoho_crm-download-attachment", name: "Download Attachment", description: "Downloads an attachment file from Zoho CRM, saves it in the temporary file system and exports the file path for use in a future step.", - version: "0.2.1", + version: "0.2.2", type: "action", props: { zohoCrm, @@ -34,6 +34,16 @@ export default { }), ], }, + // This prop indicates that the otherwise ephemeral /tmp directory is automatically synced to a + // remote directory (if configured for the execution context), making files written by this + // action accessible for future executions. Only files located in STASH_DIR or, for legacy + // action support, whose /tmp file paths are explicitly returned by `run` will be synced. + syncDir: { + type: "dir", + accessMode: "write", + sync: true, + optional: true, + }, }, async run({ $ }) { const file = await this.zohoCrm.downloadAttachment( @@ -43,7 +53,7 @@ export default { $, ); - const filePath = "/tmp/" + this.attachmentId; + const filePath = (process.env.STASH_DIR || "/tmp") + "/" + this.attachmentId; fs.writeFileSync(filePath, file); $.export("$summary", "Successfully downloaded attachment"); diff --git a/components/zoho_crm/actions/upload-attachment/upload-attachment.mjs b/components/zoho_crm/actions/upload-attachment/upload-attachment.mjs index 50567d01b0ce8..fa22d5d04ec97 100644 --- a/components/zoho_crm/actions/upload-attachment/upload-attachment.mjs +++ b/components/zoho_crm/actions/upload-attachment/upload-attachment.mjs @@ -6,7 +6,7 @@ export default { key: "zoho_crm-upload-attachment", name: "Upload Attachment", description: "Uploads an attachment file to Zoho CRM from a URL or file path. [See the documentation](https://www.zoho.com/crm/developer/docs/api/v3/upload-attachment.html)", - version: "0.1.0", + version: "0.1.1", type: "action", props: { zohoCrm, @@ -30,6 +30,15 @@ export default { label: "File Path or URL", description: "The file to upload. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.txt`)", }, + // This prop indicates that a remote directory (if configured for the execution context) is + // automatically synced to the /tmp directory before the action runs, making files in that + // directory accessible for use in this action via the file system. + syncDir: { + type: "dir", + accessMode: "read", + sync: true, + optional: true, + }, }, async run({ $ }) { const data = new FormData(); diff --git a/components/zoho_crm/package.json b/components/zoho_crm/package.json index 1750c0532faa0..e16dd97ce6b59 100644 --- a/components/zoho_crm/package.json +++ b/components/zoho_crm/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/zoho_crm", - "version": "0.6.0", + "version": "0.6.1", "description": "Pipedream Zoho CRM Components", "main": "zoho_crm.app.mjs", "keywords": [