Post to webhook not working in Appsheet but works in browser

I have a bot => task that is hitting a webhook based on a change in the table. I am planning on using fields from the row, but to troubleshoot I am using a static url. The URL works fine in a browser (no data is returned it just kicks off a process with parameters passed from Appsheet), but when I copy the URL to the task it fails every time. Here is the error from Audit History, I’ve removed the URL and some payload info. The URL is a Microsoft Power Automate flow. I tried a few random http headers that I thought Chrome might be providing that appsheet did not, but received errors indicating they are provided. Out of ideas on how to troubleshoot further.

Error:
"Webhook HTTP post request failed with exception The remote server returned an error: (400) Bad Request. "
Properties:
 {
  "EventType": "Change",
  "InvokedBy": "Update",
  "AppTemplateVersion": "1.001246",
  "Process Name": "New process",
  "ServerRegion": "us-central1",
  "TableName": "Distribution Dates",
  "OperationUpdateMode": "UPDATES_ONLY",
  "EventMatch": "Workflow event successfully matched",
  "IgnoreSecurityFilters": false,
  "Condition": "=[sendRoster] > (NOW() - \"000:01:00\")",
  "MatchesCondition": "True",
  "Exception": "Webhook HTTP post request failed with exception The remote server returned an error: (400) Bad Request. ",
  "Task Type": "Webhook",
  "Task Name": "EmailRoster:rosterFlowWebhook",
  "Url": "URL REMOVED",
  "Verb": "Post",
  "MimeType": "application/json",
  "Headers": "",
  "Payload": "{ \"UpdateMode\": \"Update\", \"Application\": \"Roster\", \"TableName\": \"TABLE DATA REMOVED",
  "AppTemplateName": "0ab48aa8-22ab-4960-9186-bb0668981fff",
  "Operation": "Change Bot",
  "Result": "Failure"
}

Not sure. But entering a URL in a browser is a GET request, not a POST. Maybe that has something to do with it? (I have zero knowledge of Power Automate and how you may or may not have setup incoming webhooks in it).

Also, maybe try testing with an API testing tool first, like Postman. It is typically easier than testing through Appsheet.

3 Likes

You are 100% right. I’m so used to just copying a PA flow and then reconfiguring the steps I didn’t check to see if it was GET or POST; literally the first step. I guess most of them are GET and at this point I don’t think about it anymore. Flipped it to POST, works fine. Ugh. Wasted a couple of hours there, but at least I fine tuned the workflow. Thanks @Marc_Dillon!

3 Likes