insync_download_document
Download a patient portal document by folder URL and file name from listed documents; saves to disk on local installs or returns file bytes inline on hosted servers.
Instructions
Download a document filed to the patient’s portal account. Identify it by the folder_url and file_name from insync_list_documents (full view). On a local install the file is saved to disk and the path returned; on a hosted server the bytes come back inline. The download goes through the portal — never direct storage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_name | Yes | The document’s FileName from insync_list_documents (full view). | |
| folder_url | Yes | The document’s DstFolderURL from insync_list_documents (full view). | |
| output_dir | No | Directory to save into (local install only; ignored on a hosted server, which returns bytes inline). Defaults to INSYNC_OUTPUT_DIR or ~/Downloads; must resolve inside an allowed root. |