Realtime database update from 3rd party apps (notion, airtable, sheet, etc)

This can be done, however a couple of quick details…

  1. you’ll want the 3rd party application to be the one triggering the change, otherwise it can’t be real time. If you make WordPress go and get the values from the 3rd Party application it’ll be scheduled and thus not ‘real-time’. Do all of these apps have that ability?

  2. Rather than change the value 20 times, you’d want to store this value in the database, so when a change is triggered at the source you’d contact WP and change the value in the DB & that value would then appear in all the posts.

  3. You’ll want to build this as a plugin and instead of using custom fields it’d be better if you generated a custom post meta box where you could assign the plugin field to get the value from. You could still use custom fields, but then, when a custom field is present, rather than show it’s value, you’d instead go to the plugin’s options data and get the most up-to-date value for that field.

By ‘generating a custom meta box for posts’ what I mean is that you’d create a setting on a post that says “Use this Reza Plugin Field”. Then you’d select one of your predefined fields from a dropdown or checkbox list or you could use a Select2 input… would depend on use case. So now you’re assigning one of your predefined fields to your post. The value of those fields is being maintained by the plugin’s settings which you’ve written to the database and that you’re updating from your third party app.

You’ll want to do all of this using the REST API and a good starting point is here:

https://code.tutsplus.com/tutorials/wp-rest-api-creating-updating-and-deleting-data–cms-24883

And also here: https://developer.wordpress.org/rest-api/