Skip to content

HTTP New Item

HTTP New Item is a starting component: it turns any service without webhooks into a trigger, as long as it has an address that returns a list in JSON. Once activated, NappAI calls that address every so often, finds the list in the response and runs the flow with the items it had not seen before.

When to use it

  • An in-house application publishes its orders at https://api.example.com/v1/orders and does not announce new ones.
  • A tenders or jobs portal offers its results in JSON and you want to react to each new one.
  • You want to watch a service that can only be queried, not subscribed to.

Configuration

FieldWhat it does
URL (required)The address called with GET, for example https://api.example.com/v1/orders?status=new.
Items PathWhere the list is inside the response, with dots: data.items. Empty if the response is the list itself.
ID FieldThe field that identifies each item, for example id (dots allowed: order.number). Empty: the whole item is compared, so any change in it makes it arrive again. Default: id. If no item has that field, the node fails with an error that lists the fields they do have.
DataUsed to test the component: paste a sample of what arrives and run the flow to see the result.

Advanced options

FieldWhat it does
HeadersHeaders sent with every check, as a JSON object: {"Authorization": "Bearer …"}. They are stored with the flow.
Max Items per RunMaximum items delivered per run (1–100, default 20).
Process Existing ItemsWhen on, the items the address already returned when the trigger is activated are delivered too.
Check Every (seconds)How often the address is checked (60 to 86,400; default 300).

Activate the trigger

  1. Deploy a version of the flow. See Versions and publishing.
  2. In the component, click Activate. The API access window opens on the New Items Triggers tab.
  3. Click Activate. NappAI calls the address, checks that it returns JSON with a list at Items Path and remembers the current items. If something fails, the alert says what.
  4. To stop listening, click Deactivate.

Output

The Data output returns one item per new list item, with its own fields, in the order the API returns them.

Good practices

  • Pick an ID Field that never changes: the record’s identifier, not its status or modification date.
  • If the API is paginated, call the page where the most recent items appear (for example, sorted by creation date, newest first).
  • Keep API keys in a credential whenever the service has its own component; Headers is stored inside the flow.

Security

  • Only GET requests to public http and https addresses: internal network or server metadata addresses are rejected, also after a redirect.
  • Responses larger than 5 MB are discarded and each check has a 20-second time limit.