@zapier/zapier-sdk 0.117.0 → 0.119.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,40 +41,42 @@
41
41
  - [`fetch`](#fetch)
42
42
  - [Human Inputs (Experimental)](#human-inputs-experimental)
43
43
  - [`createForm`](#createform--experimental)
44
+ - [Next Gen Zaps (Beta)](#next-gen-zaps-beta)
45
+ - [`cancelDurableRun`](#canceldurablerun--beta)
46
+ - [`createWorkflow`](#createworkflow--beta)
47
+ - [`createWorkflowDraft`](#createworkflowdraft--beta)
48
+ - [`deleteWorkflow`](#deleteworkflow--beta)
49
+ - [`disableWorkflow`](#disableworkflow--beta)
50
+ - [`discardWorkflowDraft`](#discardworkflowdraft--beta)
51
+ - [`enableWorkflow`](#enableworkflow--beta)
52
+ - [`getDurableRun`](#getdurablerun--beta)
53
+ - [`getTriggerRun`](#gettriggerrun--beta)
54
+ - [`getWorkflow`](#getworkflow--beta)
55
+ - [`getWorkflowDraft`](#getworkflowdraft--beta)
56
+ - [`getWorkflowRun`](#getworkflowrun--beta)
57
+ - [`getWorkflowVersion`](#getworkflowversion--beta)
58
+ - [`importWorkflow`](#importworkflow--beta)
59
+ - [`listDurableRuns`](#listdurableruns--beta)
60
+ - [`listWorkflowDrafts`](#listworkflowdrafts--beta)
61
+ - [`listWorkflowRuns`](#listworkflowruns--beta)
62
+ - [`listWorkflowVersions`](#listworkflowversions--beta)
63
+ - [`listWorkflows`](#listworkflows--beta)
64
+ - [`publishWorkflowDraft`](#publishworkflowdraft--beta)
65
+ - [`publishWorkflowVersion`](#publishworkflowversion--beta)
66
+ - [`runDurable`](#rundurable--beta)
67
+ - [`runWorkflow`](#runworkflow--beta)
68
+ - [`runWorkflowDraft`](#runworkflowdraft--beta)
69
+ - [`triggerWorkflow`](#triggerworkflow--beta)
70
+ - [`updateWorkflow`](#updateworkflow--beta)
71
+ - [`updateWorkflowDraft`](#updateworkflowdraft--beta)
72
+ - [`validateWorkflow`](#validateworkflow--beta)
44
73
  - [Next Gen Zaps (Experimental)](#next-gen-zaps-experimental)
45
- - [`cancelDurableRun`](#canceldurablerun--experimental)
46
- - [`createWorkflow`](#createworkflow--experimental)
47
- - [`createWorkflowDraft`](#createworkflowdraft--experimental)
48
- - [`deleteWorkflow`](#deleteworkflow--experimental)
49
74
  - [`disableAgenticManagement`](#disableagenticmanagement--experimental)
50
- - [`disableWorkflow`](#disableworkflow--experimental)
51
- - [`discardWorkflowDraft`](#discardworkflowdraft--experimental)
52
75
  - [`enableAgenticManagement`](#enableagenticmanagement--experimental)
53
- - [`enableWorkflow`](#enableworkflow--experimental)
54
76
  - [`getAgenticManagementConfig`](#getagenticmanagementconfig--experimental)
55
77
  - [`getAgenticManagementIntent`](#getagenticmanagementintent--experimental)
56
- - [`getDurableRun`](#getdurablerun--experimental)
57
- - [`getTriggerRun`](#gettriggerrun--experimental)
58
- - [`getWorkflow`](#getworkflow--experimental)
59
- - [`getWorkflowDraft`](#getworkflowdraft--experimental)
60
- - [`getWorkflowRun`](#getworkflowrun--experimental)
61
- - [`getWorkflowVersion`](#getworkflowversion--experimental)
62
- - [`importWorkflow`](#importworkflow--experimental)
63
- - [`listDurableRuns`](#listdurableruns--experimental)
64
- - [`listWorkflowDrafts`](#listworkflowdrafts--experimental)
65
- - [`listWorkflowRuns`](#listworkflowruns--experimental)
66
- - [`listWorkflowVersions`](#listworkflowversions--experimental)
67
- - [`listWorkflows`](#listworkflows--experimental)
68
- - [`publishWorkflowDraft`](#publishworkflowdraft--experimental)
69
- - [`publishWorkflowVersion`](#publishworkflowversion--experimental)
70
- - [`runDurable`](#rundurable--experimental)
71
- - [`runWorkflowDraft`](#runworkflowdraft--experimental)
72
- - [`triggerWorkflow`](#triggerworkflow--experimental)
73
78
  - [`updateAgenticManagementConfig`](#updateagenticmanagementconfig--experimental)
74
79
  - [`updateAgenticManagementIntent`](#updateagenticmanagementintent--experimental)
75
- - [`updateWorkflow`](#updateworkflow--experimental)
76
- - [`updateWorkflowDraft`](#updateworkflowdraft--experimental)
77
- - [`validateWorkflow`](#validateworkflow--experimental)
78
80
  - [Tables](#tables)
79
81
  - [`createTable`](#createtable)
80
82
  - [`createTableFields`](#createtablefields)
@@ -525,16 +527,17 @@ Start an action run and return its ID without waiting for the result. Running an
525
527
 
526
528
  **Parameters:**
527
529
 
528
- | Name | Type | Required | Default | Possible Values | Description |
529
- | ----------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
530
- | `options` | `object` | ✅ | — | — | |
531
- | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
532
- | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
533
- | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
534
- | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Required if the action needs a connection to authenticate and interact with the service. Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
535
- | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
536
- | ​ ↳ `page` | `string` | ❌ | — | — | Page to fetch for bulk read actions. Pass the `next_page` a previous run returned to fetch the following page. |
537
- | ​ ↳ `callbackUrl` | `string` | ❌ | — | — | URL Zapier posts the finished run to, so you do not have to poll for it. Must use HTTPS and resolve to a public host, so a local receiver needs a tunnel. The body matches what `getActionRun` returns. Verify the `Zapier-Callback-Signature` header, and expect the same run to arrive more than once. |
530
+ | Name | Type | Required | Default | Possible Values | Description |
531
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
532
+ | `options` | `object` | ✅ | — | — | |
533
+ | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
534
+ | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
535
+ | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
536
+ | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Required if the action needs a connection to authenticate and interact with the service. Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
537
+ | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
538
+ | ​ ↳ `page` | `string` | ❌ | — | — | Page to fetch for bulk read actions. Pass the `next_page` a previous run returned to fetch the following page. |
539
+ | ​ ↳ `callbackUrl` | `string` | ❌ | — | — | URL Zapier posts the finished run to, so you do not have to poll for it. Must use HTTPS and resolve to a public host, so a local receiver needs a tunnel. The body matches what `getActionRun` returns. Verify the `Zapier-Callback-Signature` header, and expect the same run to arrive more than once. |
540
+ | ​ ↳ `idempotencyKey` | `string` | ❌ | — | — | Key that makes retrying a run safe. Another run with the same key within 72 hours returns the original run instead of starting a new one, even if its inputs differ, so use a fresh key per distinct run. A paged run is sent with a key derived from this key and the page, so one key covers every page and retrying a page replays that page's run. |
538
541
 
539
542
  **Returns:** `Promise<StartedActionRunItem>`
540
543
 
@@ -882,18 +885,19 @@ Execute an action with the given inputs and wait for its results. Each result pa
882
885
 
883
886
  **Parameters:**
884
887
 
885
- | Name | Type | Required | Default | Possible Values | Description |
886
- | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
887
- | `options` | `object` | ✅ | — | — | |
888
- | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
889
- | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
890
- | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
891
- | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
892
- | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
893
- | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
894
- | ​ ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
895
- | ​ ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
896
- | ​ ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
888
+ | Name | Type | Required | Default | Possible Values | Description |
889
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
890
+ | `options` | `object` | ✅ | — | — | |
891
+ | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
892
+ | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
893
+ | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
894
+ | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
895
+ | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
896
+ | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
897
+ | ​ ↳ `idempotencyKey` | `string` | ❌ | — | — | Key that makes retrying a run safe. Another run with the same key within 72 hours returns the original run instead of starting a new one, even if its inputs differ, so use a fresh key per distinct run. A paged run is sent with a key derived from this key and the page, so one key covers every page and retrying a page replays that page's run. |
898
+ | ​ ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
899
+ | ​ ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
900
+ | ​ ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
897
901
 
898
902
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
899
903
 
@@ -959,12 +963,13 @@ Execute an action with the given inputs for the bound app, as an alternative to
959
963
 
960
964
  **Parameters:**
961
965
 
962
- | Name | Type | Required | Default | Possible Values | Description |
963
- | -------------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
964
- | `options` | `object` | ✅ | — | — | |
965
- | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
966
- | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
967
- | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
966
+ | Name | Type | Required | Default | Possible Values | Description |
967
+ | -------------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
968
+ | `options` | `object` | ✅ | — | — | |
969
+ | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
970
+ | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
971
+ | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
972
+ | ​ ↳ `idempotencyKey` | `string` | ❌ | — | — | Key that makes retrying a run safe. Another run with the same key within 72 hours returns the original run instead of starting a new one, even if its inputs differ, so use a fresh key per distinct run. A paged run is sent with a key derived from this key and the page, so one key covers every page and retrying a page replays that page's run. |
968
973
 
969
974
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
970
975
 
@@ -1717,13 +1722,13 @@ const { data: form } = await zapier.createForm({
1717
1722
  });
1718
1723
  ```
1719
1724
 
1720
- ### Next Gen Zaps (Experimental)
1725
+ ### Next Gen Zaps (Beta)
1721
1726
 
1722
1727
  Next Gen Zaps are a new version of Zaps that run on code, which makes them easier for agents and AI tools to understand. Use these to build, test, publish, and run Next Gen Zaps, and to check on their runs.
1723
1728
 
1724
- > ℹ️ **Experimental.** Still being designed; may change shape or disappear in any release, without notice. Import from `"@zapier/zapier-sdk/experimental"` to use these methods.
1729
+ > ℹ️ **Beta.** Functionally complete and ready to build against, but the shape may still change as it settles. Changes land in minor releases with a changelog migration note, without a deprecation period. Import from `"@zapier/zapier-sdk/beta"` to use these methods.
1725
1730
 
1726
- #### `cancelDurableRun` 🧪 _experimental_
1731
+ #### `cancelDurableRun` 🧪 _beta_
1727
1732
 
1728
1733
  Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal.
1729
1734
 
@@ -1750,7 +1755,7 @@ const { data: durableRun } = await zapier.cancelDurableRun({
1750
1755
  });
1751
1756
  ```
1752
1757
 
1753
- #### `createWorkflow` 🧪 _experimental_
1758
+ #### `createWorkflow` 🧪 _beta_
1754
1759
 
1755
1760
  Create a durable workflow container. Starts disabled with no version; publish a version to add code.
1756
1761
 
@@ -1786,7 +1791,7 @@ const { data: workflow } = await zapier.createWorkflow({
1786
1791
  });
1787
1792
  ```
1788
1793
 
1789
- #### `createWorkflowDraft` 🧪 _experimental_
1794
+ #### `createWorkflowDraft` 🧪 _beta_
1790
1795
 
1791
1796
  Fork a new draft from the workflow's current live version (or a blank stub before the first publish)
1792
1797
 
@@ -1830,7 +1835,7 @@ const { data: workflowDraft } = await zapier.createWorkflowDraft({
1830
1835
  });
1831
1836
  ```
1832
1837
 
1833
- #### `deleteWorkflow` 🧪 _experimental_
1838
+ #### `deleteWorkflow` 🧪 _beta_
1834
1839
 
1835
1840
  Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves.
1836
1841
 
@@ -1856,33 +1861,7 @@ const result = await zapier.deleteWorkflow({
1856
1861
  });
1857
1862
  ```
1858
1863
 
1859
- #### `disableAgenticManagement` 🧪 _experimental_
1860
-
1861
- Stop Agentic Management from working on one workflow. Its settings are kept, not deleted: the modes and auto-approve choice stay on file, so calling enableAgenticManagement later resumes with those settings instead of the defaults.
1862
-
1863
- **Parameters:**
1864
-
1865
- | Name | Type | Required | Default | Possible Values | Description |
1866
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------- |
1867
- | `options` | `object` | ✅ | — | — | |
1868
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to take out of agentic management. |
1869
-
1870
- **Returns:** `Promise<{ success: boolean }>`
1871
-
1872
- | Name | Type | Required | Possible Values | Description |
1873
- | -------- | --------- | -------- | --------------- | -------------------------------------------------------------------- |
1874
- | `data` | `object` | ✅ | — | |
1875
- | ​ ↳ `ok` | `boolean` | ✅ | — | True when Zapier accepted the request to stop managing the workflow. |
1876
-
1877
- **Example:**
1878
-
1879
- ```typescript
1880
- const result = await zapier.disableAgenticManagement({
1881
- workflow: "example-workflow",
1882
- });
1883
- ```
1884
-
1885
- #### `disableWorkflow` 🧪 _experimental_
1864
+ #### `disableWorkflow` 🧪 _beta_
1886
1865
 
1887
1866
  Disable a durable workflow so it stops accepting triggers
1888
1867
 
@@ -1909,7 +1888,7 @@ const { data: workflow } = await zapier.disableWorkflow({
1909
1888
  });
1910
1889
  ```
1911
1890
 
1912
- #### `discardWorkflowDraft` 🧪 _experimental_
1891
+ #### `discardWorkflowDraft` 🧪 _beta_
1913
1892
 
1914
1893
  Discard an open workflow draft (soft delete). The draft's unpublished edits stop resolving; the published version is untouched.
1915
1894
 
@@ -1954,36 +1933,7 @@ const result = await zapier.discardWorkflowDraft({
1954
1933
  });
1955
1934
  ```
1956
1935
 
1957
- #### `enableAgenticManagement` 🧪 _experimental_
1958
-
1959
- Put one workflow under Agentic Management. A workflow disabled earlier comes back with the modes and auto-approve choice it had, unless you pass new ones here.
1960
-
1961
- **Parameters:**
1962
-
1963
- | Name | Type | Required | Default | Possible Values | Description |
1964
- | ----------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1965
- | `options` | `object` | ✅ | — | — | |
1966
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to put under agentic management. |
1967
- | ​ ↳ `modes` | `array` | ❌ | — | — | The modes to run for this workflow. Omit it and the workflow starts on `heal` alone. A mode is what Agentic Management watches for and what it changes in response. `heal` monitors runs for errors and, when something breaks, diagnoses the cause and drafts and tests a fix; it is the mode a workflow gets by default. `expand` grows what the workflow covers: it reviews runs that succeeded without actually doing anything — a lookup that matched nothing, a filter that passed no items, a trigger payload no branch handles — and proposes a new branch or step to handle that case, rather than rewriting the ones that already work. `harden` watches the AI steps: when an AI step keeps doing the same work the same way, it converts that step into fixed code, so the workflow runs faster, costs less, and behaves the same way every time. Modes stack — each one you name runs alongside the others, and a mode you leave out does nothing, so a workflow on `expand` alone does not repair failed runs. Whether a change goes live on its own or waits for someone to approve it is `autoApprove`, not the mode. |
1968
- | ​ ↳ `autoApprove` | `boolean` | ❌ | — | — | Apply the fixes Agentic Management proposes without asking first. Set it to false and each fix waits for someone to approve it. Omit it and fixes are applied without asking, which is what a workflow enabled for the first time gets; a workflow being re-enabled keeps the setting it had before. |
1969
-
1970
- **Returns:** `Promise<AgenticManagementEnableResultItem>`
1971
-
1972
- | Name | Type | Required | Possible Values | Description |
1973
- | ---------------- | -------- | -------- | --------------- | ----------------------------------------------------------------------- |
1974
- | `data` | `object` | ✅ | — | |
1975
- | ​ ↳ `manager_id` | `string` | ✅ | — | ID of the manager automation Zapier provisioned to watch this workflow. |
1976
-
1977
- **Example:**
1978
-
1979
- ```typescript
1980
- const { data: agenticManagementEnableResult } =
1981
- await zapier.enableAgenticManagement({
1982
- workflow: "example-workflow",
1983
- });
1984
- ```
1985
-
1986
- #### `enableWorkflow` 🧪 _experimental_
1936
+ #### `enableWorkflow` 🧪 _beta_
1987
1937
 
1988
1938
  Enable a durable workflow so it accepts triggers
1989
1939
 
@@ -2010,69 +1960,7 @@ const { data: workflow } = await zapier.enableWorkflow({
2010
1960
  });
2011
1961
  ```
2012
1962
 
2013
- #### `getAgenticManagementConfig` 🧪 _experimental_
2014
-
2015
- Read the Agentic Management config for one workflow.
2016
-
2017
- **Parameters:**
2018
-
2019
- | Name | Type | Required | Default | Possible Values | Description |
2020
- | -------------- | -------- | -------- | ------- | --------------- | --------------------------- |
2021
- | `options` | `object` | ✅ | — | — | |
2022
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to read. |
2023
-
2024
- **Returns:** `Promise<AgenticManagementConfigItem>`
2025
-
2026
- | Name | Type | Required | Possible Values | Description |
2027
- | ------------------ | --------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2028
- | `data` | `object` | ✅ | — | |
2029
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow this config describes. |
2030
- | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether Agentic Management is currently active for this workflow. |
2031
- | ​ ↳ `auto_approve` | `boolean` | ✅ | — | Whether fixes are applied without asking for approval first. `false` when Agentic Management has never been set up for this workflow. |
2032
- | ​ ↳ `modes` | `array` | ✅ | — | The modes the workflow runs. Still listed while `enabled` is false, because the settings are kept for a later re-enable — so read `enabled` to tell whether they are in effect, not this list. |
2033
- | ​ ↳ `manager_id` | `string` | ❌ | — | ID of the manager automation Zapier provisioned for this workflow, once one exists; `null` otherwise. Use it to link to that automation to see the runs it has taken. |
2034
-
2035
- **Example:**
2036
-
2037
- ```typescript
2038
- const { data: agenticManagementConfig } =
2039
- await zapier.getAgenticManagementConfig({
2040
- workflow: "example-workflow",
2041
- });
2042
- ```
2043
-
2044
- #### `getAgenticManagementIntent` 🧪 _experimental_
2045
-
2046
- Read the intent recorded for one workflow version: the plain-language description of what that version of the workflow is meant to do.
2047
-
2048
- **Parameters:**
2049
-
2050
- | Name | Type | Required | Default | Possible Values | Description |
2051
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2052
- | `options` | `object` | ✅ | — | — | |
2053
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to read. |
2054
- | ​ ↳ `version` | `string` | ❌ | — | — | The workflow version the intent belongs to. Each version stores its own intent, and a version never picks up the intent of another, so publishing a new version starts it with none. Omit this to use the workflow's current published version. |
2055
-
2056
- **Returns:** `Promise<AgenticManagementIntentItem>`
2057
-
2058
- | Name | Type | Required | Possible Values | Description |
2059
- | ------------------------- | -------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2060
- | `data` | `object` | ✅ | — | |
2061
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow the intent belongs to. |
2062
- | ​ ↳ `workflow_version_id` | `string` | ✅ | — | The version this read or write actually landed on, so you can tell which one answered when you omitted `version`. `null` only when you read a workflow that has nothing published yet. |
2063
- | ​ ↳ `intent` | `string` | ✅ | — | The intent stored for this version, or `null` when this version has none. Intent is never carried over from another version. |
2064
- | ​ ↳ `updated_at` | `string` | ❌ | — | When the intent was last written; `null` when never captured. |
2065
-
2066
- **Example:**
2067
-
2068
- ```typescript
2069
- const { data: agenticManagementIntent } =
2070
- await zapier.getAgenticManagementIntent({
2071
- workflow: "example-workflow",
2072
- });
2073
- ```
2074
-
2075
- #### `getDurableRun` 🧪 _experimental_
1963
+ #### `getDurableRun` 🧪 _beta_
2076
1964
 
2077
1965
  Get the full state of a run-once durable run, including its operations journal
2078
1966
 
@@ -2106,16 +1994,17 @@ const { data: durableRun } = await zapier.getDurableRun({
2106
1994
  });
2107
1995
  ```
2108
1996
 
2109
- #### `getTriggerRun` 🧪 _experimental_
1997
+ #### `getTriggerRun` 🧪 _beta_
2110
1998
 
2111
- Get the workflow run associated with a deployed workflow's trigger. Useful immediately after firing a trigger, when you have the trigger ID but not yet the run ID.
1999
+ Get the workflow run associated with a deployed workflow's trigger. Useful immediately after firing a trigger, when you have the trigger ID but not yet the run ID. With `waitSeconds`, the read also waits for the run to be created and to end.
2112
2000
 
2113
2001
  **Parameters:**
2114
2002
 
2115
- | Name | Type | Required | Default | Possible Values | Description |
2116
- | ------------- | -------- | -------- | ------- | --------------- | ------------------- |
2117
- | `options` | `object` | ✅ | — | — | |
2118
- | ​ ↳ `trigger` | `string` | ✅ | — | — | Workflow trigger ID |
2003
+ | Name | Type | Required | Default | Possible Values | Description |
2004
+ | ----------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
2005
+ | `options` | `object` | ✅ | — | — | |
2006
+ | ​ ↳ `trigger` | `string` | ✅ | — | — | Workflow trigger ID |
2007
+ | ​ ↳ `waitSeconds` | `number` | ❌ | — | — | Wait for the run to be finished, failed or cancelled, up to this many seconds, then return it as it stands. The answer comes as soon as the run ends. |
2119
2008
 
2120
2009
  **Returns:** `Promise<WorkflowRunItem>`
2121
2010
 
@@ -2140,7 +2029,7 @@ const { data: workflowRun } = await zapier.getTriggerRun({
2140
2029
  });
2141
2030
  ```
2142
2031
 
2143
- #### `getWorkflow` 🧪 _experimental_
2032
+ #### `getWorkflow` 🧪 _beta_
2144
2033
 
2145
2034
  Get a durable workflow with its current version details and trigger claim status
2146
2035
 
@@ -2195,7 +2084,7 @@ const { data: workflow } = await zapier.getWorkflow({
2195
2084
  });
2196
2085
  ```
2197
2086
 
2198
- #### `getWorkflowDraft` 🧪 _experimental_
2087
+ #### `getWorkflowDraft` 🧪 _beta_
2199
2088
 
2200
2089
  Get full details of a workflow draft including source files
2201
2090
 
@@ -2240,17 +2129,18 @@ const { data: workflowDraft } = await zapier.getWorkflowDraft({
2240
2129
  });
2241
2130
  ```
2242
2131
 
2243
- #### `getWorkflowRun` 🧪 _experimental_
2132
+ #### `getWorkflowRun` 🧪 _beta_
2244
2133
 
2245
2134
  Get the current state of a workflow run — a live run of a published workflow version, or a draft run launched via `runWorkflowDraft` (the `kind` field says which)
2246
2135
 
2247
2136
  **Parameters:**
2248
2137
 
2249
- | Name | Type | Required | Default | Possible Values | Description |
2250
- | -------------- | -------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------- |
2251
- | `options` | `object` | ✅ | — | — | |
2252
- | ​ ↳ `workflow` | `string` | ❌ | — | — | Parent workflow ID — used only to scope the CLI run-id picker; ignored by the API call. |
2253
- | ​ ↳ `run` | `string` | ✅ | — | — | Workflow run ID |
2138
+ | Name | Type | Required | Default | Possible Values | Description |
2139
+ | ----------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
2140
+ | `options` | `object` | ✅ | — | — | |
2141
+ | ​ ↳ `workflow` | `string` | ❌ | — | — | Parent workflow ID — used only to scope the CLI run-id picker; ignored by the API call. |
2142
+ | ​ ↳ `run` | `string` | ✅ | — | — | Workflow run ID |
2143
+ | ​ ↳ `waitSeconds` | `number` | ❌ | — | — | Wait for the run to be finished, failed or cancelled, up to this many seconds, then return it as it stands. The answer comes as soon as the run ends. |
2254
2144
 
2255
2145
  **Returns:** `Promise<WorkflowRunItem>`
2256
2146
 
@@ -2300,7 +2190,7 @@ const { data: workflowRun } = await zapier.getWorkflowRun({
2300
2190
  });
2301
2191
  ```
2302
2192
 
2303
- #### `getWorkflowVersion` 🧪 _experimental_
2193
+ #### `getWorkflowVersion` 🧪 _beta_
2304
2194
 
2305
2195
  Get full details of a workflow version including source files
2306
2196
 
@@ -2337,7 +2227,7 @@ const { data: workflowVersion } = await zapier.getWorkflowVersion({
2337
2227
  });
2338
2228
  ```
2339
2229
 
2340
- #### `importWorkflow` 🧪 _experimental_
2230
+ #### `importWorkflow` 🧪 _beta_
2341
2231
 
2342
2232
  Convert an existing Zap into a durable workflow. Transforms the Zap's latest published version (falling back to its draft only when the Zap has never been published) and puts the resulting source in an open draft. The workflow is created disabled with no published version, so publish the draft to make it live. The original Zap is untouched and keeps running.
2343
2233
 
@@ -2413,7 +2303,7 @@ const { data: workflow } = await zapier.importWorkflow({
2413
2303
  });
2414
2304
  ```
2415
2305
 
2416
- #### `listDurableRuns` 🧪 _experimental_
2306
+ #### `listDurableRuns` 🧪 _beta_
2417
2307
 
2418
2308
  List run-once durable runs for the authenticated account, newest first
2419
2309
 
@@ -2459,7 +2349,7 @@ for await (const durableRun of zapier.listDurableRuns().items()) {
2459
2349
  }
2460
2350
  ```
2461
2351
 
2462
- #### `listWorkflowDrafts` 🧪 _experimental_
2352
+ #### `listWorkflowDrafts` 🧪 _beta_
2463
2353
 
2464
2354
  List drafts for a workflow, most recently edited first (open drafts by default)
2465
2355
 
@@ -2517,7 +2407,7 @@ for await (const workflowDraft of zapier
2517
2407
  }
2518
2408
  ```
2519
2409
 
2520
- #### `listWorkflowRuns` 🧪 _experimental_
2410
+ #### `listWorkflowRuns` 🧪 _beta_
2521
2411
 
2522
2412
  List workflow runs for a specific workflow, newest first. Live runs (of published versions) and draft runs share the one list; pass `kind` to narrow it to one.
2523
2413
 
@@ -2596,7 +2486,7 @@ for await (const workflowRun of zapier
2596
2486
  }
2597
2487
  ```
2598
2488
 
2599
- #### `listWorkflowVersions` 🧪 _experimental_
2489
+ #### `listWorkflowVersions` 🧪 _beta_
2600
2490
 
2601
2491
  List published versions for a workflow, newest first
2602
2492
 
@@ -2654,7 +2544,7 @@ for await (const workflowVersion of zapier
2654
2544
  }
2655
2545
  ```
2656
2546
 
2657
- #### `listWorkflows` 🧪 _experimental_
2547
+ #### `listWorkflows` 🧪 _beta_
2658
2548
 
2659
2549
  List all active durable workflows for the authenticated account
2660
2550
 
@@ -2711,7 +2601,7 @@ for await (const workflow of zapier.listWorkflows().items()) {
2711
2601
  }
2712
2602
  ```
2713
2603
 
2714
- #### `publishWorkflowDraft` 🧪 _experimental_
2604
+ #### `publishWorkflowDraft` 🧪 _beta_
2715
2605
 
2716
2606
  Publish an open draft as a new immutable workflow version. Advances the workflow's live pointer and discards the draft — publish consumes it, so an open draft always means unpublished work. Continue editing by creating a new draft, which forks from the just-published version.
2717
2607
 
@@ -2771,7 +2661,7 @@ const { data: workflowVersion } = await zapier.publishWorkflowDraft({
2771
2661
  });
2772
2662
  ```
2773
2663
 
2774
- #### `publishWorkflowVersion` 🧪 _experimental_
2664
+ #### `publishWorkflowVersion` 🧪 _beta_
2775
2665
 
2776
2666
  Publish a new version of a durable workflow. Enables the workflow by default.
2777
2667
 
@@ -2820,7 +2710,7 @@ const { data: workflowVersion } = await zapier.publishWorkflowVersion({
2820
2710
  });
2821
2711
  ```
2822
2712
 
2823
- #### `runDurable` 🧪 _experimental_
2713
+ #### `runDurable` 🧪 _beta_
2824
2714
 
2825
2715
  Run a workflow's complete source-files map as a run-once durable run on code-substrate-runner (no deployed workflow required). Send every file the workflow needs, not only its entry point. Returns the run ID immediately; poll via getDurableRun for terminal status.
2826
2716
 
@@ -2860,9 +2750,46 @@ const { data: durableRun } = await zapier.runDurable({
2860
2750
  });
2861
2751
  ```
2862
2752
 
2863
- #### `runWorkflowDraft` 🧪 _experimental_
2753
+ #### `runWorkflow` 🧪 _beta_
2754
+
2755
+ Run a published workflow and wait for its result: fires the workflow's trigger as the authenticated account, then returns the run once it is finished, failed or cancelled, with `output` set when it finished. Waits up to 60 seconds unless `waitSeconds` says otherwise. A run that has not ended after `waitSeconds` is returned with its current status; wait on it again with getWorkflowRun and `waitSeconds`.
2756
+
2757
+ **Parameters:**
2758
+
2759
+ | Name | Type | Required | Default | Possible Values | Description |
2760
+ | ----------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
2761
+ | `options` | `object` | ✅ | — | — | |
2762
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
2763
+ | ​ ↳ `input` | `unknown` | ❌ | — | — | JSON payload delivered as the trigger body. Accepts any JSON value, or its JSON-string encoding. Omit to run with an empty body. |
2764
+ | ​ ↳ `waitSeconds` | `number` | ❌ | — | — | How long to wait for the run to end, in seconds. A run still going after the wait is returned with its current status, not as an error. |
2765
+
2766
+ **Returns:** `Promise<WorkflowRunItem>`
2767
+
2768
+ | Name | Type | Required | Possible Values | Description |
2769
+ | ------------------------- | --------- | -------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------- |
2770
+ | `data` | `object` | ✅ | — | |
2771
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow run ID (UUID) |
2772
+ | ​ ↳ `durable_run_id` | `string` | ✅ | — | Linked code-substrate-runner run ID. Null until the durable run is created. |
2773
+ | ​ ↳ `workflow_version_id` | `string` | ✅ | — | Workflow version the run is bound to |
2774
+ | ​ ↳ `status` | `string` | ✅ | `initialized`, `started`, `finished`, `failed`, `cancelled` | Workflow run lifecycle status. `finished` / `failed` / `cancelled` are terminal. |
2775
+ | ​ ↳ `input` | `unknown` | ✅ | — | Input passed to the run |
2776
+ | ​ ↳ `output` | `unknown` | ✅ | — | Return value, present when status is `finished` |
2777
+ | ​ ↳ `error` | `unknown` | ✅ | — | Error payload when status is `failed` (null otherwise) |
2778
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the run was created (ISO-8601) |
2779
+ | ​ ↳ `updated_at` | `string` | ✅ | — | When the run was last updated (ISO-8601) |
2780
+ | ​ ↳ `trigger_id` | `string` | ✅ | — | Trigger ID of the run (UUID) |
2781
+
2782
+ **Example:**
2783
+
2784
+ ```typescript
2785
+ const { data: workflowRun } = await zapier.runWorkflow({
2786
+ workflow: "example-workflow",
2787
+ });
2788
+ ```
2789
+
2790
+ #### `runWorkflowDraft` 🧪 _beta_
2864
2791
 
2865
- Launch a draft test run: execute the draft's current source without publishing it. The draft's payload is snapshotted onto the run at creation, so later edits (or discarding the draft) never change what the run executed. Draft runs are free (not task-charged) and rate limited per user. The run is accepted asynchronously — it comes back `initialized`; follow it with `getWorkflowRun`, or list it via `listWorkflowRuns` with `kind: "draft"`.
2792
+ Launch a draft test run: execute the draft's current source without publishing it. The draft's payload is snapshotted onto the run at creation, so later edits (or discarding the draft) never change what the run executed. Draft runs are free (not task-charged) and rate limited per user. Without `waitSeconds` the run comes back at once, `initialized`; follow it with `getWorkflowRun`, or list it via `listWorkflowRuns` with `kind: "draft"`. With `waitSeconds`, the run is returned once it ends (or as it stands when the wait runs out), with `output` set when it finished.
2866
2793
 
2867
2794
  **Parameters:**
2868
2795
 
@@ -2873,6 +2800,7 @@ Launch a draft test run: execute the draft's current source without publishing i
2873
2800
  | ​ ↳ `draft` | `string` | ✅ | — | — | Workflow draft ID |
2874
2801
  | ​ ↳ `draftRevision` | `number` | ✅ | — | — | The draft revision you intend to run, from the last read of the draft. The server rejects the run with a conflict if the draft has changed since. The upstream API treats this check as optional; the SDK requires it so a test run can never silently execute source the caller has already replaced. |
2875
2802
  | ​ ↳ `input` | `unknown` | ❌ | — | — | Input data passed to the workflow. Accepts any JSON value, or its JSON-string encoding. Omit for a workflow that takes no input. |
2803
+ | ​ ↳ `waitSeconds` | `number` | ❌ | — | — | Wait for the run to be finished, failed or cancelled, up to this many seconds, then return it as it stands. The answer comes as soon as the run ends. |
2876
2804
 
2877
2805
  **Returns:** `Promise<RunWorkflowDraftResponse>`
2878
2806
 
@@ -2902,7 +2830,7 @@ const { data: workflowRun } = await zapier.runWorkflowDraft({
2902
2830
  });
2903
2831
  ```
2904
2832
 
2905
- #### `triggerWorkflow` 🧪 _experimental_
2833
+ #### `triggerWorkflow` 🧪 _beta_
2906
2834
 
2907
2835
  Look up a workflow's trigger URL and fire it manually, as the authenticated account.
2908
2836
 
@@ -2931,71 +2859,7 @@ const { data: workflowRun } = await zapier.triggerWorkflow({
2931
2859
  });
2932
2860
  ```
2933
2861
 
2934
- #### `updateAgenticManagementConfig` 🧪 _experimental_
2935
-
2936
- Change the modes a workflow runs, whether fixes are applied without approval, or both. A `modes` list replaces the whole current set rather than adding to it.
2937
-
2938
- **Parameters:**
2939
-
2940
- | Name | Type | Required | Default | Possible Values | Description |
2941
- | ----------------- | --------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2942
- | `options` | `object` | ✅ | — | — | |
2943
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to update. |
2944
- | ​ ↳ `modes` | `array` | ❌ | — | — | The modes to run. The list you pass replaces the whole current set in one step; it is not added to what is already active. Omit it to leave the active modes as they are. A mode is what Agentic Management watches for and what it changes in response. `heal` monitors runs for errors and, when something breaks, diagnoses the cause and drafts and tests a fix; it is the mode a workflow gets by default. `expand` grows what the workflow covers: it reviews runs that succeeded without actually doing anything — a lookup that matched nothing, a filter that passed no items, a trigger payload no branch handles — and proposes a new branch or step to handle that case, rather than rewriting the ones that already work. `harden` watches the AI steps: when an AI step keeps doing the same work the same way, it converts that step into fixed code, so the workflow runs faster, costs less, and behaves the same way every time. Modes stack — each one you name runs alongside the others, and a mode you leave out does nothing, so a workflow on `expand` alone does not repair failed runs. Whether a change goes live on its own or waits for someone to approve it is `autoApprove`, not the mode. |
2945
- | ​ ↳ `autoApprove` | `boolean` | ❌ | — | — | Apply the fixes Agentic Management proposes without asking first. Set it to false and each fix waits for someone to approve it before anything changes. Omit it to leave the current setting alone. |
2946
-
2947
- **Returns:** `Promise<AgenticManagementConfigItem>`
2948
-
2949
- | Name | Type | Required | Possible Values | Description |
2950
- | ------------------ | --------- | -------- | --------------- | ------------------------------------------------------------- |
2951
- | `data` | `object` | ✅ | — | |
2952
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow whose config was updated. |
2953
- | ​ ↳ `modes` | `array` | ✅ | — | The modes the workflow runs after this update. |
2954
- | ​ ↳ `auto_approve` | `boolean` | ✅ | — | Whether fixes are applied without approval after this update. |
2955
-
2956
- **Example:**
2957
-
2958
- ```typescript
2959
- const { data: agenticManagementConfig } =
2960
- await zapier.updateAgenticManagementConfig({
2961
- workflow: "example-workflow",
2962
- });
2963
- ```
2964
-
2965
- #### `updateAgenticManagementIntent` 🧪 _experimental_
2966
-
2967
- Record what one workflow version is meant to do. Writing again for the same version replaces the text already stored, so there is no separate create and update.
2968
-
2969
- **Parameters:**
2970
-
2971
- | Name | Type | Required | Default | Possible Values | Description |
2972
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2973
- | `options` | `object` | ✅ | — | — | |
2974
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to write to. |
2975
- | ​ ↳ `intent` | `string` | ✅ | — | — | What this version of the workflow is for, in your own words: the outcome it produces, what sets it off, and anything that must always hold true. Plain prose, not code. |
2976
- | ​ ↳ `version` | `string` | ❌ | — | — | The workflow version the intent belongs to. Each version stores its own intent, and a version never picks up the intent of another, so publishing a new version starts it with none. Omit this to use the workflow's current published version. |
2977
-
2978
- **Returns:** `Promise<AgenticManagementIntentItem>`
2979
-
2980
- | Name | Type | Required | Possible Values | Description |
2981
- | ------------------------- | -------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2982
- | `data` | `object` | ✅ | — | |
2983
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow the intent belongs to. |
2984
- | ​ ↳ `workflow_version_id` | `string` | ✅ | — | The version this read or write actually landed on, so you can tell which one answered when you omitted `version`. `null` only when you read a workflow that has nothing published yet. |
2985
- | ​ ↳ `intent` | `string` | ✅ | — | The intent stored for this version, or `null` when this version has none. Intent is never carried over from another version. |
2986
- | ​ ↳ `updated_at` | `string` | ❌ | — | When the intent was last written; `null` when never captured. |
2987
-
2988
- **Example:**
2989
-
2990
- ```typescript
2991
- const { data: agenticManagementIntent } =
2992
- await zapier.updateAgenticManagementIntent({
2993
- workflow: "example-workflow",
2994
- intent: "example-intent",
2995
- });
2996
- ```
2997
-
2998
- #### `updateWorkflow` 🧪 _experimental_
2862
+ #### `updateWorkflow` 🧪 _beta_
2999
2863
 
3000
2864
  Update a durable workflow's name and/or description
3001
2865
 
@@ -3032,7 +2896,7 @@ const { data: workflow } = await zapier.updateWorkflow({
3032
2896
  });
3033
2897
  ```
3034
2898
 
3035
- #### `updateWorkflowDraft` 🧪 _experimental_
2899
+ #### `updateWorkflowDraft` 🧪 _beta_
3036
2900
 
3037
2901
  Update (autosave) an open workflow draft
3038
2902
 
@@ -3086,7 +2950,7 @@ const { data: workflowDraft } = await zapier.updateWorkflowDraft({
3086
2950
  });
3087
2951
  ```
3088
2952
 
3089
- #### `validateWorkflow` 🧪 _experimental_
2953
+ #### `validateWorkflow` 🧪 _beta_
3090
2954
 
3091
2955
  Validate durable workflow source without publishing it. Returns source diagnostics; issue kinds are extensible and may be unfamiliar to the client.
3092
2956
 
@@ -3128,6 +2992,193 @@ const { data: workflowValidation } = await zapier.validateWorkflow({
3128
2992
  });
3129
2993
  ```
3130
2994
 
2995
+ ### Next Gen Zaps (Experimental)
2996
+
2997
+ Next Gen Zaps are a new version of Zaps that run on code, which makes them easier for agents and AI tools to understand. Use these to build, test, publish, and run Next Gen Zaps, and to check on their runs.
2998
+
2999
+ > ℹ️ **Experimental.** Still being designed; may change shape or disappear in any release, without notice. Import from `"@zapier/zapier-sdk/experimental"` to use these methods.
3000
+
3001
+ #### `disableAgenticManagement` 🧪 _experimental_
3002
+
3003
+ Stop Agentic Management from working on one workflow. Its settings are kept, not deleted: the modes and auto-approve choice stay on file, so calling enableAgenticManagement later resumes with those settings instead of the defaults.
3004
+
3005
+ **Parameters:**
3006
+
3007
+ | Name | Type | Required | Default | Possible Values | Description |
3008
+ | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------- |
3009
+ | `options` | `object` | ✅ | — | — | |
3010
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to take out of agentic management. |
3011
+
3012
+ **Returns:** `Promise<{ success: boolean }>`
3013
+
3014
+ | Name | Type | Required | Possible Values | Description |
3015
+ | -------- | --------- | -------- | --------------- | -------------------------------------------------------------------- |
3016
+ | `data` | `object` | ✅ | — | |
3017
+ | ​ ↳ `ok` | `boolean` | ✅ | — | True when Zapier accepted the request to stop managing the workflow. |
3018
+
3019
+ **Example:**
3020
+
3021
+ ```typescript
3022
+ const result = await zapier.disableAgenticManagement({
3023
+ workflow: "example-workflow",
3024
+ });
3025
+ ```
3026
+
3027
+ #### `enableAgenticManagement` 🧪 _experimental_
3028
+
3029
+ Put one workflow under Agentic Management. A workflow disabled earlier comes back with the modes and auto-approve choice it had, unless you pass new ones here.
3030
+
3031
+ **Parameters:**
3032
+
3033
+ | Name | Type | Required | Default | Possible Values | Description |
3034
+ | ----------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3035
+ | `options` | `object` | ✅ | — | — | |
3036
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to put under agentic management. |
3037
+ | ​ ↳ `modes` | `array` | ❌ | — | — | The modes to run for this workflow. Omit it and the workflow starts on `heal` alone. A mode is what Agentic Management watches for and what it changes in response. `heal` monitors runs for errors and, when something breaks, diagnoses the cause and drafts and tests a fix; it is the mode a workflow gets by default. `expand` grows what the workflow covers: it reviews runs that succeeded without actually doing anything — a lookup that matched nothing, a filter that passed no items, a trigger payload no branch handles — and proposes a new branch or step to handle that case, rather than rewriting the ones that already work. `harden` watches the AI steps: when an AI step keeps doing the same work the same way, it converts that step into fixed code, so the workflow runs faster, costs less, and behaves the same way every time. Modes stack — each one you name runs alongside the others, and a mode you leave out does nothing, so a workflow on `expand` alone does not repair failed runs. Whether a change goes live on its own or waits for someone to approve it is `autoApprove`, not the mode. |
3038
+ | ​ ↳ `autoApprove` | `boolean` | ❌ | — | — | Apply the fixes Agentic Management proposes without asking first. Set it to false and each fix waits for someone to approve it. Omit it and fixes are applied without asking, which is what a workflow enabled for the first time gets; a workflow being re-enabled keeps the setting it had before. |
3039
+
3040
+ **Returns:** `Promise<AgenticManagementEnableResultItem>`
3041
+
3042
+ | Name | Type | Required | Possible Values | Description |
3043
+ | ---------------- | -------- | -------- | --------------- | ----------------------------------------------------------------------- |
3044
+ | `data` | `object` | ✅ | — | |
3045
+ | ​ ↳ `manager_id` | `string` | ✅ | — | ID of the manager automation Zapier provisioned to watch this workflow. |
3046
+
3047
+ **Example:**
3048
+
3049
+ ```typescript
3050
+ const { data: agenticManagementEnableResult } =
3051
+ await zapier.enableAgenticManagement({
3052
+ workflow: "example-workflow",
3053
+ });
3054
+ ```
3055
+
3056
+ #### `getAgenticManagementConfig` 🧪 _experimental_
3057
+
3058
+ Read the Agentic Management config for one workflow.
3059
+
3060
+ **Parameters:**
3061
+
3062
+ | Name | Type | Required | Default | Possible Values | Description |
3063
+ | -------------- | -------- | -------- | ------- | --------------- | --------------------------- |
3064
+ | `options` | `object` | ✅ | — | — | |
3065
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to read. |
3066
+
3067
+ **Returns:** `Promise<AgenticManagementConfigItem>`
3068
+
3069
+ | Name | Type | Required | Possible Values | Description |
3070
+ | ------------------ | --------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3071
+ | `data` | `object` | ✅ | — | |
3072
+ | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow this config describes. |
3073
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether Agentic Management is currently active for this workflow. |
3074
+ | ​ ↳ `auto_approve` | `boolean` | ✅ | — | Whether fixes are applied without asking for approval first. `false` when Agentic Management has never been set up for this workflow. |
3075
+ | ​ ↳ `modes` | `array` | ✅ | — | The modes the workflow runs. Still listed while `enabled` is false, because the settings are kept for a later re-enable — so read `enabled` to tell whether they are in effect, not this list. |
3076
+ | ​ ↳ `manager_id` | `string` | ❌ | — | ID of the manager automation Zapier provisioned for this workflow, once one exists; `null` otherwise. Use it to link to that automation to see the runs it has taken. |
3077
+
3078
+ **Example:**
3079
+
3080
+ ```typescript
3081
+ const { data: agenticManagementConfig } =
3082
+ await zapier.getAgenticManagementConfig({
3083
+ workflow: "example-workflow",
3084
+ });
3085
+ ```
3086
+
3087
+ #### `getAgenticManagementIntent` 🧪 _experimental_
3088
+
3089
+ Read the intent recorded for one workflow version: the plain-language description of what that version of the workflow is meant to do.
3090
+
3091
+ **Parameters:**
3092
+
3093
+ | Name | Type | Required | Default | Possible Values | Description |
3094
+ | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3095
+ | `options` | `object` | ✅ | — | — | |
3096
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to read. |
3097
+ | ​ ↳ `version` | `string` | ❌ | — | — | The workflow version the intent belongs to. Each version stores its own intent, and a version never picks up the intent of another, so publishing a new version starts it with none. Omit this to use the workflow's current published version. |
3098
+
3099
+ **Returns:** `Promise<AgenticManagementIntentItem>`
3100
+
3101
+ | Name | Type | Required | Possible Values | Description |
3102
+ | ------------------------- | -------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3103
+ | `data` | `object` | ✅ | — | |
3104
+ | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow the intent belongs to. |
3105
+ | ​ ↳ `workflow_version_id` | `string` | ✅ | — | The version this read or write actually landed on, so you can tell which one answered when you omitted `version`. `null` only when you read a workflow that has nothing published yet. |
3106
+ | ​ ↳ `intent` | `string` | ✅ | — | The intent stored for this version, or `null` when this version has none. Intent is never carried over from another version. |
3107
+ | ​ ↳ `updated_at` | `string` | ❌ | — | When the intent was last written; `null` when never captured. |
3108
+
3109
+ **Example:**
3110
+
3111
+ ```typescript
3112
+ const { data: agenticManagementIntent } =
3113
+ await zapier.getAgenticManagementIntent({
3114
+ workflow: "example-workflow",
3115
+ });
3116
+ ```
3117
+
3118
+ #### `updateAgenticManagementConfig` 🧪 _experimental_
3119
+
3120
+ Change the modes a workflow runs, whether fixes are applied without approval, or both. A `modes` list replaces the whole current set rather than adding to it.
3121
+
3122
+ **Parameters:**
3123
+
3124
+ | Name | Type | Required | Default | Possible Values | Description |
3125
+ | ----------------- | --------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3126
+ | `options` | `object` | ✅ | — | — | |
3127
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to update. |
3128
+ | ​ ↳ `modes` | `array` | ❌ | — | — | The modes to run. The list you pass replaces the whole current set in one step; it is not added to what is already active. Omit it to leave the active modes as they are. A mode is what Agentic Management watches for and what it changes in response. `heal` monitors runs for errors and, when something breaks, diagnoses the cause and drafts and tests a fix; it is the mode a workflow gets by default. `expand` grows what the workflow covers: it reviews runs that succeeded without actually doing anything — a lookup that matched nothing, a filter that passed no items, a trigger payload no branch handles — and proposes a new branch or step to handle that case, rather than rewriting the ones that already work. `harden` watches the AI steps: when an AI step keeps doing the same work the same way, it converts that step into fixed code, so the workflow runs faster, costs less, and behaves the same way every time. Modes stack — each one you name runs alongside the others, and a mode you leave out does nothing, so a workflow on `expand` alone does not repair failed runs. Whether a change goes live on its own or waits for someone to approve it is `autoApprove`, not the mode. |
3129
+ | ​ ↳ `autoApprove` | `boolean` | ❌ | — | — | Apply the fixes Agentic Management proposes without asking first. Set it to false and each fix waits for someone to approve it before anything changes. Omit it to leave the current setting alone. |
3130
+
3131
+ **Returns:** `Promise<AgenticManagementConfigItem>`
3132
+
3133
+ | Name | Type | Required | Possible Values | Description |
3134
+ | ------------------ | --------- | -------- | --------------- | ------------------------------------------------------------- |
3135
+ | `data` | `object` | ✅ | — | |
3136
+ | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow whose config was updated. |
3137
+ | ​ ↳ `modes` | `array` | ✅ | — | The modes the workflow runs after this update. |
3138
+ | ​ ↳ `auto_approve` | `boolean` | ✅ | — | Whether fixes are applied without approval after this update. |
3139
+
3140
+ **Example:**
3141
+
3142
+ ```typescript
3143
+ const { data: agenticManagementConfig } =
3144
+ await zapier.updateAgenticManagementConfig({
3145
+ workflow: "example-workflow",
3146
+ });
3147
+ ```
3148
+
3149
+ #### `updateAgenticManagementIntent` 🧪 _experimental_
3150
+
3151
+ Record what one workflow version is meant to do. Writing again for the same version replaces the text already stored, so there is no separate create and update.
3152
+
3153
+ **Parameters:**
3154
+
3155
+ | Name | Type | Required | Default | Possible Values | Description |
3156
+ | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3157
+ | `options` | `object` | ✅ | — | — | |
3158
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to write to. |
3159
+ | ​ ↳ `intent` | `string` | ✅ | — | — | What this version of the workflow is for, in your own words: the outcome it produces, what sets it off, and anything that must always hold true. Plain prose, not code. |
3160
+ | ​ ↳ `version` | `string` | ❌ | — | — | The workflow version the intent belongs to. Each version stores its own intent, and a version never picks up the intent of another, so publishing a new version starts it with none. Omit this to use the workflow's current published version. |
3161
+
3162
+ **Returns:** `Promise<AgenticManagementIntentItem>`
3163
+
3164
+ | Name | Type | Required | Possible Values | Description |
3165
+ | ------------------------- | -------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3166
+ | `data` | `object` | ✅ | — | |
3167
+ | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow the intent belongs to. |
3168
+ | ​ ↳ `workflow_version_id` | `string` | ✅ | — | The version this read or write actually landed on, so you can tell which one answered when you omitted `version`. `null` only when you read a workflow that has nothing published yet. |
3169
+ | ​ ↳ `intent` | `string` | ✅ | — | The intent stored for this version, or `null` when this version has none. Intent is never carried over from another version. |
3170
+ | ​ ↳ `updated_at` | `string` | ❌ | — | When the intent was last written; `null` when never captured. |
3171
+
3172
+ **Example:**
3173
+
3174
+ ```typescript
3175
+ const { data: agenticManagementIntent } =
3176
+ await zapier.updateAgenticManagementIntent({
3177
+ workflow: "example-workflow",
3178
+ intent: "example-intent",
3179
+ });
3180
+ ```
3181
+
3131
3182
  ### Tables
3132
3183
 
3133
3184
  Tables is Zapier's database tool for storing and managing data. Use these to manage tables, their fields, and their records.