tr Skip to content

API Polling Trigger: Start Workflows When Any API Has New Data

FlowMattic API Polling trigger: a supplier's product API is checked on a schedule and each new product becomes a draft WooCommerce product.

The API polling trigger in FlowMattic starts a workflow when an API’s data changes, for apps that cannot send webhooks. You give it an endpoint and a frequency; FlowMattic calls the API on that schedule, spots new items at the top of the list, and runs the workflow once for each one.

It suits supplier catalogues, job boards, helpdesks, internal tools and any REST endpoint that lists records newest first. This guide covers the fields, how change detection works, and seven workflows built on it.

What is the API Polling trigger?

API Polling is a built-in trigger app in the FlowMattic workflow builder with one event, API Changes Detected. Where a webhook trigger waits for an app to call your site, API Polling does the calling: it fetches the endpoint at a set interval and compares the answer with what it saw last time.

It reads JSON and XML responses, including RSS-style feeds where items sit under channel. It can authenticate with any saved Connect that uses OAuth, a bearer token, basic auth or an API key header.

How the API polling trigger works

  1. Choose API Polling and API Changes Detected as the trigger.
  2. Pick a Connect, or No authentication required for a public API, and a Frequency.
  3. Enter the API Endpoint, the Polling Method and, ideally, the Item Index Key that holds the list of records.
  4. Add any Headers and Parameters the API needs.
  5. Capture a response. FlowMattic stores it as the starting point and gives you the fields of the newest item to map.
  6. Add your steps, save and turn the workflow on.
FlowMattic workflow builder showing the API Polling trigger settings with a products endpoint and the Frequency dropdown.
The API Changes Detected trigger with Choose Connect, Frequency, API Endpoint, Polling Method and Item Index Key.

How changes are detected

On each poll, FlowMattic compares the first item in the list with the item it stored last time. If nothing changed, the run ends quietly. If the top item is different, it walks down the list until it reaches the stored item and treats everything above it as new. The workflow then runs once per new item, oldest first, and the newest item becomes the new reference point.

Fields that change on every request without meaning anything, such as request_id and an RSS feed’s build and publish dates, are left out of the comparison.

Fields and options

FieldWhat it does
Choose ConnectA saved Connect for authentication, or No authentication required.
Frequency1, 2, 5, 10, 15 or 30 minutes, 1, 2, 3, 6 or 12 hours, or 1 day. The default is 10 minutes.
API EndpointThe URL to poll. Required.
Polling MethodGET or POST. Required.
Item Index KeyThe key that holds the array of items, such as results, items or posts. Leave it empty to let FlowMattic pick from common names.
HeadersExtra request headers as key and value rows.
ParametersWith GET, added to the URL as a query string. With POST, sent as a JSON body; values that are valid JSON are sent as structured data.

When the Item Index Key is empty, FlowMattic looks for familiar list names, among them results, items, posts, products, articles, files and tags. Setting the key yourself removes the guesswork.

Use cases

Turn new supplier products into draft listings

A shop’s supplier publishes a product API but no webhooks. Polling every hour with products as the Item Index Key creates a draft WooCommerce product for each new item, ready for review.

Flow: API Changes Detected (products) → Create WooCommerce product (draft) → Email the buyer

Publish jobs from a job board API

A recruitment agency mirrors a partner’s vacancies on its own site. Each new job becomes a WordPress post in the jobs category.

Flow: API Changes Detected (jobs) → Create post → Share to social

Triage tickets from a helpdesk without webhooks

A support team polls its helpdesk’s ticket list every 5 minutes with a bearer-token Connect. An AI Agent tags each new ticket by topic and urgency, and urgent ones reach the on-call channel.

Flow: API Changes Detected (tickets) → AI Agent → Router → Chat alert or log

Sync sign-ups from an internal admin API

A SaaS team exposes recent sign-ups on an internal endpoint. Polling every 15 minutes sends each new account to the CRM with its plan and company.

Flow: API Changes Detected (users) → CRM create contact → Welcome sequence

Collect leads from a legacy CRM

An agency’s client runs an older CRM with a read-only API. New leads are copied into a WP Tables table that the agency’s dashboards read from.

Flow: API Changes Detected (leads) → WP Tables new record

Score new reviews with AI

A marketing team polls a reviews API twice a day. Each new review goes to an AI Agent for sentiment, and negative ones become a follow-up task.

Flow: API Changes Detected (reviews) → AI Agent sentiment → Filter (negative) → Task

Watch an XML feed that needs headers

A publisher’s partner feed is XML behind an API key header. API Polling reads the XML, finds the item list and runs once per new entry.

Flow: API Changes Detected (XML items) → Create draft post

Tips and gotchas

  • Newest first matters. Change detection reads the list from the top. If the API sorts oldest first, add a sort parameter such as newest first or descending order.
  • Avoid fields that always change. A timestamp that is different on every request, such as a “generated at” value, makes every poll look new. Point the trigger at data that only changes when a record is added.
  • API key in the query string? Add it as a row under Parameters with the GET method, so it is sent in the URL. Header-based keys work through the Connect or the Headers rows.
  • What wakes the poll. Polling runs from FlowMattic’s own job table, like every other timing, and the first poll is scheduled about a minute after the workflow is turned on. Without FlowMattic Cloud, each poll waits for WordPress cron, which runs when someone visits the site. On a site connected to Cloud, Cloud wakes the site when the next poll is due, so polls stay on time on a quiet site.
  • Changing the frequency is clean. A new Frequency replaces the old interval, and switching the trigger to another app or deleting the workflow stops the polling.
  • Respect rate limits. One request per poll adds up; choose the slowest frequency that still feels current.
  • Add a safety net. Skip Duplicate Events on the trigger’s Conditions tab, keyed on the item ID, stops an item from running twice if the list reshuffles.
  • Errors are plain. A 404 reports that the endpoint was not found, and an empty body reports an empty response.

Related features

  • Webhook trigger: the faster option whenever the app can send webhooks.
  • RSS Feed: a dedicated trigger for standard RSS and Atom feeds.
  • Connects: store the API’s credentials once and pick them here.

FAQ

What is an API polling trigger?

It is a trigger that calls an API on a schedule and starts a workflow when the response contains something new. Use it for apps that offer an API but no webhooks.

How often can FlowMattic poll an API?

As often as every minute or as rarely as once a day, with steps of 2, 5, 10, 15 and 30 minutes and 1, 2, 3, 6 and 12 hours in between. The default is 10 minutes.

Does it run the workflow for every item in the response?

No, only for items that are new since the last poll. FlowMattic walks the list from the top until it reaches the item it stored last time and runs once for each newer item, oldest first.

Can I poll an API that needs authentication?

Yes. Pick a saved Connect that uses OAuth, a bearer token, basic auth or an API key header, or add the headers yourself in the Headers rows.

API Polling is included in every FlowMattic plan. Try FlowMattic and connect your first API that has no webhooks.

More from the blog