Custom polling trigger
Reusable code trigger evaluated at the workflow polling interval.
Custom polling trigger#
Fetches a JSON endpoint and emits its response for downstream processing. This is an editable polling example: despite the code comment about new work, the shipped implementation emits every successful response and performs no change detection.
Sockets and configuration#
- No input sockets.
- url configuration (required string): endpoint URL; new instances default to
https://example.com/events. Replace it before enabling. - payload (any): parsed JSON response, including objects, arrays or primitives.
- next (control): automatic success route.
Set the graph entry mode to poll and choose an interval of at least five seconds. The body uses fetch's default GET request, with no custom headers/body or secret lookup. It throws HTTP <status> on non-success status; invalid JSON or network failures also fail execution. There is no error route declared here.
Example and extensions#
A service responding {"items":[{"id":"example-001"}]} produces that object on payload every poll. For emit-on-change behavior, duplicate this asset, compare a stable cursor/event ID with context.state, and return {__skip:true} when unchanged. Decide deliberately when to checkpoint: a trigger checkpoint can survive a later downstream failure.
The engine schedules and prevents overlapping ticks per entry; this code starts no background listener. Requests execute under the hosting machine's network access. Timeouts/retries apply to the whole fetch/parse attempt and may repeat requests. The remote response becomes retained run data. Do not put credentials in URLs or assume polling provides exactly-once processing.
Catalog identity#
| Field | Value |
|---|---|
| Source key | app.core.trigger.poll |
| Kind | trigger |
| Family | app-core |
| Pack | See library discovery |
Integration guide · Browse the catalog
Outputs#
| Socket ID | Label | Type | Required | Meaning |
|---|---|---|---|---|
next | Next | control | No | |
payload | Payload | any | No |
Configuration schema#
{
"type": "object",
"properties": {
"url": {
"type": "string",
"title": "Endpoint URL",
"default": "https://example.com/events"
}
},
"required": [
"url"
]
}Source and installed versions#
This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See versioning, connections and integration setup.
Source provenance
Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.
../OpenNodeFlow-Library/work/catalog-all.mjs../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjsshared/seed.tsshared/storage-library.tsshared/variable-library.tsshared/control-flow.tsshared/remote-routes.tsserver/runtime-library.tsshared/error-library.tsshared/storage-model.tsshared/builtin-documentation.ts