Hi everyone,
I’m currently working on a Zap that takes a signed document from DocuSign and uploads it to Egnyte in PDF format. Here’s what I’m trying to achieve and the issues I’m facing:
What I’m Trying to Do:
1. Trigger: Once a document is signed or completed in DocuSign.
2. Action: Convert the signed document (byte stream) from DocuSign into a PDF.
3. Upload: Send the PDF file to Egnyte using the Egnyte Upload API.
Docusign Envelope completed->DocusignApi activated->upload to egnyte.
What I’ve Tried:
• I am receiving the byte stream from DocuSign correctly.
• I’m trying to use Code by Zapier (Python or JavaScript) to process the byte stream and upload it to Egnyte.
• I attempted the following approaches:
• Returning the file directly using Code by Zapier.
• Converting the byte stream to base64 and trying to return the content to use in subsequent steps.
• I also tried encoding the file in Python, and returning the file object with fields like filename, content, and contentType.
The Problems/Errors I’m Facing:
1. Zapier Code Step Limitations: I can’t seem to upload the file directly from the Code by Zapier step because Zapier doesn’t allow external HTTP requests (e.g., using requests library in Python).
2. File Handling in Next Steps: In the subsequent steps, I’m unable to select the file properly, and the content looks corrupted (e.g., a PDF file that can’t be opened).
3. Egnyte Upload: When trying to manually handle the API, I receive errors like:
• SyntaxError: Cannot use import statement outside a module (when trying to use imports in Python code).
• Issues with encoding the byte stream to base64 and returning it as a valid file object for Zapier.
Questions:
• Is there a better way to handle file uploads from DocuSign to Egnyte using Zapier?
• How should I properly convert the byte stream from DocuSign to a file that can be uploaded to Egnyte?
• Does anyone have experience with uploading files from DocuSign to Egnyte in Zapier, and if so, could you share the best practices or workaround?
Any help would be appreciated! Thanks in advance.