> ## 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.

# Salesloft: Email Templates Index

> List email templates. Salesloft Email Templates Index reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

List email templates.

<Info>
  Tool ID: `salesloft_email_templates_index`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'salesloft_email_templates_index',
  {
    "ids": [
      123
    ],
    "updated_at": {
      "gt": "example",
      "gte": "example",
      "lt": "example"
    },
    "linked_to_team_template": true
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute salesloft_email_templates_index --input '{
  "ids": [
    123
  ],
  "updated_at": {
    "gt": "example",
    "gte": "example",
    "lt": "example"
  },
  "linked_to_team_template": true
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": [
    {
      "id": 123,
      "title": "VP of Engineering",
      "subject": "Introduction"
    }
  ]
}
```

Use `deepline tools get salesloft_email_templates_index --json` for the latest machine-readable contract.

## Input reference

Fetches multiple email template records. The records can be filtered, paged, and sorted according to the respective parameters.

| Name                                 | Type      | Required | Default | Details                                                                                                                                                                         |
| ------------------------------------ | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.ids`                        | `array`   | No       | —       | IDs of email templates to fetch. If a record can't be found, that record won't be returned and your request will be successful                                                  |
| `payload.updated_at`                 | `object`  | No       | —       | Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.                                          |
| `payload.linked_to_team_template`    | `boolean` | No       | —       | Filters email templates by whether they are linked to a team template or not                                                                                                    |
| `payload.search`                     | `string`  | No       | —       | Filters email templates by title or subject                                                                                                                                     |
| `payload.tag_ids`                    | `array`   | No       | —       | Filters email templates by tags applied to the template by tag ID, not to exceed 100 IDs                                                                                        |
| `payload.tag`                        | `array`   | No       | —       | Filters email templates by tags applied to the template, not to exceed 100 tags                                                                                                 |
| `payload.filter_by_owner`            | `boolean` | No       | —       | Filters email templates by current authenticated user                                                                                                                           |
| `payload.group_id`                   | `array`   | No       | —       | Filters email templates by groups applied to the template by group ID. Not to exceed 500 IDs. Returns templates that are assigned to any of the group ids.                      |
| `payload.include_cadence_templates`  | `boolean` | No       | —       | Filters email templates based on whether or not the template has been used on a cadence                                                                                         |
| `payload.include_archived_templates` | `boolean` | No       | —       | Filters email templates to include archived templates or not                                                                                                                    |
| `payload.cadence_id`                 | `array`   | No       | —       | Filters email templates to those belonging to the cadence. Not to exceed 100 IDs. If a record can't be found, that record won't be returned and your request will be successful |
| `payload.sort_by`                    | `string`  | No       | —       | Key to sort on, must be one of: created\_at, updated\_at, last\_used\_at. Defaults to updated\_at                                                                               |
| `payload.sort_direction`             | `string`  | No       | —       | Direction to sort in, must be one of: ASC, DESC. Defaults to DESC                                                                                                               |
| `payload.per_page`                   | `integer` | No       | —       | How many records to show per page in the range \[1, 100]. Defaults to 25                                                                                                        |
| `payload.page`                       | `integer` | No       | —       | The current page to fetch results from. Defaults to 1                                                                                                                           |
| `payload.include_paging_counts`      | `boolean` | No       | —       | Whether to include total\_pages and total\_count in the metadata. Defaults to false                                                                                             |
| `payload.limit_paging_counts`        | `boolean` | No       | —       | Specifies whether the max limit of 10k records should be applied to pagination counts. Affects the total\_count and total\_pages data                                           |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Fetches multiple email template records. The records can be filtered, paged, and sorted according to the respective parameters.",
    "properties": {
      "ids": {
        "type": "array",
        "description": "IDs of email templates to fetch. If a record can't be found, that record won't be returned and your request will be successful",
        "items": {
          "type": "integer"
        }
      },
      "updated_at": {
        "type": "object",
        "description": "Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision.",
        "properties": {
          "gt": {
            "type": "string",
            "description": "Returns all matching records that are greater than the provided iso8601 timestamp. The comparison is done using microsecond precision."
          },
          "gte": {
            "type": "string",
            "description": "Returns all matching records that are greater than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision."
          },
          "lt": {
            "type": "string",
            "description": "Returns all matching records that are less than the provided iso8601 timestamp. The comparison is done using microsecond precision."
          },
          "lte": {
            "type": "string",
            "description": "Returns all matching records that are less than or equal to the provided iso8601 timestamp. The comparison is done using microsecond precision."
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "linked_to_team_template": {
        "type": "boolean",
        "description": "Filters email templates by whether they are linked to a team template or not"
      },
      "search": {
        "type": "string",
        "description": "Filters email templates by title or subject"
      },
      "tag_ids": {
        "type": "array",
        "description": "Filters email templates by tags applied to the template by tag ID, not to exceed 100 IDs",
        "items": {
          "type": "integer"
        }
      },
      "tag": {
        "type": "array",
        "description": "Filters email templates by tags applied to the template, not to exceed 100 tags",
        "items": {
          "type": "string"
        }
      },
      "filter_by_owner": {
        "type": "boolean",
        "description": "Filters email templates by current authenticated user"
      },
      "group_id": {
        "type": "array",
        "description": "Filters email templates by groups applied to the template by group ID. Not to exceed 500 IDs. Returns templates that are assigned to any of the group ids.",
        "items": {
          "type": "integer"
        }
      },
      "include_cadence_templates": {
        "type": "boolean",
        "description": "Filters email templates based on whether or not the template has been used on a cadence"
      },
      "include_archived_templates": {
        "type": "boolean",
        "description": "Filters email templates to include archived templates or not"
      },
      "cadence_id": {
        "type": "array",
        "description": "Filters email templates to those belonging to the cadence. Not to exceed 100 IDs. If a record can't be found, that record won't be returned and your request will be successful",
        "items": {
          "type": "integer"
        }
      },
      "sort_by": {
        "type": "string",
        "description": "Key to sort on, must be one of: created_at, updated_at, last_used_at. Defaults to updated_at"
      },
      "sort_direction": {
        "type": "string",
        "description": "Direction to sort in, must be one of: ASC, DESC. Defaults to DESC"
      },
      "per_page": {
        "type": "integer",
        "description": "How many records to show per page in the range [1, 100]. Defaults to 25"
      },
      "page": {
        "type": "integer",
        "description": "The current page to fetch results from. Defaults to 1"
      },
      "include_paging_counts": {
        "type": "boolean",
        "description": "Whether to include total_pages and total_count in the metadata. Defaults to false"
      },
      "limit_paging_counts": {
        "type": "boolean",
        "description": "Specifies whether the max limit of 10k records should be applied to pagination counts. Affects the total_count and total_pages data"
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                   | Type      | Required | Default | Details                                                                                                                                                                                                                                                                            |
| -------------------------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result.data`                          | `array`   | Yes      | —       | Provider response payload.                                                                                                                                                                                                                                                         |
| `result.data[].id`                     | `integer` | No       | —       | ID of email template                                                                                                                                                                                                                                                               |
| `result.data[].title`                  | `string`  | No       | —       | Title of the email template                                                                                                                                                                                                                                                        |
| `result.data[].subject`                | `string`  | No       | —       | Subject of the email template                                                                                                                                                                                                                                                      |
| `result.data[].body`                   | `string`  | No       | —       | Sanitized body of the email template without email signature                                                                                                                                                                                                                       |
| `result.data[].body_preview`           | `string`  | No       | —       | A plain text version of the first 100 characters of the body of the email template                                                                                                                                                                                                 |
| `result.data[].created_at`             | `string`  | No       | —       | Datetime of when the email template was created Format: `date-time`.                                                                                                                                                                                                               |
| `result.data[].updated_at`             | `string`  | No       | —       | Datetime of when the email template was last updated Format: `date-time`.                                                                                                                                                                                                          |
| `result.data[].last_used_at`           | `string`  | No       | —       | Datetime of when the email template was last used Format: `date-time`.                                                                                                                                                                                                             |
| `result.data[].archived_at`            | `string`  | No       | —       | Datetime of when the email template was archived, if archived Format: `date-time`.                                                                                                                                                                                                 |
| `result.data[].shared`                 | `boolean` | No       | —       | Whether this email template is visible to team members (shared)                                                                                                                                                                                                                    |
| `result.data[].open_tracking_enabled`  | `boolean` | No       | —       | Whether open tracking is enabled for this email template                                                                                                                                                                                                                           |
| `result.data[].click_tracking_enabled` | `boolean` | No       | —       | Whether click tracking is enabled for this email template                                                                                                                                                                                                                          |
| `result.data[].cadence_template`       | `boolean` | No       | —       | Whether this email template is only used on a cadence step. These templates are not visible in the SalesLoft application template list. If false, this email template is visible in the SalesLoft application, and may be used when composing an email or creating a cadence step. |
| `result.data[].counts`                 | `object`  | No       | —       | —                                                                                                                                                                                                                                                                                  |
| `result.data[].counts.sent_emails`     | `integer` | No       | —       | The number of times the email template was sent out                                                                                                                                                                                                                                |
| `result.data[].counts.views`           | `integer` | No       | —       | The number of times the email template was opened                                                                                                                                                                                                                                  |
| `result.data[].counts.clicks`          | `integer` | No       | —       | The number of times links in the email template were clicked                                                                                                                                                                                                                       |
| `result.data[].counts.replies`         | `integer` | No       | —       | The number of replies the email template received                                                                                                                                                                                                                                  |
| `result.data[].counts.bounces`         | `integer` | No       | —       | The number of bounces the email template received                                                                                                                                                                                                                                  |
| `result.data[].template_owner`         | `object`  | No       | —       | User that owns this email template                                                                                                                                                                                                                                                 |
| `result.data[].template_owner.id`      | `integer` | No       | —       | —                                                                                                                                                                                                                                                                                  |
| `result.data[].template_owner._href`   | `string`  | No       | —       | —                                                                                                                                                                                                                                                                                  |
| `result.data[].team_template`          | `object`  | No       | —       | Associated team template, if any                                                                                                                                                                                                                                                   |
| `result.data[].team_template.id`       | `string`  | No       | —       | —                                                                                                                                                                                                                                                                                  |
| `result.data[].team_template._href`    | `string`  | No       | —       | —                                                                                                                                                                                                                                                                                  |
| `result.data[]._links`                 | `record`  | No       | —       | Links to attachments and tags resources for this email template.                                                                                                                                                                                                                   |
| `result.data[].tags`                   | `array`   | No       | —       | All tags applied to this email template                                                                                                                                                                                                                                            |
| `result.data[].groups`                 | `array`   | No       | —       | Groups to which this template is assigned, if any                                                                                                                                                                                                                                  |
| `result.data[].groups[].id`            | `integer` | No       | —       | —                                                                                                                                                                                                                                                                                  |
| `result.data[].groups[]._href`         | `string`  | No       | —       | —                                                                                                                                                                                                                                                                                  |
| `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": "array",
        "description": "Provider response payload.",
        "items": {
          "type": "object",
          "description": "Provider response payload.",
          "properties": {
            "id": {
              "type": "integer",
              "description": "ID of email template"
            },
            "title": {
              "type": "string",
              "description": "Title of the email template"
            },
            "subject": {
              "type": "string",
              "description": "Subject of the email template"
            },
            "body": {
              "type": "string",
              "description": "Sanitized body of the email template without email signature"
            },
            "body_preview": {
              "type": "string",
              "description": "A plain text version of the first 100 characters of the body of the email template"
            },
            "created_at": {
              "type": "string",
              "description": "Datetime of when the email template was created",
              "format": "date-time"
            },
            "updated_at": {
              "type": "string",
              "description": "Datetime of when the email template was last updated",
              "format": "date-time"
            },
            "last_used_at": {
              "type": "string",
              "description": "Datetime of when the email template was last used",
              "format": "date-time"
            },
            "archived_at": {
              "type": "string",
              "description": "Datetime of when the email template was archived, if archived",
              "format": "date-time"
            },
            "shared": {
              "type": "boolean",
              "description": "Whether this email template is visible to team members (shared)"
            },
            "open_tracking_enabled": {
              "type": "boolean",
              "description": "Whether open tracking is enabled for this email template"
            },
            "click_tracking_enabled": {
              "type": "boolean",
              "description": "Whether click tracking is enabled for this email template"
            },
            "cadence_template": {
              "type": "boolean",
              "description": "Whether this email template is only used on a cadence step. These templates are not visible in the SalesLoft application template list. If false, this email template is visible in the SalesLoft application, and may be used when composing an email or creating a cadence step."
            },
            "counts": {
              "type": "object",
              "properties": {
                "sent_emails": {
                  "type": "integer",
                  "description": "The number of times the email template was sent out"
                },
                "views": {
                  "type": "integer",
                  "description": "The number of times the email template was opened"
                },
                "clicks": {
                  "type": "integer",
                  "description": "The number of times links in the email template were clicked"
                },
                "replies": {
                  "type": "integer",
                  "description": "The number of replies the email template received"
                },
                "bounces": {
                  "type": "integer",
                  "description": "The number of bounces the email template received"
                }
              },
              "additionalProperties": false
            },
            "template_owner": {
              "type": "object",
              "description": "User that owns this email template",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "_href": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "team_template": {
              "type": "object",
              "description": "Associated team template, if any",
              "properties": {
                "id": {
                  "type": "string"
                },
                "_href": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "_links": {
              "type": "object",
              "description": "Links to attachments and tags resources for this email template."
            },
            "tags": {
              "type": "array",
              "description": "All tags applied to this email template",
              "items": {
                "type": "string"
              }
            },
            "groups": {
              "type": "array",
              "description": "Groups to which this template is assigned, if any",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "_href": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        }
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

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

## Related documentation

* [Salesloft provider guide](/docs/providers/salesloft/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
