@zapier/zapier-sdk 0.118.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)
@@ -1720,13 +1722,13 @@ const { data: form } = await zapier.createForm({
1720
1722
  });
1721
1723
  ```
1722
1724
 
1723
- ### Next Gen Zaps (Experimental)
1725
+ ### Next Gen Zaps (Beta)
1724
1726
 
1725
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.
1726
1728
 
1727
- > ℹ️ **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.
1728
1730
 
1729
- #### `cancelDurableRun` 🧪 _experimental_
1731
+ #### `cancelDurableRun` 🧪 _beta_
1730
1732
 
1731
1733
  Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal.
1732
1734
 
@@ -1753,7 +1755,7 @@ const { data: durableRun } = await zapier.cancelDurableRun({
1753
1755
  });
1754
1756
  ```
1755
1757
 
1756
- #### `createWorkflow` 🧪 _experimental_
1758
+ #### `createWorkflow` 🧪 _beta_
1757
1759
 
1758
1760
  Create a durable workflow container. Starts disabled with no version; publish a version to add code.
1759
1761
 
@@ -1789,7 +1791,7 @@ const { data: workflow } = await zapier.createWorkflow({
1789
1791
  });
1790
1792
  ```
1791
1793
 
1792
- #### `createWorkflowDraft` 🧪 _experimental_
1794
+ #### `createWorkflowDraft` 🧪 _beta_
1793
1795
 
1794
1796
  Fork a new draft from the workflow's current live version (or a blank stub before the first publish)
1795
1797
 
@@ -1833,7 +1835,7 @@ const { data: workflowDraft } = await zapier.createWorkflowDraft({
1833
1835
  });
1834
1836
  ```
1835
1837
 
1836
- #### `deleteWorkflow` 🧪 _experimental_
1838
+ #### `deleteWorkflow` 🧪 _beta_
1837
1839
 
1838
1840
  Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves.
1839
1841
 
@@ -1859,33 +1861,7 @@ const result = await zapier.deleteWorkflow({
1859
1861
  });
1860
1862
  ```
1861
1863
 
1862
- #### `disableAgenticManagement` 🧪 _experimental_
1863
-
1864
- 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.
1865
-
1866
- **Parameters:**
1867
-
1868
- | Name | Type | Required | Default | Possible Values | Description |
1869
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------- |
1870
- | `options` | `object` | ✅ | — | — | |
1871
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to take out of agentic management. |
1872
-
1873
- **Returns:** `Promise<{ success: boolean }>`
1874
-
1875
- | Name | Type | Required | Possible Values | Description |
1876
- | -------- | --------- | -------- | --------------- | -------------------------------------------------------------------- |
1877
- | `data` | `object` | ✅ | — | |
1878
- | ​ ↳ `ok` | `boolean` | ✅ | — | True when Zapier accepted the request to stop managing the workflow. |
1879
-
1880
- **Example:**
1881
-
1882
- ```typescript
1883
- const result = await zapier.disableAgenticManagement({
1884
- workflow: "example-workflow",
1885
- });
1886
- ```
1887
-
1888
- #### `disableWorkflow` 🧪 _experimental_
1864
+ #### `disableWorkflow` 🧪 _beta_
1889
1865
 
1890
1866
  Disable a durable workflow so it stops accepting triggers
1891
1867
 
@@ -1912,7 +1888,7 @@ const { data: workflow } = await zapier.disableWorkflow({
1912
1888
  });
1913
1889
  ```
1914
1890
 
1915
- #### `discardWorkflowDraft` 🧪 _experimental_
1891
+ #### `discardWorkflowDraft` 🧪 _beta_
1916
1892
 
1917
1893
  Discard an open workflow draft (soft delete). The draft's unpublished edits stop resolving; the published version is untouched.
1918
1894
 
@@ -1957,36 +1933,7 @@ const result = await zapier.discardWorkflowDraft({
1957
1933
  });
1958
1934
  ```
1959
1935
 
1960
- #### `enableAgenticManagement` 🧪 _experimental_
1961
-
1962
- 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.
1963
-
1964
- **Parameters:**
1965
-
1966
- | Name | Type | Required | Default | Possible Values | Description |
1967
- | ----------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1968
- | `options` | `object` | ✅ | — | — | |
1969
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to put under agentic management. |
1970
- | ​ ↳ `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. |
1971
- | ​ ↳ `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. |
1972
-
1973
- **Returns:** `Promise<AgenticManagementEnableResultItem>`
1974
-
1975
- | Name | Type | Required | Possible Values | Description |
1976
- | ---------------- | -------- | -------- | --------------- | ----------------------------------------------------------------------- |
1977
- | `data` | `object` | ✅ | — | |
1978
- | ​ ↳ `manager_id` | `string` | ✅ | — | ID of the manager automation Zapier provisioned to watch this workflow. |
1979
-
1980
- **Example:**
1981
-
1982
- ```typescript
1983
- const { data: agenticManagementEnableResult } =
1984
- await zapier.enableAgenticManagement({
1985
- workflow: "example-workflow",
1986
- });
1987
- ```
1988
-
1989
- #### `enableWorkflow` 🧪 _experimental_
1936
+ #### `enableWorkflow` 🧪 _beta_
1990
1937
 
1991
1938
  Enable a durable workflow so it accepts triggers
1992
1939
 
@@ -2013,69 +1960,7 @@ const { data: workflow } = await zapier.enableWorkflow({
2013
1960
  });
2014
1961
  ```
2015
1962
 
2016
- #### `getAgenticManagementConfig` 🧪 _experimental_
2017
-
2018
- Read the Agentic Management config for one workflow.
2019
-
2020
- **Parameters:**
2021
-
2022
- | Name | Type | Required | Default | Possible Values | Description |
2023
- | -------------- | -------- | -------- | ------- | --------------- | --------------------------- |
2024
- | `options` | `object` | ✅ | — | — | |
2025
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to read. |
2026
-
2027
- **Returns:** `Promise<AgenticManagementConfigItem>`
2028
-
2029
- | Name | Type | Required | Possible Values | Description |
2030
- | ------------------ | --------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2031
- | `data` | `object` | ✅ | — | |
2032
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow this config describes. |
2033
- | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether Agentic Management is currently active for this workflow. |
2034
- | ​ ↳ `auto_approve` | `boolean` | ✅ | — | Whether fixes are applied without asking for approval first. `false` when Agentic Management has never been set up for this workflow. |
2035
- | ​ ↳ `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. |
2036
- | ​ ↳ `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. |
2037
-
2038
- **Example:**
2039
-
2040
- ```typescript
2041
- const { data: agenticManagementConfig } =
2042
- await zapier.getAgenticManagementConfig({
2043
- workflow: "example-workflow",
2044
- });
2045
- ```
2046
-
2047
- #### `getAgenticManagementIntent` 🧪 _experimental_
2048
-
2049
- Read the intent recorded for one workflow version: the plain-language description of what that version of the workflow is meant to do.
2050
-
2051
- **Parameters:**
2052
-
2053
- | Name | Type | Required | Default | Possible Values | Description |
2054
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2055
- | `options` | `object` | ✅ | — | — | |
2056
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to read. |
2057
- | ​ ↳ `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. |
2058
-
2059
- **Returns:** `Promise<AgenticManagementIntentItem>`
2060
-
2061
- | Name | Type | Required | Possible Values | Description |
2062
- | ------------------------- | -------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2063
- | `data` | `object` | ✅ | — | |
2064
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow the intent belongs to. |
2065
- | ​ ↳ `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. |
2066
- | ​ ↳ `intent` | `string` | ✅ | — | The intent stored for this version, or `null` when this version has none. Intent is never carried over from another version. |
2067
- | ​ ↳ `updated_at` | `string` | ❌ | — | When the intent was last written; `null` when never captured. |
2068
-
2069
- **Example:**
2070
-
2071
- ```typescript
2072
- const { data: agenticManagementIntent } =
2073
- await zapier.getAgenticManagementIntent({
2074
- workflow: "example-workflow",
2075
- });
2076
- ```
2077
-
2078
- #### `getDurableRun` 🧪 _experimental_
1963
+ #### `getDurableRun` 🧪 _beta_
2079
1964
 
2080
1965
  Get the full state of a run-once durable run, including its operations journal
2081
1966
 
@@ -2109,16 +1994,17 @@ const { data: durableRun } = await zapier.getDurableRun({
2109
1994
  });
2110
1995
  ```
2111
1996
 
2112
- #### `getTriggerRun` 🧪 _experimental_
1997
+ #### `getTriggerRun` 🧪 _beta_
2113
1998
 
2114
- 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.
2115
2000
 
2116
2001
  **Parameters:**
2117
2002
 
2118
- | Name | Type | Required | Default | Possible Values | Description |
2119
- | ------------- | -------- | -------- | ------- | --------------- | ------------------- |
2120
- | `options` | `object` | ✅ | — | — | |
2121
- | ​ ↳ `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. |
2122
2008
 
2123
2009
  **Returns:** `Promise<WorkflowRunItem>`
2124
2010
 
@@ -2143,7 +2029,7 @@ const { data: workflowRun } = await zapier.getTriggerRun({
2143
2029
  });
2144
2030
  ```
2145
2031
 
2146
- #### `getWorkflow` 🧪 _experimental_
2032
+ #### `getWorkflow` 🧪 _beta_
2147
2033
 
2148
2034
  Get a durable workflow with its current version details and trigger claim status
2149
2035
 
@@ -2198,7 +2084,7 @@ const { data: workflow } = await zapier.getWorkflow({
2198
2084
  });
2199
2085
  ```
2200
2086
 
2201
- #### `getWorkflowDraft` 🧪 _experimental_
2087
+ #### `getWorkflowDraft` 🧪 _beta_
2202
2088
 
2203
2089
  Get full details of a workflow draft including source files
2204
2090
 
@@ -2243,17 +2129,18 @@ const { data: workflowDraft } = await zapier.getWorkflowDraft({
2243
2129
  });
2244
2130
  ```
2245
2131
 
2246
- #### `getWorkflowRun` 🧪 _experimental_
2132
+ #### `getWorkflowRun` 🧪 _beta_
2247
2133
 
2248
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)
2249
2135
 
2250
2136
  **Parameters:**
2251
2137
 
2252
- | Name | Type | Required | Default | Possible Values | Description |
2253
- | -------------- | -------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------- |
2254
- | `options` | `object` | ✅ | — | — | |
2255
- | ​ ↳ `workflow` | `string` | ❌ | — | — | Parent workflow ID — used only to scope the CLI run-id picker; ignored by the API call. |
2256
- | ​ ↳ `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. |
2257
2144
 
2258
2145
  **Returns:** `Promise<WorkflowRunItem>`
2259
2146
 
@@ -2303,7 +2190,7 @@ const { data: workflowRun } = await zapier.getWorkflowRun({
2303
2190
  });
2304
2191
  ```
2305
2192
 
2306
- #### `getWorkflowVersion` 🧪 _experimental_
2193
+ #### `getWorkflowVersion` 🧪 _beta_
2307
2194
 
2308
2195
  Get full details of a workflow version including source files
2309
2196
 
@@ -2340,7 +2227,7 @@ const { data: workflowVersion } = await zapier.getWorkflowVersion({
2340
2227
  });
2341
2228
  ```
2342
2229
 
2343
- #### `importWorkflow` 🧪 _experimental_
2230
+ #### `importWorkflow` 🧪 _beta_
2344
2231
 
2345
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.
2346
2233
 
@@ -2416,7 +2303,7 @@ const { data: workflow } = await zapier.importWorkflow({
2416
2303
  });
2417
2304
  ```
2418
2305
 
2419
- #### `listDurableRuns` 🧪 _experimental_
2306
+ #### `listDurableRuns` 🧪 _beta_
2420
2307
 
2421
2308
  List run-once durable runs for the authenticated account, newest first
2422
2309
 
@@ -2462,7 +2349,7 @@ for await (const durableRun of zapier.listDurableRuns().items()) {
2462
2349
  }
2463
2350
  ```
2464
2351
 
2465
- #### `listWorkflowDrafts` 🧪 _experimental_
2352
+ #### `listWorkflowDrafts` 🧪 _beta_
2466
2353
 
2467
2354
  List drafts for a workflow, most recently edited first (open drafts by default)
2468
2355
 
@@ -2520,7 +2407,7 @@ for await (const workflowDraft of zapier
2520
2407
  }
2521
2408
  ```
2522
2409
 
2523
- #### `listWorkflowRuns` 🧪 _experimental_
2410
+ #### `listWorkflowRuns` 🧪 _beta_
2524
2411
 
2525
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.
2526
2413
 
@@ -2599,7 +2486,7 @@ for await (const workflowRun of zapier
2599
2486
  }
2600
2487
  ```
2601
2488
 
2602
- #### `listWorkflowVersions` 🧪 _experimental_
2489
+ #### `listWorkflowVersions` 🧪 _beta_
2603
2490
 
2604
2491
  List published versions for a workflow, newest first
2605
2492
 
@@ -2657,7 +2544,7 @@ for await (const workflowVersion of zapier
2657
2544
  }
2658
2545
  ```
2659
2546
 
2660
- #### `listWorkflows` 🧪 _experimental_
2547
+ #### `listWorkflows` 🧪 _beta_
2661
2548
 
2662
2549
  List all active durable workflows for the authenticated account
2663
2550
 
@@ -2714,7 +2601,7 @@ for await (const workflow of zapier.listWorkflows().items()) {
2714
2601
  }
2715
2602
  ```
2716
2603
 
2717
- #### `publishWorkflowDraft` 🧪 _experimental_
2604
+ #### `publishWorkflowDraft` 🧪 _beta_
2718
2605
 
2719
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.
2720
2607
 
@@ -2774,7 +2661,7 @@ const { data: workflowVersion } = await zapier.publishWorkflowDraft({
2774
2661
  });
2775
2662
  ```
2776
2663
 
2777
- #### `publishWorkflowVersion` 🧪 _experimental_
2664
+ #### `publishWorkflowVersion` 🧪 _beta_
2778
2665
 
2779
2666
  Publish a new version of a durable workflow. Enables the workflow by default.
2780
2667
 
@@ -2823,7 +2710,7 @@ const { data: workflowVersion } = await zapier.publishWorkflowVersion({
2823
2710
  });
2824
2711
  ```
2825
2712
 
2826
- #### `runDurable` 🧪 _experimental_
2713
+ #### `runDurable` 🧪 _beta_
2827
2714
 
2828
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.
2829
2716
 
@@ -2863,9 +2750,46 @@ const { data: durableRun } = await zapier.runDurable({
2863
2750
  });
2864
2751
  ```
2865
2752
 
2866
- #### `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_
2867
2791
 
2868
- 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.
2869
2793
 
2870
2794
  **Parameters:**
2871
2795
 
@@ -2876,6 +2800,7 @@ Launch a draft test run: execute the draft's current source without publishing i
2876
2800
  | ​ ↳ `draft` | `string` | ✅ | — | — | Workflow draft ID |
2877
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. |
2878
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. |
2879
2804
 
2880
2805
  **Returns:** `Promise<RunWorkflowDraftResponse>`
2881
2806
 
@@ -2905,7 +2830,7 @@ const { data: workflowRun } = await zapier.runWorkflowDraft({
2905
2830
  });
2906
2831
  ```
2907
2832
 
2908
- #### `triggerWorkflow` 🧪 _experimental_
2833
+ #### `triggerWorkflow` 🧪 _beta_
2909
2834
 
2910
2835
  Look up a workflow's trigger URL and fire it manually, as the authenticated account.
2911
2836
 
@@ -2934,71 +2859,7 @@ const { data: workflowRun } = await zapier.triggerWorkflow({
2934
2859
  });
2935
2860
  ```
2936
2861
 
2937
- #### `updateAgenticManagementConfig` 🧪 _experimental_
2938
-
2939
- 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.
2940
-
2941
- **Parameters:**
2942
-
2943
- | Name | Type | Required | Default | Possible Values | Description |
2944
- | ----------------- | --------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2945
- | `options` | `object` | ✅ | — | — | |
2946
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to update. |
2947
- | ​ ↳ `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. |
2948
- | ​ ↳ `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. |
2949
-
2950
- **Returns:** `Promise<AgenticManagementConfigItem>`
2951
-
2952
- | Name | Type | Required | Possible Values | Description |
2953
- | ------------------ | --------- | -------- | --------------- | ------------------------------------------------------------- |
2954
- | `data` | `object` | ✅ | — | |
2955
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow whose config was updated. |
2956
- | ​ ↳ `modes` | `array` | ✅ | — | The modes the workflow runs after this update. |
2957
- | ​ ↳ `auto_approve` | `boolean` | ✅ | — | Whether fixes are applied without approval after this update. |
2958
-
2959
- **Example:**
2960
-
2961
- ```typescript
2962
- const { data: agenticManagementConfig } =
2963
- await zapier.updateAgenticManagementConfig({
2964
- workflow: "example-workflow",
2965
- });
2966
- ```
2967
-
2968
- #### `updateAgenticManagementIntent` 🧪 _experimental_
2969
-
2970
- 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.
2971
-
2972
- **Parameters:**
2973
-
2974
- | Name | Type | Required | Default | Possible Values | Description |
2975
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2976
- | `options` | `object` | ✅ | — | — | |
2977
- | ​ ↳ `workflow` | `string` | ✅ | — | — | ID of the workflow to write to. |
2978
- | ​ ↳ `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. |
2979
- | ​ ↳ `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. |
2980
-
2981
- **Returns:** `Promise<AgenticManagementIntentItem>`
2982
-
2983
- | Name | Type | Required | Possible Values | Description |
2984
- | ------------------------- | -------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2985
- | `data` | `object` | ✅ | — | |
2986
- | ​ ↳ `workflow_id` | `string` | ✅ | — | The workflow the intent belongs to. |
2987
- | ​ ↳ `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. |
2988
- | ​ ↳ `intent` | `string` | ✅ | — | The intent stored for this version, or `null` when this version has none. Intent is never carried over from another version. |
2989
- | ​ ↳ `updated_at` | `string` | ❌ | — | When the intent was last written; `null` when never captured. |
2990
-
2991
- **Example:**
2992
-
2993
- ```typescript
2994
- const { data: agenticManagementIntent } =
2995
- await zapier.updateAgenticManagementIntent({
2996
- workflow: "example-workflow",
2997
- intent: "example-intent",
2998
- });
2999
- ```
3000
-
3001
- #### `updateWorkflow` 🧪 _experimental_
2862
+ #### `updateWorkflow` 🧪 _beta_
3002
2863
 
3003
2864
  Update a durable workflow's name and/or description
3004
2865
 
@@ -3035,7 +2896,7 @@ const { data: workflow } = await zapier.updateWorkflow({
3035
2896
  });
3036
2897
  ```
3037
2898
 
3038
- #### `updateWorkflowDraft` 🧪 _experimental_
2899
+ #### `updateWorkflowDraft` 🧪 _beta_
3039
2900
 
3040
2901
  Update (autosave) an open workflow draft
3041
2902
 
@@ -3089,7 +2950,7 @@ const { data: workflowDraft } = await zapier.updateWorkflowDraft({
3089
2950
  });
3090
2951
  ```
3091
2952
 
3092
- #### `validateWorkflow` 🧪 _experimental_
2953
+ #### `validateWorkflow` 🧪 _beta_
3093
2954
 
3094
2955
  Validate durable workflow source without publishing it. Returns source diagnostics; issue kinds are extensible and may be unfamiliar to the client.
3095
2956
 
@@ -3131,6 +2992,193 @@ const { data: workflowValidation } = await zapier.validateWorkflow({
3131
2992
  });
3132
2993
  ```
3133
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
+
3134
3182
  ### Tables
3135
3183
 
3136
3184
  Tables is Zapier's database tool for storing and managing data. Use these to manage tables, their fields, and their records.