Channel: Zernio
Zernio is a unified social-media DM platform that covers Instagram, Facebook, X (Twitter), and others through a single API. Connect once and your agent handles DMs across all linked social accounts.
Before you start
- Sign up at zernio.com and enable the Inbox addon on your account.
- Connect your social accounts (Instagram, Facebook page, X, etc.) in the Zernio dashboard.
- Go to Settings → API and create an API key.
- In the Zernio dashboard configure a webhook, subscribe to
message.receivedandcomment.received, and set a webhook secret.
Example prompts
Connect the social-agent to Zernio.
Add Instagram and Facebook DMs to my marketing agent via Zernio.
What happens
The widget asks for credentials:
name type SOCIAL_AGENT_ZERNIO_API_KEYpassword SOCIAL_AGENT_ZERNIO_WEBHOOK_SECRETpassword Shmastra wires the adapter:
tsimport { Agent } from '@mastra/core/agent' import { createZernioAdapter } from '@zernio/chat-sdk-adapter' import { createAgentChannels } from '../shmastra' export const socialAgent = new Agent({ id: 'social-agent', channels: createAgentChannels({ adapters: { zernio: createZernioAdapter(), }, }), })The widget prints the webhook URL to paste into the Zernio dashboard:
{PUBLIC_URL}/api/agents/social-agent/channels/zernio/webhookSend a DM to any connected social account — the agent replies.
Tips
- Multiple platforms, one agent — all social DMs from all connected accounts arrive in the same agent thread. Use
message.platformin your agent's context if you need to branch on which network sent the message. - Comments vs DMs — subscribe to
comment.receivedif you also want the agent to reply to comments on posts, not just direct messages.