ContentRunner Next Message icon

ContentRunner Next Message

From user state and branches (welcome/main), compute state_check, current/next message per branch, next planned times, and is_last_in_branch

ContentRunner Next Message

AI-generated

Summary

Computes current and upcoming message details for the welcome and main branches from a user state and branch schedules, including planned send times and branch status flags. Passes through selected fields from each input item.

Inputs

  • User State (required) — State object with cursor indexes and timing fields such as current_cursor_welcome, current_cursor_main, branch end timestamps, last pushed timestamps, and optional next planned push timestamps. Defaults to the incoming item JSON.
  • Branch Welcome (required) — Welcome branch array with cursor_index and interval_minutes for each message. Defaults to the welcome branch from Campaigns By Bot.
  • Branch Main (required) — Main branch array with cursor_index and interval_minutes for each message. Defaults to the main branch from Campaigns By Bot.
  • Pass Through Input Fields — Comma-separated incoming JSON keys to copy to the output; defaults to parsed,update. Missing keys are skipped.

Output shape

One output item per input item, containing state_check, welcome, and main objects, plus any configured pass-through fields.

Each branch object includes currentMessage, nextMessage, afterNextMessage, next_planned_at, after_next_planned_at, and is_last_in_branch. state_check includes next cursor indexes, availability and end flags, planned datetimes, and is_paralel_push. Missing messages or times are null; malformed state or branch JSON falls back to an empty object or array.

Links

Discussion