Skip to content

Automations

MASV Agent lets you automate file transfer tasks to save time and support robust workflows. Creating an automation returns an automation_id, which you can use to query, update, and delete the automation.

Terminal window
masv automation ls

A Portal download automation automatically picks up new Packages uploaded to a specified Portal and queues them as downloads. The downloads can be managed the same way as user-initiated downloads.

Terminal window
masv automation add download \
--name "AUTOMATION_NAME" \
--subdomain "PORTAL_SUBDOMAIN" \
--destination "DESTINATION_FOLDER" \
--create-package-folder=true \
--effective-time "2025-01-20 00:00:00" \
--enable=true \
--priority 1
NameTypeRequiredDescription
nameStringYesCustom automation name.
subdomainStringYesSubdomain of the Portal to monitor. The Portal must be owned by the Team of the signed-in user.
destinationStringYesDestination folder where Packages will be downloaded.
create-package-folderBooleanNoPlace Package contents in dedicated subdirectories (default true).
effective-timeStringNoRFC 3339 date/time after which uploaded Packages will be downloaded. Setting a past date downloads all Packages uploaded after that point.
enableBooleanNoEnable the automation immediately (default true).
priorityIntegerNoTransfer priority assigned to all created downloads.
Terminal window
masv automation update download {automation_id} \
--name "NEW_AUTOMATION_NAME" --disable

Updatable fields: create-package-folder, destination, priority, effective-time, enabled, name, subdomain.


An all-Portals download automation polls every Portal associated with a specified Team for available Packages and queues them as downloads.

Terminal window
masv automation add download \
--all \
--name "AUTOMATION_NAME" \
--team-id "TEAM_ID" \
--create-package-folder=true \
--create-portal-subfolder=true \
--destination "DESTINATION" \
--effective-time "2025-01-20 00:00:00" \
--enable=true \
--priority 8
NameTypeRequiredDescription
allFlagYesIndicates this is an all-Portals download automation.
nameStringYesCustom automation name.
team-idStringYesTeam ID to poll for Portal Packages. The signed-in user must belong to this Team.
destinationStringYesDestination folder where Packages will be downloaded.
create-package-folderBooleanNoPlace Package contents in dedicated subdirectories (default true).
create-portal-subfolderBooleanNoPlace Package folders within directories named after the originating Portal.
effective-timeStringNoRFC 3339 date/time after which uploaded Packages will be downloaded.
enableBooleanNoEnable the automation immediately (default true).
priorityIntegerNoTransfer priority assigned to all created downloads.
Terminal window
masv automation update download {automation_id} \
--name "NEW_AUTOMATION_NAME" --disable

Updatable fields: create-portal-subfolder, destination, priority, effective-time, enabled, name, team-id.


A watch folder is an upload automation that monitors a directory for subfolders. After a timeout passes without detecting file modifications, each subfolder is sent as a Package.

There are two types of watch folder automations:

  • Send (Team) upload — sends subfolders to configured email recipients.
  • Portal upload — sends subfolders to a configured Portal.
Terminal window
masv automation add upload email \
--name "AUTOMATION_NAME" \
--enable=true \
--path "PATH_TO_WATCH" \
--team-id "TEAM_ID" \
--timeout 5

Required fields:

NameTypeDescription
nameStringAutomation name for identification.
enableBooleanEnabled/disabled state of the automation.
pathStringDirectory to watch. Subfolders are sent as Packages after the timeout.
recipientsStringComma-separated list of email recipients.
team-idStringTeam ID from which to send the Packages.
timeoutIntegerFilesystem inactivity timeout in minutes.

Optional fields: blacklist, delete-after, delete-files-after-upload, download-limit, download-password, message, package-name-suffix, priority, tag-id, tag-name, unlimited-storage, upload-loose-files.

Terminal window
masv automation update upload email {automation_id} \
--name "NEW_AUTOMATION_NAME" --disable
Terminal window
masv automation add upload portal \
--enable=true \
--name "AUTOMATION_NAME" \
--path "PATH_TO_WATCH" \
--subdomain "PORTAL_SUBDOMAIN" \
--sender "[email protected]" \
--timeout 5

Required fields:

NameTypeDescription
enableBooleanEnabled/disabled state of the automation.
nameStringAutomation name for identification.
pathStringDirectory to watch. Subfolders are sent as Packages after the timeout.
subdomainStringPortal subdomain to send Packages to.
senderStringSender email that the recipient will see.
timeoutIntegerFilesystem inactivity timeout in minutes.

Optional fields: blacklist, delete-files-after-upload, message, package-name-suffix, password, priority, upload-loose-files.

Terminal window
masv automation update upload portal {automation_id} \
--name "NEW_AUTOMATION_NAME" --disable

A stream upload automation uploads growing files to recipients. Each stream automation watches a folder for new files. After a timeout passes without detecting file size changes, the growing file upload is finalized.

There are two types of stream upload automations:

  • Send (Team) stream — sends growing files to configured email recipients.
  • Portal stream — sends growing files to a configured Portal.
Terminal window
masv automation add upload email \
--name "AUTOMATION_NAME" \
--enable=true \
--path "PATH_TO_WATCH" \
--team-id "TEAM_ID" \
--timeout 5 \
--growing-files

Required fields:

NameTypeDescription
nameStringAutomation name for identification.
enableBooleanEnabled/disabled state of the automation.
pathStringDirectory to watch. Uploads are created when new top-level files are detected.
recipientsStringComma-separated list of email recipients.
team-idStringTeam ID from which to send the Packages.
timeoutIntegerFilesystem inactivity timeout in seconds. After this duration, any ongoing stream is finalized.

Optional fields: whitelist, delete-after, download-limit, download-password, message, priority, tag-id, tag-name, unlimited-storage.

Terminal window
masv automation update upload team {automation_id} \
--name "NEW_AUTOMATION_NAME" --disable
Terminal window
masv automation add upload portal \
--enable=true \
--name "AUTOMATION NAME" \
--path "PATH_TO_WATCH" \
--subdomain "SUBDOMAIN" \
--sender "[email protected]" \
--timeout 5 \
--growing-files

Required fields:

NameTypeDescription
enableBooleanEnabled/disabled state of the automation.
nameStringAutomation name for identification.
pathStringDirectory to watch. Uploads are created when new top-level files are detected.
subdomainStringPortal subdomain to send Packages to.
senderStringSender email that the recipient will see.
timeoutIntegerFilesystem inactivity timeout in seconds. After this duration, the ongoing stream is finalized.

Optional fields: whitelist, message, password, priority.

Terminal window
masv automation update upload portal {automation_id} \
--name "NEW_AUTOMATION_NAME" --disable

Delete any automation type:

Terminal window
masv automation rm {automation_id}

Automations can be exported to a base64 string and imported by another MASV Agent or Desktop App. Use this to share or duplicate automations.

Terminal window
masv automation export {automation_id}

The response contains a data field with the base64-encoded automation:

{ "data": "base64_data" }
Terminal window
masv automation import 'base64_data'

  • Uploads — Send files manually via Team email, shareable Link, or Portal.
  • Downloads — Initiate, monitor, and manage file downloads.
  • Storage Gateway — Connect storage devices to MASV.