Referencia
Integraciones
Tres paquetes sobre la misma API: un bot del Chat SDK que contesta en WhatsApp, Instagram, Messenger, SMS y Gmail con un solo adapter, nodos para n8n y un SDK de navegador para que tus clientes conecten sus canales en un popup. Son MIT y su código vive junto a la API.
Chat SDK de Vercel: @heysteff/chat-adapter#
Un solo adapter para todos los canales. Recibe los webhooks firmados, los convierte en mensajes del Chat SDK y cada thread.post() sale por el canal, número y destinatario de la conversación con el mismo POST /v1/messages.
npm install chat @heysteff/chat-adapter @chat-adapter/state-memoryimport { Chat } from 'chat';
import { createMemoryState } from '@chat-adapter/state-memory';
import { createHeysteffAdapter, threadChannel } from '@heysteff/chat-adapter';
export const bot = new Chat({
userName: 'mi-bot',
adapters: { heysteff: createHeysteffAdapter() }, // HEYSTEFF_API_KEY y HEYSTEFF_WEBHOOK_SECRET
state: createMemoryState(),
});
bot.onDirectMessage(async (thread, message) => {
await thread.post(`Te escribo por ${threadChannel(thread)}: ${message.text}`);
});// app/api/webhooks/heysteff/route.ts
import { after } from 'next/server';
import { bot } from '@/lib/bot';
export async function POST(request: Request) {
return bot.webhooks.heysteff(request, { waitUntil: (task) => after(() => task) });
}- Texto, archivos y botones: los archivos se suben con
POST /v1/media; una tarjeta conButtonsale como botones de respuesta (hasta 3) o lista (hasta 10) concontent_type: "interactive", y el botón tocado llega aonAction. - Una persona tomó la conversación: con
bot_pausedel bot no recibe los mensajes ythread.postlanzaHeysteffBotPausedErrorsin mandar nada. - Canal:
thread.channelIdesheysteff:<canal>ythreadChannel(thread)devuelvewhatsapp_cloud,instagram,facebook,smsogmail. - Historial y DM:
fetchMessagesusaGET /v1/conversations/{id}/messages;adapter.openDM("whatsapp_cloud:+56912345678")abre un thread para escribir primero.
n8n: @heysteff/n8n-nodes-heysteff#
Instálalo en Settings → Community Nodes con el nombre @heysteff/n8n-nodes-heysteff y crea la credencial heysteff API con tu API key.
- heysteff Trigger: al activar el workflow crea su webhook con
POST /v1/webhooksy los eventos que elijas (message:received,customer.channel_connected,payment.paid…), lo borra al desactivarlo y verifica la firma de cada aviso. Puede ignorar las conversaciones que tomó una persona. - heysteff: manda texto, plantillas, archivos o botones por cualquier canal; marca como leído; crea y busca contactos; crea clientes y sus links de conexión.
Links de conexión en un popup: @heysteff/connect#
Para un SaaS cuyos clientes conectan su propio canal (ver Clientes y links de conexión). connect() abre el link en un popup y resuelve con { channel_id, customer_id, channel_type }; rechaza si tu cliente cierra la ventana. Aunque lo llames dos veces, hay un solo popup.
npm install @heysteff/connectimport { connect } from '@heysteff/connect';
const { channel_id, customer_id, channel_type } = await connect({
// Tu servidor crea el link con customers.createSetupLink.
url: () => fetch('/api/connect-link', { method: 'POST' }).then((r) => r.text()),
});import { ConnectButton } from '@heysteff/connect/react';
<ConnectButton url={createLink} onSuccess={(r) => save(r.channel_id)}>
Conecta tu WhatsApp
</ConnectButton>La página del link le avisa por postMessage solo al origen de la ventana que la abrió, y el SDK acepta el aviso solo desde el origen del link. Para tu backend la fuente de verdad sigue siendo el webhook customer.channel_connected.
Paquetes y repositorios#
Todo es MIT y usa la misma API: un mismo código para WhatsApp, Instagram, Messenger, SMS y correo. Cada README trae un prompt listo para pegar en Claude Code, Cursor, Codex o ChatGPT. Los repos públicos viven en github.com/heysteff-com.
| Nombre | Para qué sirve | Instalar | Enlaces |
|---|---|---|---|
@heysteff/sdk | SDK de TypeScript: la API v1 con tipos, reintentos, webhooks y eventos en vivo. | npm install @heysteff/sdk | npm · Código |
@heysteff/cli | El comando heysteff: mensajes, conversaciones y webhooks desde la terminal. | npm install -g @heysteff/cli | npm · Código |
create-heysteff | Crea un proyecto desde una plantilla con tu key en .env.local. | npm create heysteff@latest | npm · Código |
@heysteff/chat-adapter | Un solo adapter del Chat SDK de Vercel para todos los canales. | npm install chat @heysteff/chat-adapter @chat-adapter/state-memory | npm · Código |
@heysteff/connect | Abre un link de conexión en un popup y devuelve el canal conectado. | npm install @heysteff/connect | npm · Código |
@heysteff/n8n-nodes-heysteff | Nodos de n8n: trigger con su propio webhook y envío por cualquier canal. | npm install @heysteff/n8n-nodes-heysteff | npm · GitHub |
omnichannel-inbox | Plantilla: bandeja en Next.js para WhatsApp, Instagram, Messenger, SMS y correo. | npm create heysteff@latest mi-bandeja -- --template inbox | GitHub |
ai-agent-starter | Plantilla: agente de IA que contesta con Claude y deriva a una persona. | npm create heysteff@latest mi-agente -- --template agent | GitHub |
agent-skills | Skills para integrar, automatizar y observar heysteff desde tu agente de código. | npx skills add heysteff-com/agent-skills | GitHub |
agent-plugins | Plugin de Claude Code (MCP, skills y reglas de seguridad), más Cursor y Codex. | /plugin marketplace add heysteff-com/agent-plugins | GitHub |
En n8n también puedes instalarlo desde Settings → Community Nodes. En Claude Code, después del marketplace corre /plugin install heysteff@heysteff.