К основному содержанию
скилл CX Codex GP ChatGPT официальный · OpenAI

twilio-email-send — скилл для Codex: что делает и как установить

Отправляет одиночные и массовые письма через нативный API Twilio Email с шаблонами Liquid. Понадобится при работе с учётными данными Twilio вместо SendGrid.

Установить в Codex · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add openai/plugins --skill twilio-email-send -a codex
Открыть на GitHub

Что делает twilio-email-send

Скилл подключает агента к нативному API Twilio Email (https://comms.twilio.com/v1/Emails). Он отправляет одиночные сообщения и пачки до 10 000 адресатов за один запрос. Для разметки тем и текста писем используется синтаксис Liquid.

Эндпоинт работает асинхронно. При вызове сервис возвращает код 202 Accepted, после чего агент отслеживает доставку опросом адреса из поля operationLocation. Перед любой отправкой агент обязан запросить подтверждение пользователя.

Для авторизации нужны Account SID и Auth Token либо API Key SID с секретом. Ключи SendGrid с префиксом SG. здесь не работают: с ними запрос завершится ошибкой. Адрес отправителя обязан принадлежать подтверждённому домену Verified Sender в консоли Twilio, а общий объём письма со вложениями ограничен 10 МБ.

Какие задачи решает

  • отправить транзакционные или массовые письма до 10 000 адресатов за вызов
  • персонализировать тему и тело рассылки с помощью синтаксиса Liquid
  • отслеживать статус доставки через опрос operationLocation
  • отправлять почту по базовым ключам Twilio без создания аккаунта SendGrid

Примеры запросов агенту

  • Отправь транзакционное письмо с темой "Order update" на [email protected] через Twilio Email
  • Сделай рассылку по списку клиентов с переменными firstName и orderId по шаблону Liquid
  • Проверь статус партии писем через опрос полученного operationLocation

Как установить twilio-email-send

1Через Skills CLI (Vercel)

npx skills add openai/plugins --skill twilio-email-send -a codex

2Вручную: положить файлы

.agents/skills/twilio-email-send/SKILL.md

Для всех проектов — ~/.agents/skills/

По шагам, с командами для каждой платформы: Скиллы Codex: как установить, где лежат и как вызвать

Вопросы о twilio-email-send

Как установить twilio-email-send в Codex?

Выполните команду npx skills add openai/plugins --skill twilio-email-send -a codex. Скилл запишется в .agents/skills/twilio-email-send/SKILL.md.

Чем этот скилл отличается от twilio-sendgrid-email-send?

Twilio Email использует стандартные ключи Twilio, синтаксис Liquid и поддерживает до 10 000 получателей на запрос. SendGrid использует отдельные ключи с префиксом SG. и разметку Handlebars.

Что нужно настроить перед первой отправкой?

Нужны ключи Twilio и домен Verified Sender, настроенный в консоли Twilio. Домен в адресе from должен строго совпадать с подтверждённым доменом.

Исходный текст

SKILL.md · MIT
---
name: twilio-email-send
description: >
  Use when the caller has Twilio credentials (Account SID + Auth Token or
  API Key SID + Secret) and needs to send email via comms.twilio.com/v1/Emails.
  This is Twilio-native email — NOT SendGrid. Do NOT use if the caller has a
  SendGrid API key (SG.-prefix) — use twilio-sendgrid-email-send instead.
  Covers single sends, batch sends up to 10,000 recipients, Liquid
  personalization, operation tracking, and error handling.
---

## Overview

> **Agent safety:** Always confirm recipients, subject, and content with the user before sending. Email is irreversible once delivered. Never send email autonomously without explicit user approval — especially for batch sends to multiple recipients.

**Twilio Email is a separate product from SendGrid.** Both send email, but they use different APIs, credentials, templating languages, and endpoints. If you have a SendGrid API key (`SG.`-prefix), use `twilio-sendgrid-email-send` instead.

| | Twilio Email (this skill) | SendGrid |
|---|---|---|
| **Base URL** | `https://comms.twilio.com/v1/emails` | `https://api.sendgrid.com/v3/mail/send` |
| **Auth** | Twilio Account SID + Auth Token (or API Key SID + Secret) | SendGrid API key (`SG.`-prefix) |
| **Templating** | Liquid (`{{variable}}`) | Handlebars (`{{variable}}`) |
| **Max recipients/request** | 10,000 | 1,000 |
| **Max message size** | 10MB (including attachments) | 30MB |
| **Status tracking** | Operation resource (poll `operationLocation`) | Event Webhooks (async POST) |
| **Console** | console.twilio.com | app.sendgrid.com |

---

## Prerequisites

- A Twilio account — see `twilio-account-setup` for signup and credentials
- A **Verified Sender**: an approved domain identity configured in the Twilio console that must match the `from` address domain
- Compliance with regional anti-spam regulations (CAN-SPAM, GDPR)

For a complete setup guide, see the Email Onboarding guide in the Twilio console.

---

## Authentication

The API uses **Basic Authentication** with either:
- Account SID + Auth Token
- API Key SID + API Key Secret

These are standard Twilio credentials — the same ones used for SMS, Voice, and other Twilio APIs.

---

## Send a Simple Email

`POST https://comms.twilio.com/v1/Emails`

The endpoint is **asynchronous** — it returns `202 Accepted` with an `operationId`, not a delivery confirmation.

```bash
curl -X POST "https://comms.twilio.com/v1/Emails" \
  --header "Content-Type: application/json" \
  --data '{
    "from": {
      "address": "[email protected]",
      "name": "Support Team"
    },
    "to": [
      {
        "address": "[email protected]",
        "name": "John Doe"
      }
    ],
    "content": {
      "subject": "Your subject line",
      "html": "<p>Your message content in HTML format.</p>",
      "text": "Your message content in plain text."
    }
  }' \
  -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

Response (`202 Accepted`):
```json
{
  "operationId": "...",
  "operationLocation": "https://comms.twilio.com/v1/Emails/Operations/..."
}
```

Poll `operationLocation` to track delivery status.

---

## Batch Sending

Send the same message to multiple recipients in a single request by adding entries to the `to` array. Maximum **10,000 recipients** per request.

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Support Team"
  },
  "to": [
    {
      "address": "[email protected]",
      "name": "John Doe"
    },
    {
      "address": "[email protected]",
      "name": "Jane Smith"
    }
  ],
  "content": {
    "subject": "Your subject line",
    "html": "<p>Your message content in HTML format.</p>",
    "text": "Your message content in plain text."
  }
}
```

---

## Liquid Personalization

Use Liquid templating in the `content.subject`, `content.html`, and `content.text` fields. For each variable referenced (e.g. `{{firstName}}`), provide a matching key in the `variables` object for every recipient in the `to` array.

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Support Team"
  },
  "to": [
    {
      "address": "[email protected]",
      "name": "Alice",
      "variables": {"firstName": "Alice", "orderId": "123"}
    },
    {
      "address": "[email protected]",
      "name": "Bob",
      "variables": {"firstName": "Bob", "orderId": "456"}
    }
  ],
  "content": {
    "subject": "Hi {{firstName}}, your order update",
    "html": "<p>Hi {{firstName}}, order #{{orderId}} has shipped.</p>",
    "text": "Hi {{firstName}}, order #{{orderId}} has shipped."
  }
}
```

Ensure every recipient has all referenced variables defined.

---

## Operation Tracking

After submitting a send, use the Operation resource to monitor batch status.

1. Submit email via `POST /v1/emails` — response includes `operationId` and `operationLocation`
2. Poll status via `GET` to the `operationLocation` URI
3. The operation tracks progress for the entire batch

This is especially important for large recipient lists where processing is not instantaneous.

---

## Error Codes

| Status Code | Description | Action |
|-------------|-------------|--------|
| **202** | Accepted | Request accepted, Operation created. Poll `operationLocation` for status. |
| **400** | Bad Request | Malformed or ambiguous request content. Check JSON payload. |
| **401** | Unauthorized | Verify Account SID and Auth Token / API Key are correct. |
| **429** | Too Many Requests | Rate limited. Back off and retry. |
| **500** | Internal Server Error | Twilio server-side issue. Retry with backoff. |
| **503** | Service Unavailable | Temporarily unavailable. Retry after a short delay. |

Validation errors return as many issues as possible in a single response to help debug quickly.

---

## CANNOT

- **Cannot use SendGrid API keys** — Twilio Email uses Twilio Account SID + Auth Token or API Key SID + Secret. `SG.`-prefix keys do not work. Use `twilio-sendgrid-email-send` for SendGrid.
- **Cannot send more than 10,000 recipients per request** — Split into multiple requests for larger lists.
- **Cannot exceed 10MB per message** — Total size including attachments must be under 10MB (smaller than SendGrid's 30MB limit).
- **Cannot use Unicode in the `from` field** — Unicode encoding is not supported for sender addresses.
- **Cannot use Handlebars templating** — Twilio Email uses Liquid, not Handlebars. If you see `{{#if}}` or `{{#each}}`, that's Handlebars/SendGrid syntax.
- **Cannot get synchronous delivery confirmation** — The API is async. `202 Accepted` means queued, not delivered. Poll the Operation resource for status.
- **Tags total length cannot exceed 10,000 bytes** — Combined length of all tags on a request is limited.

---

## Next Steps

- **Account setup and credentials:** `twilio-account-setup`
- **SendGrid email (separate product):** `twilio-sendgrid-email-send`
- **SMS sending:** `twilio-sms-send-message`

© Twilio · MIT · openai/plugins

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →
mcp-builder официальный anthropics Скилл проводит через создание MCP-сервера на TypeScript или Python: от изучения протокола до тестов и оценки качества. 130 949установок claude-api официальный anthropics Справочник по Anthropic SDK и API Claude для генерации кода без устаревших параметров и выдуманных методов. 74 198установок lark-im larksuite Скилл подключает Lark IM к агенту: он отправляет сообщения, ищет историю, управляет чатами и файлами. Подойдёт для задач вокруг командных коммуникаций. CX Codex +1 472 900установок lark-event larksuite Слушает события Lark/Feishu и отдаёт их потоком NDJSON. Подходит для ботов, обработчиков сообщений и долгих подписчиков. CX Codex +1 466 800установок caveman-discover JuliusBrussee Находит точки вызова LLM в репозитории и размечает их воркфлоу для Caveman Cloud, чтобы расходы на токены не сливались в одну общую кучу. CX Codex +1 104 400установок migration JuliusBrussee Скилл задаёт правила безопасных миграций схем, данных и API с обязательным откатом. Пригодится при изменениях, где нельзя терять данные или ломать совместимость. CX Codex +1 103 900установок

Из того же набора593

Весь набор →
twilio-lookup-phone-intelligence Скилл для Codex и ChatGPT, который проверяет телефонные номера через Twilio Lookup v2 и оценивает риск мошенничества до отправки SMS или звонка. CX Codex GP ChatGPT ★ 7 604звёзд репо twilio-identity-verification-advisor Помогает спроектировать аутентификацию, защиту от мошенничества и 2FA на базе Twilio Verify и Lookup. Скилл задаёт нужные вопросы и подбирает каналы доставки кодов. CX Codex GP ChatGPT ★ 7 604звёзд репо twilio-iam-auth-setup Скилл для Codex и ChatGPT, который помогает настроить доступы Twilio: Auth Token, API-ключи и Access Tokens для клиентских SDK. Пригодится до первого вызова Twilio API. CX Codex GP ChatGPT ★ 7 604звёзд репо twilio-enterprise-knowledge Скилл учит агента заводить Knowledge Base в Twilio и подключать к ней документы, сайты и текст, чтобы ответы опирались на ваши материалы. CX Codex GP ChatGPT ★ 7 604звёзд репо twilio-email-deliverability-advisor Скилл разбирает проблемы доставки через Twilio Email API и предлагает действия по диагностике. Он пригодится, если письма попадают в спам или растёт число отказов. CX Codex GP ChatGPT ★ 7 604звёзд репо twilio-debugging-observability Разбирает, почему не доходят SMS и падают звонки, и помогает настроить мониторинг Twilio в продакшене. CX Codex GP ChatGPT ★ 7 604звёзд репо twilio-customer-support-architect Проектирует архитектуру службы поддержки на базе сервисов Twilio. Помогает выбрать между Twilio Studio и Flex под ваши каналы и объём звонков. CX Codex GP ChatGPT ★ 7 604звёзд репо twilio-customer-memory Сохраняет и возвращает контекст о клиентах через Twilio Conversation Memory. Нужен агентам, которым требуется помнить прошлые обращения между сессиями и каналами. CX Codex GP ChatGPT ★ 7 604звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой