unipile-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and authenticate Unipile webhooks (unified messaging, email and LinkedIn API). Use when building a Unipile webhook receiver, securing it with a shared…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Unipile Webhooks
Unipile is a unified API for messaging (LinkedIn, WhatsApp, Instagram, Telegram),
email (Google, Microsoft, IMAP) and calendars. You create a webhook with
POST /api/v1/webhooks (or in the Unipile dashboard), choose a source, and
Unipile sends an HTTP POST to your request_url when something happens.
Things that differ from most providers:
- There is no signature. Unipile doesn't sign the body. No HMAC, no
timestamp header. Instead you add your own secret to the webhook's
headersarray and Unipile sends it on every delivery. - Payloads differ by
source. Messaging, email, email tracking and users webhooks send a flat object with aneventfield. Account status webhooks send{"AccountStatus": {...}}with noeventfield. - No JSON content type by default for webhooks created through the API.
Add
{"key": "Content-Type", "value": "application/json"}toheaders, and parse the raw body yourself either way.
When to Use This Skill
- How do I receive Unipile webhooks?
- How do I verify Unipile webhook signatures? (You can't. Send a shared secret in a header instead.)
- How do I create a Unipile webhook with the API and add an
Unipile-Authheader? - How do I handle
message_received,message_readandmail_received? - How do I detect an account that needs reconnecting (
CREDENTIALS)? - Why does my Unipile webhook arrive more than once?
Verification (core): a shared secret header
Create the webhook with a secret in headers:
curl --request POST --url https://{YOUR_DSN}/api/v1/webhooks \
--header 'X-API-KEY: XXXXXXXX' --header 'content-type: application/json' \
--data '{
"request_url": "https://example.com/webhooks/unipile",
"source": "messaging",
"headers": [
{ "key": "Content-Type", "value": "application/json" },
{ "key": "Unipile-Auth", "value": "<secret from openssl rand -hex 32>" }
]
}'
Then check the header in constant time before you parse the body:
const crypto = require('crypto');
// NOT a Unipile signature. This is a secret YOU put in the webhook's headers array.
function verifyUnipileSecret(headerValue) {
const expected = process.env.UNIPILE_WEBHOOK_SECRET;
if (!expected) throw new Error('UNIPILE_WEBHOOK_SECRET is not set'); // fail closed
if (typeof headerValue !== 'string') return false;
const a = Buffer.from(headerValue);
const b = Buffer.from(expected);
// Length check first: timingSafeEqual throws on a length mismatch.
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
// Express: verifyUnipileSecret(req.get('Unipile-Auth'))
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Return 401 for a missing or wrong secret and 500 when the secret isn't
configured, so the endpoint never accepts everything by accident. The header name
(Unipile-Auth) is your choice, and header names are case-insensitive. See
references/verification.md.
Sources and Events
source |
Events | Payload shape |
|---|---|---|
messaging |
message_received (default), message_read, message_reaction, message_edited, message_deleted, message_delivered |
Flat: account_id, account_type, event, chat_id, message_id, message, sender, attendees, attachments |
email |
mail_received (default), mail_sent, mail_moved |
Flat: email_id, account_id, event, from_attendee, to_attendees, subject, body, origin |
email_tracking |
mail_opened, mail_link_clicked |
Flat: event, event_id, tracking_id, email_id, account_id, url |
users |
new_relation |
Flat, with event |
calendar_event |
calendar_event_created (default), calendar_event_updated, calendar_event_deleted |
Flat: event, webhook_name, account_id, calendar_id, id |
account_status |
message is CREATION_SUCCESS, RECONNECTED, SYNC_SUCCESS, OK, CREDENTIALS, ERROR, STOPPED, DELETED, ... |
{"AccountStatus": {"account_id", "account_type", "message"}} |
Notes:
- Sent messages are delivered as
message_received. Compareaccount_info.user_idwithsender.attendee_provider_idto tell your own from others. The email webhook covers sent email too (mail_sent), and itsoriginisunipileorexternal. - Account status
messagevalues includeOK,CREDENTIALS,ERROR/STOPPED,CONNECTING,DELETED,CREATION_SUCCESS,RECONNECTEDandSYNC_SUCCESS. When the status isn'tOK, Unipile stops sending new-message webhooks for that account, so surfaceCREDENTIALSto the user and start a reconnect. - Dispatch on
AccountStatusfirst, then onevent. Acknowledge events you don't handle with200.
Delivery, Retries and Idempotency
- Reply with a
200in under 30 seconds. Otherwise Unipile makes **five retry atte
Установить unipile-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл unipile-webhooks?
Receive and authenticate Unipile webhooks (unified messaging, email and LinkedIn API). Use when building a Unipile webhook receiver, securing it with a shared secret header such as Unipile-Auth (Unipile has no HMAC signature), creating webhooks with POST /api/v1/webhooks, handling message_received, message_read, mail_received and account status (OK, CREDENTIALS) payloads, or debugging Unipile webhook retries and missing JSON content types.
Как установить скилл unipile-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл unipile-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic