I’m wondering if there would be a way to control the codes access times with the Nuki API ?
I want to be able to send a webhook request using Zapier to the smartlock to update the code access times.
I’m not a dev but i usually make my way through what I need to do.
Unfortunately I took a look at the documentation and could not find anything close to what i’m looking to do.
I’ve seen this topic :
But I must confess, i’m confused on how to use those informations with Zapier.
I found the problem and the solution that goes with it !
Well… I didn’t found it alone, I’ve hopened a topic on the Zapier community and they solved it quicky !
For those who might be facing the same difficulties than me with Zapier, it appears that you need to send the request in a Javascript code step.
Here is the answer from GetUWired on Zapier Community:
There is a chance that Zapier would be engaging in a loop… which would be hard to tell in the set up. When you return an array of objects Zapier most commonly loops each remaining step (as is the case from a code block – though its not apparent that this will happen) or just returns the first object (as is the case for most search actions).
If you want greater control over what is returned, i’d suggest using a javascript code block and making a fetch request.
The solution is to creat a JavaScript code step instead of using webhooks by zapier.
You can find the whole topic and fetch request here