# Custom polling trigger

Reusable code trigger evaluated at the workflow polling interval.

Canonical URL: https://opennodeflow.dev/wiki/reference-app-core-trigger-poll/
JSON reference: https://opennodeflow.dev/wiki/reference-app-core-trigger-poll/index.json
Source snapshot: 2026-10-23

# 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](/wiki/first-workflow/) · [Browse the catalog](/wiki/integration-catalog/)

## Outputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `next` | Next | control | No |  |
| `payload` | Payload | any | No |  |

## Configuration schema


```json
{
  "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](/wiki/versioning/), [connections](/wiki/connections/) and [integration setup](/wiki/integration-setup/).

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/catalog-all.mjs`
- `../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs`
- `../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs`
- `shared/seed.ts`
- `shared/storage-library.ts`
- `shared/variable-library.ts`
- `shared/control-flow.ts`
- `shared/remote-routes.ts`
- `server/runtime-library.ts`
- `shared/error-library.ts`
- `shared/storage-model.ts`
- `shared/builtin-documentation.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
