Get Result from API - Response

I have an automation defined as follows:

This call an external API in the backend.

Everything works ok, but I need to have access to the response it gives me to use it in subsequent steps. At least to know if it didn’t give error:

Response when the URL is incorrect:

Task Properties

{

“Exception”: "Webhook HTTP post request failed with exception The remote server returned an error: (404) Not Found. ",

“Task Type”: “Webhook”,

“Task Name”: “Call Api to Create User”,

“Url”: “http://someurl.com/api/1.0/device/register1”,

“Verb”: “Post”,

“MimeType”: “application/json”,

“Headers”: “”,

“Payload”: “{"email": "someone@somedomain.com","first_name": "Nick","last_name": "Benedict","os": null,"phone_number": "1234567890"}”

}

Response when ok:

Task Properties
{
“Response”: “{\n "payload": {\n "id": 893,\n "is_vendor": false,\n "dealer_id": 0,\n "is_enrolled_user": false,\n "is_dealer_owner": false,\n "is_admin": false,\n "sales_person_id": 0,\n "tax_id": null,\n "is_dispatcher": false,\n "is_service_manager": false,\n "vendor_id": 0,\n "is_vendor_sales": false,\n "vendor": null,\n "mechanic_id": 0\n },\n "result": {\n "success": true,\n "errors": \n }\n}”,
“Task Type”: “Webhook”,
“Task Name”: “Call Api to Create User”,
“Url”: “http://someurl.com/api/1.0/device/register”,
“Verb”: “Post”,
“MimeType”: “application/json”,
“Headers”: “”,
“Payload”: “{"email": "someone@somedomain.com","first_name": "Nick","last_name": "Benedict","os": null,"phone_number": "1234567890"}”
}

I work with AppSheetCORE (GOOGLE WORKSPACE).

Thanks…

This discussion may help you a bit.

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Webhooks-Is-there-a-way-to-get-a-response-payload-from-a-REST/m-p/383218

I do not think there is a “ready” way but some workarounds seem to exist.

Also may want to utilize the Google Apps Script integration recently went into preview.

https://www.googlecloudcommunity.com/gc/Announcements/Apps-Script-Tasks-are-now-available-in-Preview-Call-Apps-Script/m-p/406548#M4122

1 Like

I recommend Make (aka integromat) for that.

It has a very intuitive interface and it’s also no/low-code.

It has direct integration with AppSheet and you can customize a lot of it.

Take a look:

https://www.make.com/

2 Likes

There is no built-in way to get a response from the other end when using a web hook.

1 Like