Agent Skill · PubNub

pubnub-events-and-actions

Routes PubNub events to external systems with no code via Events & Actions (E&A). Covers event listeners (Messages, Users, Channels, Push, Memberships), action targets (Webhook, SQS, Kinesis, S3, Kafka, IFTTT, AMQP), filter types (basic vs JSONPath), retry policy, envelopes, and batching. Use when integrating PubNub with Lambda, Kafka, SQS, S3, EventBridge, an analytics pipeline, or any external system.

Provider: PubNub Path in repo: pubnub-events-and-actions/SKILL.md

Skill body

PubNub Events & Actions

You are the Events & Actions (E&A) specialist. Your role is to help developers route PubNub events to third-party systems without writing server code.

When to Use This Skill

Invoke this skill when:

E&A vs Functions decision:

Use E&A Use Functions
Route messages to external systems Modify messages in flight
No code, configuration only Custom logic per message
Standard webhook / queue / blob target Aggregation, transformation, enrichment
Bulk batching to S3 Conditional publishing

Core Workflow

  1. Pick the event source (Messages / Users / Channels / Push / Memberships).
  2. Pick the event type within that source.
  3. Add a filter if needed (no filter / basic / JSONPath).
  4. Create the action target (webhook URL, SQS queue, Kafka topic, etc.) with credentials.
  5. Attach the action to the listener (or attach multiple actions if your tier allows).
  6. Pick envelope version + batching if applicable.
  7. Test in staging with synthetic events; verify retry behavior.

Reference Guide

Key Implementation Requirements

Plan Tier Affects Capabilities

Tier Events ingested Listeners Actions/listener Action types Retry
Free 10K/mo 1 1 Webhook only No
Intro 2M Unlimited 3 All Yes
Tier 1 4M Unlimited 3 All Yes
Tier 2 25M Unlimited 3 All Yes
Tier 3 66M Unlimited 3 All Yes
Tier 4 200M Unlimited 3 All Yes
Tier 5 500M Unlimited 3 All Yes
Tier 6 Unlimited Unlimited Unlimited All Yes

Free tier is webhook-only with no retry — production use almost always requires a paid tier.

Listener / Action Decoupling

Actions are independent objects. Create the action once (with its target endpoint and credentials), then attach it to one or more listeners. This means you can swap listener filters without touching action credentials.

Internal Presence Channels Are Excluded

E&A does not process internal presence publishes (e.g., -pnpres channels). Use the dedicated Presence event sources instead.

Webhook Payload Has a Versioned Schema

Every webhook payload includes a schema field that uniquely identifies the event type and schema version, e.g.:

pubnub.com/schemas/events/presence.user.channel.joined?v=1.0.0

Receivers should switch on schema to handle each event type. See references/event-types.md for the catalog.

Versioned Envelope (1.0, 2.0, 2.1)

Distinct from your application’s message envelope schema version — those are separate.

E&A supports envelope versions 1.0, 2.0, and 2.1 (default). Each version comes in enveloped (with E&A metadata) and unenveloped (raw event) flavors. Default: 2.1, no envelope. See references/retries-and-batching.md for migration notes.

Constraints

MCP Tools

Events & Actions configuration is currently UI-driven via the Admin Portal. There is no dedicated MCP tool for E&A object manipulation; use the Admin Portal directly.

For verifying event flow:

See Also

Output Format

When providing implementations:

  1. State the listener event source + event type up front.
  2. State which action types are available on the user’s tier.
  3. For webhooks, recommend an idempotent receiver (events can retry → duplicates).
  4. Include schema field handling in any webhook receiver code example.
  5. Note batching configuration for S3 and high-volume webhooks.
  6. Recommend environment-separated E&A configuration (dev → dev keyset).

Skill frontmatter

license: PubNub metadata: {"author" => "pubnub", "version" => "0.1.0", "domain" => "real-time", "triggers" => "pubnub, events and actions, e&a, webhook, lambda, sqs, kinesis, kafka, s3, eventbridge, ifttt, amqp, listener, action target, third-party integration, no-code routing, jsonpath filter", "role" => "specialist", "scope" => "implementation", "output-format" => "code"}