Skip to main content

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.

Hi @etheetla1 

Help link for using files in Zaps: https://zapier.com/help/create/basics/send-files-in-zaps

For us to have more context, post screenshots showing how your Zap steps are outlined and configured in EDIT mode as well as any encountered errors.


Hi @etheetla1, welcome to the Community! 😁

I don’t think you’d need a code step here. It looks as though the Envelope Status Updated trigger gives access to a publicly-accessible download link for the signed/completed file: 
30a84253fa917f2f4338ecdf3b3b0927.png

If you open up the file that’s linked to in the documentFileUrl field, is it a PDF version of the file? 

If it’s already in a PDF format then you can just map that documentFileUrl field to the File field on the Upload File (Egnyte) action.

But if it’s not in a PDF format, you can either:

  • use an app like ConvertAPI to convert the file into PDF format.
  • or upload it to Google Drive and select the PDF version of the file:

     

Hope that helps to get you pointed in the right direction. If you run into issues on that or have any questions just let us know! 


Reply