> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Emailbison Get All Scheduled Emails: Inputs, Cost & CLI

> Retrieves a collection of scheduled emails associated with a lead. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=emailbison_get_all_scheduled_emails:{"lead_id":"{{lead_id}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name              | Type      | Required | Default | Description                 |
| ----------------- | --------- | -------- | ------- | --------------------------- |
| `payload.lead_id` | `integer` | Yes      |         | the ID or email of the lead |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Retrieves a collection of scheduled emails associated with a lead. These scheduled emails can have multiple statuses including: `scheduled`, `sending paused`, `stopped`, `bounced`, `unsubscribed`, `replied`",
    "properties": {
      "lead_id": {
        "type": "integer",
        "description": "the ID or email of the lead"
      }
    },
    "required": [
      "lead_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "campaign_id": {
                  "type": "integer"
                },
                "lead_id": {
                  "type": "integer"
                },
                "sender_email_id": {
                  "type": "integer"
                },
                "sequence_step_id": {
                  "type": "integer"
                },
                "thread_reply": {
                  "type": "boolean"
                },
                "email_subject": {
                  "type": "string"
                },
                "email_body": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "scheduled_date": {
                  "type": "string"
                },
                "scheduled_date_local": {
                  "type": "string"
                },
                "sent_at": {
                  "type": "string"
                },
                "opens": {
                  "type": "integer"
                },
                "clicks": {
                  "type": "integer"
                },
                "replies": {
                  "type": "integer"
                },
                "interested": {
                  "type": "boolean"
                },
                "unique_replies": {
                  "type": "integer"
                },
                "unique_opens": {
                  "type": "integer"
                },
                "lead": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "uuid": {
                      "type": "string"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "last_name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "company": {
                      "type": "string"
                    },
                    "notes": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "custom_variables": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "lead_campaign_data": {
                      "type": "array"
                    },
                    "overall_stats": {
                      "type": "object",
                      "properties": {
                        "emails_sent": {
                          "type": "integer"
                        },
                        "opens": {
                          "type": "integer"
                        },
                        "replies": {
                          "type": "integer"
                        },
                        "unique_replies": {
                          "type": "integer"
                        },
                        "unique_opens": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "sender_email": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "email_signature": {
                      "type": "string"
                    },
                    "imap_server": {
                      "type": "string"
                    },
                    "imap_port": {
                      "type": "integer"
                    },
                    "smtp_server": {
                      "type": "string"
                    },
                    "smtp_port": {
                      "type": "integer"
                    },
                    "daily_limit": {
                      "type": "integer"
                    },
                    "type": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "warmup_enabled": {
                      "type": "boolean"
                    },
                    "emails_sent_count": {
                      "type": "integer"
                    },
                    "total_replied_count": {
                      "type": "integer"
                    },
                    "total_opened_count": {
                      "type": "integer"
                    },
                    "unsubscribed_count": {
                      "type": "integer"
                    },
                    "bounced_count": {
                      "type": "integer"
                    },
                    "unique_replied_count": {
                      "type": "integer"
                    },
                    "unique_opened_count": {
                      "type": "integer"
                    },
                    "total_leads_contacted_count": {
                      "type": "integer"
                    },
                    "interested_leads_count": {
                      "type": "integer"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "default": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "first": {
                "type": "string"
              },
              "last": {
                "type": "string"
              },
              "prev": {
                "type": "string"
              },
              "next": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "meta": {
            "type": "object",
            "properties": {
              "current_page": {
                "type": "integer"
              },
              "from": {
                "type": "integer"
              },
              "last_page": {
                "type": "integer"
              },
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "active": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "path": {
                "type": "string"
              },
              "per_page": {
                "type": "integer"
              },
              "to": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute emailbison_get_all_scheduled_emails --payload '{
  "lead_id": "integer"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
