How to Set Up a Webhook and Branch on a Condition in AppSheet?

enq
Bronze 1
Bronze 1

When I set up Bots to perform a webhook, the response is as follows:

If successful:
"response": {"data": "success"}
If failed:
"response": {"error": "error reason...."}

I want to use the next automation step 'Branch on a condition' to determine true or false and take different actions accordingly.

How should I set my webhook's "Specific Type" field and the expression for 'Branch on a condition'?

Here is my current setup:
If the API call is successful or error, it encounters an issue. 
response error
The AppSheet Bots Monitor shows the error: Failed Webhook type translation: Key 'data' not found in returned object.

response successful
The AppSheet Bots Monitor shows the error: Failed Webhook type translation: Key 'error' not found in returned object.



ๆˆชๅœ– 2024-05-28 ไธ‹ๅˆ4.15.35.png
ๆˆชๅœ– 2024-05-28 ไธ‹ๅˆ4.16.06.png

Does anyone know how to configure this correctly? Thank you!

0 2 209
2 REPLIES 2

I haven't test this or had a similar use case, but in the condition check, try to do one condition at a time: 
contains(                         ,"Success") 
then add the branch 
if yes do this 
if no do something else 

Thank you for the response.

I tried setting the condition to contains(                , "Success") and then added the branch. When the condition is met (yes), it proceeds to the next step.
However, when the condition is not met (no), it does not execute the 'if no do to' action.

My 'if no do to' action is set to 'Run a data action / Custom action / Set row values' to set 'failed' in the specified column.

Why is it not executing the 'if no do to' action?

Top Labels in this Space