I’ve got a workflow that includes “fetch collection” block that is a REST API that is posting a webhook over to Zapier, with some information to trigger a Zap. The “fetch collection” is within a workflow that is started by clicking a button.
But I’ve noticed that the Zap is triggered on page load, before a user has triggered the workflow via the button, which implies that WeWeb is automatically “fetching” the collection before the user asks it to.
This isn’t how I would expect it to work, but can see why it might be expected if you’re assuming all collections on a page should be fetched on page load. So my question is - is this a bug, or working as intended?
(I’m open to alternative ways to trigger a Zap in the frontend too!)
Check out if you have fetch automatically enabled on your collection. It’s a little hidden, but if you have this enabled, it will fetch your collection on page load - given its data is used anywhere in the current page. Otherwise I’d look into whether you aren’t triggering it from somewhere without being aware of it.
It doesn’t really make sense, I appreciate that! Here’s a screenshot of the collection, which is actually just posting data to Zapier (this is triggered within a workflow via a “Fetch collection” action.
I think @Broberto’s suggestion is the correct answer - I just did some (fairly light) testing and it looks like if unselect “fetch automatically” it doesn’t trigger the Zap on page load, only via the workflow. So thank you!