I've created a POST endpoint on a local server in node.js using express.js and localtunnel.js.
I call this endpoint from AppSheet using a WebHook.
Everything works fine except when the server is shut down.
To check if it's running, I've defined another GET endpoint, which simply returns a text.
The problem arises when the server is shut down. I can't find a way to capture the contents of the returned value in the bot's process sequence (which should be "Error," a number other than 200, or a list? ...?).
I'm not entirely clear on how the Return Value and the Name and Type parameters of the Specif type work in this case.
Can anyone help me? I need to obtain this data to perform a Branch on a condition and redirect my bot's process.
Solved! Go to Solution.
In the end, I opted for a different approach.
Nothing prevents me from calling an endpoint in a bot using a script call instead of a webHook call.
If you do it the first way, it's easier to control the fact that a URL doesn't exist and then act accordingly.
You just need to create a GAS script like this:
In the PROCESS the Return Value must be marked as Yes/No.
Then, in the next step of the bot, it checks if it returned true, and if not, it stops.
I found it easier than trying to control the WebHook response (which I still don't know how to do).
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |