Using Make Data Structures to filter the Webflow CMS

Problem:

When you trigger a Webhook (in Webflow) on a CMS Collection, it triggers on all CMS Collections, not any specific one.

Any create, update, or delete on any item, across all of your CMS Collections triggers a Webflow Webhook :scream:

Webflow doesn’t give you granular control with their Webhooks.

So you end up getting a firehose of data sent out of Webflow via their Webhooks.

Because of this…

Someone recently asked me a question (a.k.a. @johnematias):

"I’ve successfully set up a Webflow Webhook to get data when any of my Webflow CMS items change, but how do I narrow it down to a specific Webflow CMS Collection?”

And my first thought was a Make Automation :heart_eyes:

Solution:

Turns out…

If you’re sending data to a Make Webhook its super easy to apply a Data Structure and filter requests BEFORE your operation runs.

Versus the common choice of applying a filter that runs AFTER your operation.

I found this solution to work really well for me and I wanted walk through a quick build of how I solved the problem with Make Webhooks and Data Structures.

Hopefully it helps someone else!

The Build:

Starting with Webflow.

The first thing to do is…

1. Create a Webflow CMS Collection

Next add a new field with the same name as the Collection.

This field will be the key you bind to, and filter on, with your Make Data Structure.

2. Create your Make Webhook

Just a standard Make Webhook will do for now. The important part at this phase is to get the Make Webhook URL so we can add it to Webflow.

3. Create your Webflow Webhook

With your Make Webhook URL, you can now use it to create a Webflow Webhook.

I set my trigger on a CMS item being updated.

Whenever a Webflow CMS item is updated (in any Collection) your Webflow Webhook will be triggered and the item will be sent to Make.

4. Create your Data Structure as a Filter

Next, setup your Data Structure within your Make Webhook.

I’ve added the Webflow CMS field I created earlier as the Data Structure key I want to match against.

If I have 2 Webflow CMS Collections, each will have a unique field (key) the same name as the Collection.

Any request without that specific key (field from your Webflow CMS) will be blocked.

If the key exists, it’ll run your Webhook operation.

That’s because…

I’ve set this specific item to be required.

If this item, within this Data Structure does not exist in the requested data sent to it, then it blocks it BEFORE running my Webhook operation.

5. Try it!

Test the happy path…

Tap the magical run once button, update your Webflow CMS Collection, and see it run.

Also confirm that this has the Webflow CMS field sent to it that exactly matches the key in your Make Data Structure.

Test the sad path…

Tap the run once button again, update a Webflow CMS Collection that does not have this key in it, and see that the Webhook operations never runs.

Go to your Scenario history and see that you have only 1 run, your second attempt never ran.

Conclusion

This has worked really well for me.

I can freely change my Webflow CMS structure, as long as I leave this one field, without it effecting my Make Webhook Data Structure.

:beers: Post any questions!

P.S. here’s my original blog post if anyone is interested.

3 Likes

Thanks a bunch for sharing this with us and for bringing an enormous amount of value to the community @ChrisDrit

Awesome stuff, keep up the great work :clap: :clap:

1 Like

This I did not know. Very clever!

2 Likes

Yep! @ChrisDrit you helped me solve this issue on my project and has proved to be an excellent solution. Keep it up.
High Five Tom Cruise GIF by Hollywood Suite

3 Likes

hahahaha :disguised_face: @johnematias you are the infamous “someone” indeed :rofl: Now I’ll be forced to call you out by name :smiling_imp:

In all seriousness, thanks for being the impetuous behind this awesome technique. You always push the limits :raised_hands: and I always love hearing how you approach those limits!

You definitely have the need, the need… for speed :joy:

1 Like

Man, I wish I could do this for QBO webhooks. Great stuff @ChrisDrit

3 Likes

Isn’t the filtering Chris pointed out a standard webhooks feature though? Or are you using the QBO Instant Triggers?

I am using the QBO Instant trigger and the option is not available, unfortunately.

I don’t know what QBO is, so this may be a silly comment… but it still begs to be asked.

Does QBO give you the option to post to a URL versus only access to their instant triggers? If not, bummer :sob:

QBO = QuickBooks Online :laughing:

It’s doable to create a webhook via API (Make does it) but it’s a bit of a pain to do from what I have seen.

2 Likes

Yea, I tend to avoid stuff like that if at all possible :grimacing:

Again, I have zero clue but I ask myself the question, is the heavy lift of tapping into their Webhooks worth the benefit of filtering your operations?

I have no clue…

But, I did find (at the very least) step 4 of these instructions to not look too bad.

That said, I avoid large companies like this when I can for a reason, and this may be that exact reason :rofl:

Anywho… hope you can try this approach for another project of yours! Would love to hear the results :raised_hands:

1 Like

This is exactly the question I am asking myself. At this point it is clearly a No because it is too much work vs benefit. And I am not frustrated enough about it …yet.

Actually, Quickbooks API is fun to work with. The documentation is really good and a lot of endpoints to work with. The only thing I don’t like is Webhooks

1 Like

It would be cool if you could do the same thing for Instant Triggers you could with native webhooks. I wonder if this is in idea exchange?

2 Likes