VK Trigger icon

VK Trigger

Запуск workflow по событиям ВКонтакте

VK Trigger

AI-generated

Summary

Trigger workflows based on specified VKontakte events by polling the VK API for new messages, comments, friend requests, or wall posts.

Inputs

  • event (required) — Select the VKontakte event to trigger on: new incoming message, new comment on a post, new friend request, or new wall post.
  • pollTimes — Configure times for polling the node to check for new VK events, supporting various scheduling modes including cron expressions.
  • lpMode — For 'newMessage' event: bitmask defining Long Poll mode to specify amount of data received per message (default 234 for full data with attachments).
  • lpWait — For 'newMessage' event: Long Poll server wait time in seconds to hold the connection for new messages (default 25).
  • incomingOnly — For 'newMessage' event: option to trigger only on incoming messages, ignoring outgoing ones (default true).
  • ownerId (required) — For 'newComment' event: ID of the user or community owning the wall where comments are monitored.
  • postId (required) — For 'newComment' event: ID of the wall post to monitor new comments on.
  • wallOwnerId — For 'newWallPost' event: ID of the user or community whose wall is monitored. 0 refers to the current user; negative values for communities.
  • wallFilter — For 'newWallPost' event: filter to select posts to monitor (all, own posts, or others' posts).

Output shape

A list of new VK event items matching the selected event type.

Returns an array of items per polling cycle when new VK events are detected; each item contains the event data JSON. For 'newMessage', returns incoming messages with detailed data; for 'newComment', returns new comments enriched with author info; for 'newFriendRequest', returns user profiles of new friend requests; for 'newWallPost', returns new wall posts matching filters. Initially, no output is emitted to avoid triggering on existing data.

Examples

Example 1: Trigger on new incoming personal messages

Set event to 'Новое сообщение в ЛС' (newMessage), optionally configure Long Poll mode and wait, and incomingOnly flag.

Example 2: Trigger on new comments on a specific post

Set event to 'Новый комментарий к посту' (newComment), specify ownerId and postId of the monitored post.

Example 3: Trigger on new friend requests

Set event to 'Заявка в друзья' (newFriendRequest) to trigger when new friend requests arrive.

Links

Discussion