Baileys Trigger icon

Baileys Trigger

Poll wa-instance events and emit only new ones

Baileys Trigger

AI-generated

Summary

Polls the wa-instance /events endpoint on the configured schedule and emits newly observed events as n8n items. Choose an event category or custom filters, and set how the first poll handles the events it retrieves.

Inputs

  • Poll Times — Schedule for polling, with one or more intervals such as every minute, hour, day, week, month, every X minutes or hours, or a custom cron expression.
  • Trigger On — Select account, call, chat, contact, group, message, or all events. Custom Filter uses the optional Entity Type field to set a raw entity type filter supported by the API.
  • Entity Type — Raw entity type filter sent to the API when Trigger On is Custom Filter; omitted if empty.
  • Options: Event Type — Optional backend event type filter, such as messages.update.
  • Options: First Run Behavior — On the first poll, emit all retrieved events, emit only the newest, or set the cursor without emitting events. Defaults to setting the cursor without emitting.
  • Options: Limit — Maximum results requested per poll; UI default is 50, with a declared range of 1–100.
  • Options: Message ID — Optional filter for events related to a single message ID.

Output shape

A list of n8n items, each containing an event object in json, or no items when there are no new events.

Events are ordered by occurrence time and event ID. The trigger stores a cursor in workflow static data and emits only events newer than that cursor after initialization. It requires the baileysInstanceApi credential; polling errors are surfaced as node API errors.

Links

Discussion