Hello community members,
I am trying to implement a file input to zapier when a new item is added. The response receives a base64 encoded text in utf-8. I need to convert this into file such that while creating zaps I can add a file. (Similar to attachments in Gmail trigger).
I am implementing it in trigger while I am modifying the parse function as follows:
async function getFile(file_data) {
const encoded_file = file_data.upload_file;
var file_byte = Buffer.from(encoded_file, 'base64');
const stashFile = await z.stashFile(file_byte, file_byte.length, file_data.file_name, file_data.mime_type);
return stashFile
}
The file_data is dictionary with following definition example:
{
“file_name”: “Name.png”,
“upload_file”: “iVBourofdsnf9er/gas//codof-==”
“mime_type”: “image/png”
}
It shows following error:
What are the definitions of create or hydration function?