The class
SubclassBasePollingTrigger[Config] and implement poll:
How poll works
1
Called on a schedule
The platform invokes
poll(ctx, state) every polling_interval seconds. state is whatever your previous poll returned (an empty dict on the first call).2
Return new events
Return
(events, new_state). Each event is a JSON-serializable dict whose keys match your outputs — those fields become the triggered run’s inputs.3
Persist a cursor
Put a watermark (last-seen id/timestamp, or a set of processed ids) in
new_state so the next poll only returns genuinely new events. The platform stores it for you between polls.Return an empty list when nothing is new — that is the normal case, and it starts no runs. Only return an event the first time you see it; deduping via
state is what keeps a run from firing twice for the same item.Reading credentials
List the integration types the trigger needs inintegrations, then read them from the context the same way a node does:
Errors
RaiseIntegrationFailedError (from noxus_sdk.errors) when the external call fails — only the message crosses the sandbox boundary, so make it actionable. Don’t let an exception escape for an expected “nothing new” result; return an empty list instead.