1
0 Comments

How to watch for new WordPress categories with WP-JSON and Integromat?

I need to watch for new categories being created in a WordPress install, and then do something with the term meta via Integromat.

I know Integromat has a "Watch Categories" trigger on the WordPress v2 connection, but this returns "rest_forbidden_context", probably due to a security setting, XML-RPC or something. And Integromat's v1 (legacy) connection doesn't have the equivalent trigger.

So I'm thinking about replicating "watch categories" by polling the WordPress install's API via WP-JSON.

The URL https://sitename.com/wp-json/wp/v2/categories returns a list of "Categories" terms in JSON, like this...

  [
    {
      "id": 8494,
      "count": 12,
      "description": "",
      "link": "https://www.sitename.com/category/slug-of-category-name",
      "name": "Title Of The Category",
      "slug": "https://www.sitename.com/category/slug-of-category-name",
      "taxonomy": "category",
      "parent": 0,
      "meta": [],
      "_links": {

etc.

Now, how do I identify a newly-added category using Integromat?

Perhaps I could use the HTTP connector? I just successfully used its "Make a request" action to GET https://sitename.com/wp-json/wp/v2/categories and automatically parse with "Parse response"...

img

This successfully returns a JSON obtain with 10 "data" nodes, one for each Category. But how I only use any that are new since the last check?

posted to Icon for group No-Code
No-Code
on November 20, 2020
Trending on Indie Hackers
I'm a lawyer who launched an AI contract tool on Product Hunt today — here's what building it as a non-technical founder actually felt like User Avatar 151 comments Never hire an SEO Agency for your Saas Startup User Avatar 85 comments A simple way to keep AI automations from making bad decisions User Avatar 65 comments “This contract looked normal - but could cost millions” User Avatar 54 comments 👉 The most expensive contract mistakes don’t feel risky User Avatar 41 comments We automated our business vetting with OpenClaw User Avatar 34 comments