Skip to content
Build with Mammoth › CLI reference: open the docs menu

mammoth automation

Generated from mammoth-cli 2.4.2, released 2026-11-02: mammoth schema list, mammoth capability list and the CLI's own --help. Do not edit by hand; run npm run docs:capabilities.

Create and manage automations. 13 commands.

Every command also takes the global flags (--output, --yes, --confirm, --dry-run, --input, --profile, ...), which are not repeated below. --input takes a JSON or YAML document of the input fields; mammoth schema get COMMAND_ID prints a command's full input schema.

Confirmation. Commands marked --yes --confirm TARGET or --yes always need those flags, even at a terminal: they never prompt. Commands marked "--yes or prompt" ask at an interactive terminal (table output, no --no-input) and otherwise need --yes. --dry-run skips confirmation and sends nothing.

Summary

CommandWhat it doesEffectConfirmation
automation capabilitiesList every task, trigger, option and file format automations support.Read—
automation createCreate an automation. Name comes from a positional or the 'name' field.External effect--yes
automation deletePermanently delete one automation by id. Prompt or '--yes' required.Destructive--yes or prompt
automation foldersList every folder a consolidation automation watches.Read—
automation getGet one automation by id. Automation id is positional.Read—
automation listList all automations in the active workspace/project.Read—
automation restoreRestore one trashed automation. Automation id is positional.Benign mutation—
automation runsList an automation's latest runs, newest first, each with its files.Read—
automation trashMove one automation to trash (reversible). Automation id is positional.Benign mutation—
automation updateApply JSON-patch operations to one automation, or add or remove its datasets.External effect--yes
automation route orderSet the order a file meets a watched folder's own rules in.Benign mutation—
automation route previewShow where files dropped in a watched folder would go.Read—
automation run-file add-anywayAppend a file a run skipped as a duplicate to its destination after all.Benign mutation--yes or prompt

automation commands

mammoth automation capabilities

List every task, trigger, option and file format automations support.

mammoth automation capabilities
  • Effect: Read, scope project · Confirmation: none
  • Preconditions: Read-only. Lists everything an automation supports, straight from the server: tasks (each with task_type, summary, required_fields, optional_fields, options = accepted values per field, formats_in and formats_out = file formats it reads or writes) and conditions (the triggers: condition_type, summary, fields, options). Answer "can an automation do X?" (a PDF, an email attachment, a schedule) from this, never from memory. Then create with automation create.
  • Id: automation.capabilities · Result: AutomationCapabilitiesResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.capabilities, API GET /workspaces/{workspace_id}/projects/{project_id}/automations/capabilities (GetAutomationCapabilities)

mammoth automation create

Create an automation. Name comes from a positional or the 'name' field.

mammoth automation create 'Revenue report' --input '{"description": "Quarterly revenue summary", "tasks": [{"task_type": "run_data_retrieval", "details": {"ds_details": [{"ds_id": 42}]}}]}' --yes
NamePassed asRequiredDefaultTypeNotes
NAMEpositionalno—strName of the new automation; or pass it via the 'name' input field. Or the name input field.
name--input fieldno—str
description--input fieldyes—str
tasks--input fieldyes—list[AutomationTaskSpec]
conditions--input fieldno—list[AutomationConditionSpec]
condition_mode--input fieldnoandAutomationConditionModeOne of and, or.
  • Effect: External effect, scope project · Confirmation: always --yes, even at a terminal
  • Preconditions: B15 AUTOMATION_EXTERNAL_EFFECTS: run automation capabilities first: it lists every task, trigger, option and file format in and out (PDF included). Task models can pull cloud files and send email; requires connector/email allowlists and dedicated fixtures. Delete old rows on a schedule with task apply_retention_policy (datasource_id, rule_type time_based, count_based or condition_based). The CLI sets require_approval=true on a retention task that omits it (the route defaults to false, an unattended hard delete); require_approval=false with the delete action needs --yes --confirm unattended-delete. An emailed file is task send_an_alert with attachments.dataview_ids: each selected view is emailed as a CSV file. The combined row count of all attached views must stay within 100,000 -- over that, the automation is refused (and a run that grows past it fails).
  • Id: automation.create · Result: AutomationCreateResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.create, API POST /workspaces/{workspace_id}/projects/{project_id}/automations (CreateAutomation)

mammoth automation delete

Permanently delete one automation by id. Prompt or '--yes' required.

mammoth automation delete 123 --yes
NamePassed asRequiredDefaultTypeNotes
AUTOMATION_IDpositionalyes—intID of the automation.
  • Effect: Destructive, scope project · Confirmation: --yes, or answer the prompt at an interactive terminal
  • Preconditions: Immutable ID confirmation.
  • Id: automation.delete · Result: AutomationDeleteResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.delete, API DELETE /workspaces/{workspace_id}/projects/{project_id}/automations/{automation_id} (DeleteAutomation)

mammoth automation folders

List every folder a consolidation automation watches.

mammoth automation folders
  • Effect: Read, scope project · Confirmation: none
  • Preconditions: Read-only. Every folder a consolidation automation watches, its rules in order, and the files on their way or waiting on a person.
  • Id: automation.folders · Result: AutomationFoldersResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.watched_folders, API GET /workspaces/{workspace_id}/projects/{project_id}/automations/folders (GetWatchedFolders)

mammoth automation get

Get one automation by id. Automation id is positional.

mammoth automation get 123
NamePassed asRequiredDefaultTypeNotes
AUTOMATION_IDpositionalyes—intID of the automation.
  • Effect: Read, scope project · Confirmation: none
  • Preconditions: Some servers answer this with HTTP 500 and an empty body for an automation that automation create just returned. The automation exists; this is a server error, so do not retry more than once.
  • Id: automation.get · Result: AutomationGetResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.get, API GET /workspaces/{workspace_id}/projects/{project_id}/automations/{automation_id} (GetAutomation)

mammoth automation list

List all automations in the active workspace/project.

mammoth automation list
  • Effect: Read, scope project · Confirmation: none · Pages: single_page
  • Id: automation.list · Result: AutomationListResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.list, API GET /workspaces/{workspace_id}/projects/{project_id}/automations (GetList)

mammoth automation restore

Restore one trashed automation. Automation id is positional.

mammoth automation restore 123
NamePassed asRequiredDefaultTypeNotes
AUTOMATION_IDpositionalyes—intID of the automation.
  • Effect: Benign mutation, scope project · Confirmation: none
  • Preconditions: Required inputs: AUTOMATION_ID.
  • Id: automation.restore · Result: AutomationRestoreResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.restore, API POST /workspaces/{workspace_id}/projects/{project_id}/automations/{automation_id}/restore (RestoreAutomation)

mammoth automation runs

List an automation's latest runs, newest first, each with its files.

mammoth automation runs 123 --input '{"limit": 10}'
NamePassed asRequiredDefaultTypeNotes
AUTOMATION_IDpositionalyes—intID of the automation.
limit--input fieldno—int
  • Effect: Read, scope project · Confirmation: none
  • Preconditions: Read-only. Newest first, each run with its files; limit is capped at 50 by the server.
  • Id: automation.runs · Result: AutomationRunsResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.runs, API GET /workspaces/{workspace_id}/projects/{project_id}/automations/{automation_id}/runs (GetAutomationRuns)

mammoth automation trash

Move one automation to trash (reversible). Automation id is positional.

mammoth automation trash 123
NamePassed asRequiredDefaultTypeNotes
AUTOMATION_IDpositionalyes—intID of the automation.
  • Effect: Benign mutation, scope project · Confirmation: none
  • Preconditions: Required inputs: AUTOMATION_ID.
  • Id: automation.trash · Result: AutomationTrashResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.trash, API POST /workspaces/{workspace_id}/projects/{project_id}/automations/{automation_id}/trash (TrashAutomation)

mammoth automation update

Apply JSON-patch operations to one automation, or add or remove its datasets.

mammoth automation update 123 --input '{"patch": [{"op": "replace", "path": "details", "value": {"name": "Daily revenue export"}}]}' --yes
NamePassed asRequiredDefaultTypeNotes
AUTOMATION_IDpositionalyes—intID of the automation.
patch--input fieldyes—list[AutomationPatchItem]
add_datasets--input fieldno—list[int]
remove_datasets--input fieldno—list[int]
  • Effect: External effect, scope project · Confirmation: always --yes, even at a terminal
  • Preconditions: Changes a live automation (run, status, retention approval): read it first (automation get). Needs --yes. Each patch item is op + path + value: command + run (run now), replace + status (suspend or resume), replace + details (an object with at least one of name, description, tasks, conditions). Paths are details, run, status, approve_retention, reject_retention. On a data-refresh automation, --input with add_datasets and remove_datasets (lists of dataset ids) changes its datasets without a patch list.
  • Id: automation.update · Result: AutomationUpdateResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.update, API PATCH /workspaces/{workspace_id}/projects/{project_id}/automations/{automation_id} (UpdateAutomation)

automation route

mammoth automation route order

Set the order a file meets a watched folder's own rules in.

mammoth automation route order 123 --input '{"automation_ids": [12, 11]}'
NamePassed asRequiredDefaultTypeNotes
FOLDER_RESOURCE_IDpositionalyes—intID of the folder resource.
automation_ids--input fieldyes—list[int]
  • Effect: Benign mutation, scope project · Confirmation: none
  • Preconditions: automation_ids names the folder's own rules, first rule first; files dropped after the change meet them in that order.
  • Id: automation.route.order · Result: AutomationRouteOrderResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.set_route_order, API PUT /workspaces/{workspace_id}/projects/{project_id}/automations/route-order (SetRouteOrder)

mammoth automation route preview

Show where files dropped in a watched folder would go.

mammoth automation route preview 123 --input '{"names": ["sales_2026-10.csv"]}'
NamePassed asRequiredDefaultTypeNotes
FOLDER_RESOURCE_IDpositionalyes—intID of the folder resource.
names--input fieldno—list[str]
draft--input fieldno—dict[str, any]
  • Effect: Read, scope project · Confirmation: none
  • Preconditions: Read-only. Lists the folder's rules (its own, then inherited) and where files of the given names would go; a draft rule also says how many recent files it would take.
  • Id: automation.route.preview · Result: AutomationRoutePreviewResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.preview_routes, API POST /workspaces/{workspace_id}/projects/{project_id}/automations/route-preview (PreviewRoutes)

automation run-file

mammoth automation run-file add-anyway

Append a file a run skipped as a duplicate to its destination after all.

mammoth automation run-file add-anyway 123 --yes
NamePassed asRequiredDefaultTypeNotes
RUN_FILE_IDpositionalyes—intID of the run file.
  • Effect: Benign mutation, scope project · Confirmation: --yes, or answer the prompt at an interactive terminal
  • Preconditions: Appends a file a run skipped as a duplicate to its destination dataset; find the run file id with automation runs.
  • Id: automation.run-file.add-anyway · Result: AutomationRunFileAddAnywayResult · Backed by: SDK mammoth.api.automations.AutomationsAPI.add_run_file_anyway, API POST /workspaces/{workspace_id}/projects/{project_id}/automations/run-files/{run_file_id}/add-anyway (AddRunFileAnyway)

Report an issue · support@mammoth.io