# Scenarios

Use these commands to manage Make scenarios, folders, webhooks, and custom functions with the Make CLI.

***

### Scenarios

Manage your scenarios.

***

#### `make-cli scenarios list`

List all scenarios for a team.

**Options**

| Option      | Description                        | Required |
| ----------- | ---------------------------------- | -------- |
| `--team-id` | The team ID to filter scenarios by | Yes      |

**Example**

```bash
make-cli scenarios list --team-id=5
```

***

#### `make-cli scenarios get`

Get a scenario and its blueprint by ID.

**Arguments**

| Argument        | Description                                                                 | Required |
| --------------- | --------------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to retrieve. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Example**

```bash
make-cli scenarios get 925
```

***

#### `make-cli scenarios create`

Create a new scenario.

**Options**

| Option         | Description                                                            | Required |
| -------------- | ---------------------------------------------------------------------- | -------- |
| `--team-id`    | ID of the team where the scenario will be created                      | Yes      |
| `--folder-id`  | ID of the folder where the scenario will be placed                     | No       |
| `--scheduling` | Scheduling configuration for the scenario                              | Yes      |
| `--blueprint`  | Blueprint containing the scenario configuration                        | Yes      |
| `--basedon`    | ID of an existing template to base this one on                         | No       |
| `--confirmed`  | Confirmation in case the scenario uses apps that are not yet installed | No       |

**Example**

```bash
make-cli scenarios create \
  --team-id=5 \
  --scheduling='{"type":"indefinitely","interval":60}' \
  --blueprint='{
    "name": "Gmail Attachments to Google Drive",
    "flow": [
      {
        "id": 1,
        "module": "google-email:watchEmails",
        "version": 1,
        "parameters": {
          "connection": 5,
          "folder": "INBOX",
          "filter": "has:attachment"
        },
        "mapper": {},
        "metadata": {
          "expect": []
        }
      },
      {
        "id": 2,
        "module": "google-drive:uploadFile",
        "version": 1,
        "parameters": {
          "connection": 6
        },
        "mapper": {
          "folderId": "your-folder-id-here",
          "file": "{{1.attachments[]}}"
        },
        "metadata": {
          "expect": []
        }
      }
    ],
    "metadata": {
      "version": 1
    }
  }'
```

***

#### `make-cli scenarios update`

Update a scenario.

**Arguments**

| Argument        | Description                                                               | Required |
| --------------- | ------------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to update. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Options**

| Option          | Description                                                            | Required |
| --------------- | ---------------------------------------------------------------------- | -------- |
| `--name`        | New name for the scenario                                              | No       |
| `--description` | New description for the scenario                                       | No       |
| `--folder-id`   | New folder ID for the scenario                                         | No       |
| `--scheduling`  | Updated scheduling configuration                                       | No       |
| `--blueprint`   | Updated blueprint configuration                                        | No       |
| `--confirmed`   | Confirmation in case the scenario uses apps that are not yet installed | No       |

**Example**

```bash
make-cli scenarios update 925 \
  --name='Updated Scenario' \
  --scheduling='{"type":"indefinitely","interval":900}'
```

***

#### `make-cli scenarios delete`

Delete a scenario.

**Arguments**

| Argument        | Description                                                               | Required |
| --------------- | ------------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to delete. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Example**

```bash
make-cli scenarios delete 925
```

***

#### `make-cli scenarios activate`

Activate a scenario.

**Arguments**

| Argument        | Description                                                                 | Required |
| --------------- | --------------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to activate. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Example**

```bash
make-cli scenarios activate 925
```

***

#### `make-cli scenarios deactivate`

Deactivate a scenario.

**Arguments**

| Argument        | Description                                                                   | Required |
| --------------- | ----------------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to deactivate. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Example**

```bash
make-cli scenarios deactivate 925
```

***

#### `make-cli scenarios run`

Execute a scenario with optional input data.

**Arguments**

| Argument        | Description                                                            | Required |
| --------------- | ---------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to run. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Options**

| Option           | Description                                      | Required |
| ---------------- | ------------------------------------------------ | -------- |
| `--data`         | Optional input data for the scenario             | No       |
| `--responsive`   | Whether to run responsively                      | No       |
| `--callback-url` | URL to call once the scenario execution finishes | No       |

**Example**

```bash
make-cli scenarios run 925 --data='{"name":"John"}' --responsive
```

***

#### `make-cli scenarios interface`

Get the interface for a scenario.

**Arguments**

| Argument        | Description                                                                              | Required |
| --------------- | ---------------------------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to get the interface for. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Example**

```bash
make-cli scenarios interface 925
```

***

#### `make-cli scenarios set-interface`

Update the interface for a scenario.

**Arguments**

| Argument        | Description                                                                                 | Required |
| --------------- | ------------------------------------------------------------------------------------------- | -------- |
| `<scenario-id>` | The scenario ID to update the interface for. Can also be passed as `--scenario-id=<value>`. | Yes      |

**Options**

| Option        | Description                                                   | Required |
| ------------- | ------------------------------------------------------------- | -------- |
| `--interface` | The interface definition with input and output specifications | Yes      |

**Example**

```bash
make-cli scenarios set-interface 925 \
  --interface='{
    "input": [
      {
        "name": "myInput",
        "type": "text",
        "required": true
      }
    ],
    "output": []
  }'
```

***

### Scenario executions

Manage your scenario executions.

***

#### `make-cli executions list`

List executions for a scenario.

**Options**

| Option          | Description                            | Required |
| --------------- | -------------------------------------- | -------- |
| `--scenario-id` | The scenario ID to list executions for | Yes      |
| `--status`      | Filter by execution status             | No       |
| `--from`        | Start timestamp for filtering          | No       |
| `--to`          | End timestamp for filtering            | No       |

**Example**

```bash
make-cli executions list --scenario-id=925
```

***

#### `make-cli executions get-detail`

Get detailed result of a specific execution.

**Arguments**

| Argument         | Description                                                                   | Required |
| ---------------- | ----------------------------------------------------------------------------- | -------- |
| `<execution-id>` | The execution ID to retrieve. Can also be passed as `--execution-id=<value>`. | Yes      |

**Options**

| Option          | Description                              | Required |
| --------------- | ---------------------------------------- | -------- |
| `--scenario-id` | The scenario ID the execution belongs to | Yes      |

**Example**

```bash
make-cli executions get-detail a07e16f2ad134bf49cf83a00aa95c0a5 \
  --scenario-id=925
```

***

#### `make-cli executions get`

Get details of a specific execution.

**Arguments**

| Argument         | Description                                                                   | Required |
| ---------------- | ----------------------------------------------------------------------------- | -------- |
| `<execution-id>` | The execution ID to retrieve. Can also be passed as `--execution-id=<value>`. | Yes      |

**Options**

| Option          | Description                              | Required |
| --------------- | ---------------------------------------- | -------- |
| `--scenario-id` | The scenario ID the execution belongs to | Yes      |

**Example**

```bash
make-cli executions get a07e16f2ad134bf49cf83a00aa95c0a5 --scenario-id=925
```

***

#### `make-cli executions list-for-incomp-exec`

List executions for an incomplete execution.

**Options**

| Option                      | Description                                        | Required |
| --------------------------- | -------------------------------------------------- | -------- |
| `--incomplete-execution-id` | The incomplete execution ID to list executions for | Yes      |
| `--limit`                   | Maximum number of executions to return             | No       |

**Example**

```bash
make-cli executions list-for-incomp-exec \
  --incomplete-execution-id=a07e16f2ad134bf49cf83a00aa95c0a5
```

***

#### `make-cli executions get-for-incomp-exec`

Get execution details for an incomplete execution.

**Arguments**

| Argument         | Description                                                                   | Required |
| ---------------- | ----------------------------------------------------------------------------- | -------- |
| `<execution-id>` | The execution ID to retrieve. Can also be passed as `--execution-id=<value>`. | Yes      |

**Options**

| Option                      | Description                 | Required |
| --------------------------- | --------------------------- | -------- |
| `--incomplete-execution-id` | The incomplete execution ID | Yes      |

**Example**

```bash
make-cli executions get-for-incomp-exec 1356b72d781649a18692a0d4d09cd977 \
  --incomplete-execution-id=a07e16f2ad134bf49cf83a00aa95c0a5
```

***

### Incomplete executions

Manage your incomplete executions.

***

#### `make-cli incomplete-executions list`

List all incomplete executions.

**Options**

| Option          | Description                                       | Required |
| --------------- | ------------------------------------------------- | -------- |
| `--scenario-id` | The scenario ID to list incomplete executions for | Yes      |

**Example**

```bash
make-cli incomplete-executions list --scenario-id=925
```

***

#### `make-cli incomplete-executions get`

Get details of a specific incomplete execution.

**Arguments**

| Argument                    | Description                                                                                         | Required |
| --------------------------- | --------------------------------------------------------------------------------------------------- | -------- |
| `<incomplete-execution-id>` | The incomplete execution ID to retrieve. Can also be passed as `--incomplete-execution-id=<value>`. | Yes      |

**Example**

```bash
make-cli incomplete-executions get a07e16f2ad134bf49cf83a00aa95c0a5
```

***

### Scenario folders

Manage your scenario folders.

***

#### `make-cli folders list`

List folders for a team.

**Options**

| Option      | Description                     | Required |
| ----------- | ------------------------------- | -------- |
| `--team-id` | The team ID to list folders for | Yes      |

**Example**

```bash
make-cli folders list --team-id=5
```

***

#### `make-cli folders create`

Create a new folder.

**Options**

| Option      | Description                                  | Required |
| ----------- | -------------------------------------------- | -------- |
| `--team-id` | The team ID where the folder will be created | Yes      |
| `--name`    | Name of the folder                           | Yes      |

**Example**

```bash
make-cli folders create --team-id=5 --name='My Folder'
```

***

#### `make-cli folders update`

Update an existing folder.

**Arguments**

| Argument      | Description                                                           | Required |
| ------------- | --------------------------------------------------------------------- | -------- |
| `<folder-id>` | The folder ID to update. Can also be passed as `--folder-id=<value>`. | Yes      |

**Options**

| Option   | Description             | Required |
| -------- | ----------------------- | -------- |
| `--name` | New name for the folder | No       |

**Example**

```bash
make-cli folders update 1576 --name='Updated Folder'
```

***

#### `make-cli folders delete`

Delete a folder.

**Arguments**

| Argument      | Description                                                           | Required |
| ------------- | --------------------------------------------------------------------- | -------- |
| `<folder-id>` | The folder ID to delete. Can also be passed as `--folder-id=<value>`. | Yes      |

**Example**

```bash
make-cli folders delete 1576
```

***

### Custom functions

Manage your custom functions.

***

#### `make-cli functions list`

List custom functions for a team.

**Options**

| Option      | Description                       | Required |
| ----------- | --------------------------------- | -------- |
| `--team-id` | The team ID to list functions for | Yes      |

**Example**

```bash
make-cli functions list --team-id=5
```

***

#### `make-cli functions get`

Get details of a specific custom function.

**Arguments**

| Argument        | Description                                                                 | Required |
| --------------- | --------------------------------------------------------------------------- | -------- |
| `<function-id>` | The function ID to retrieve. Can also be passed as `--function-id=<value>`. | Yes      |

**Example**

```bash
make-cli functions get 2
```

***

#### `make-cli functions create`

Create a new custom function.

**Options**

| Option          | Description                                    | Required |
| --------------- | ---------------------------------------------- | -------- |
| `--team-id`     | The team ID where the function will be created | Yes      |
| `--name`        | The name of the function                       | Yes      |
| `--code`        | The function code                              | Yes      |
| `--description` | Description of the function                    | No       |

**Example**

```bash
make-cli functions create \
  --team-id=5 \
  --name=checkType \
  --code='function checkType(param) { return typeof param; }' \
  --description='Returns the data type of the argument.'
```

***

#### `make-cli functions update`

Update an existing custom function.

**Arguments**

| Argument        | Description                                                               | Required |
| --------------- | ------------------------------------------------------------------------- | -------- |
| `<function-id>` | The function ID to update. Can also be passed as `--function-id=<value>`. | Yes      |

**Options**

| Option          | Description                  | Required |
| --------------- | ---------------------------- | -------- |
| `--name`        | New name for the function    | No       |
| `--code`        | Updated function code        | No       |
| `--description` | Updated function description | No       |

**Example**

```bash
make-cli functions update 2 \
  --name=checkType \
  --code='function checkType(param) { return typeof param; }'
```

***

#### `make-cli functions delete`

Delete a custom function.

**Arguments**

| Argument        | Description                                                               | Required |
| --------------- | ------------------------------------------------------------------------- | -------- |
| `<function-id>` | The function ID to delete. Can also be passed as `--function-id=<value>`. | Yes      |

**Example**

```bash
make-cli functions delete 2
```

***

#### `make-cli functions check`

Check the syntax of a function without saving it.

**Options**

| Option      | Description                | Required |
| ----------- | -------------------------- | -------- |
| `--team-id` | The team ID                | Yes      |
| `--code`    | The function code to check | Yes      |

**Example**

```bash
make-cli functions check --team-id=5 --code='function myFn(x) { return x * 2; }'
```

***

### Webhooks

Manage your webhooks.

***

#### `make-cli hooks list`

List webhooks/mailhooks for a specific team.

**Options**

| Option      | Description                   | Required |
| ----------- | ----------------------------- | -------- |
| `--team-id` | The team ID to list hooks for | Yes      |

**Example**

```bash
make-cli hooks list --team-id=5
```

***

#### `make-cli hooks get`

Get details of a specific webhook/mailhook.

**Arguments**

| Argument    | Description                                                         | Required |
| ----------- | ------------------------------------------------------------------- | -------- |
| `<hook-id>` | The hook ID to retrieve. Can also be passed as `--hook-id=<value>`. | Yes      |

**Example**

```bash
make-cli hooks get 11
```

***

#### `make-cli hooks create`

Create a new webhook/mailhook.

**Options**

| Option        | Description                                                   | Required |
| ------------- | ------------------------------------------------------------- | -------- |
| `--team-id`   | The team ID where the hook will be created                    | Yes      |
| `--name`      | The name of the webhook                                       | Yes      |
| `--type-name` | The hook type related to the app for which it will be created | Yes      |
| `--data`      | Additional data specific to the hook type                     | No       |

**Example**

```bash
make-cli hooks create \
  --team-id=5 \
  --name='My Webhook' \
  --type-name=gateway-webhook
```

***

#### `make-cli hooks update`

Update an existing webhook/mailhook.

**Arguments**

| Argument    | Description                                                       | Required |
| ----------- | ----------------------------------------------------------------- | -------- |
| `<hook-id>` | The hook ID to update. Can also be passed as `--hook-id=<value>`. | Yes      |

**Options**

| Option   | Description                         | Required |
| -------- | ----------------------------------- | -------- |
| `--data` | New data configuration for the hook | Yes      |

**Example**

```bash
make-cli hooks update 11 --data='{"method":true,"headers":true}'
```

***

#### `make-cli hooks delete`

Delete a webhook/mailhook.

**Arguments**

| Argument    | Description                                                       | Required |
| ----------- | ----------------------------------------------------------------- | -------- |
| `<hook-id>` | The hook ID to delete. Can also be passed as `--hook-id=<value>`. | Yes      |

**Example**

```bash
make-cli hooks delete 11
```

***

### Devices

Manage your devices.

***

#### `make-cli devices list`

List devices registered in a team.

**Options**

| Option      | Description                     | Required |
| ----------- | ------------------------------- | -------- |
| `--team-id` | The team ID to list devices for | Yes      |

**Example**

```bash
make-cli devices list --team-id=5
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.make.com/make-cli/make-cli/make-cli-reference/scenarios.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
