file_url. The typical use is filing a completed intake form into an EHR: this tool produces the PDF, and an EHR upload tool consumes the file_url it returns — on this platform that is advancedmd_op_ehr_upload_document, which ships separately from this tool.
Read-only against DocuSign. Nothing is sent, voided or modified.
See DocuSign integration for authentication and setup.
Inputs
Outputs
available_documents is returned on the same call as the download, so you do not need a separate listing step to discover what else the envelope holds. It is omitted if the listing call fails — the download is still attempted and reported.
Picking a document id
Only two ids are predictable:1 is always the first document (the signed form), and combined is always the whole envelope merged. Everything else depends on how the template was built, so read available_documents rather than guessing.
For a single-document intake packet, the default is what you want. For a multi-document envelope where the whole signed set should be filed as one attachment, use combined.
Check the envelope is completed first
Only an envelope with statuscompleted contains signed content. Downloading from a sent or delivered envelope returns the unsigned form, which is rarely what you want and is easy to file into a chart by mistake. Call docusign_get_envelope and check is_completed before downloading.
Limits
- 25 MB per document. Larger documents are refused rather than truncated — a clipped PDF filed into a patient record is worse than a failed step. Download oversized documents directly from DocuSign.
- A document that arrives empty is reported as an error, not stored as a zero-byte file.