You specify:

  1. The URL of the web service.
  2. The HTTP Verb used to call the web service.
  3. The HTTP Headers which are sent to the web service.. These often contain authentication information such as an authentication token or a username/password.
  4. The Body containing the command or data sent to the web service. 

URL

You must specify the URL for the HTTP request. 

The URL must be an absolute URL. 

The URL may include AppSheet variables and expressions.

https://api.webservice.com/add/table/<<[Table Name]>>/id/<<[Record Id] + 1>>

If you are using the webhook to invoke the AppSheet API, you should enter the webhook URL value in the following form.

https://api.appsheet.com/api/v2/apps/{appId}/tables/{tableName}/Action

Where

  • {appId} specifies the GUID of the AppSheet application. You can obtain the {appId} from the Manage > Integrations > IN pane.
  • {tableName} specifies the name of the table.

While the app is in test mode (i.e. it has not passed a Deployment Check), the Webhook will not  be invoked.

HTTP Verb

You must specify the verb to be used for the HTTP request. 

  • Post (This is the default value, and by far the most common choice.)
  • Delete
  • Patch
  • Put

HTTP Headers

You can optionally specify one or more HTTP headers to be included with the HTTP request.

The most common HTTP Header is an Authentication header.

Each header must be specified on a separate line. Each header line must specify the header name, followed by a colon, followed by the header value.

The header name and header value may include constants or AppSheet expressions. The expression result will replace the expression in the HTTP header.

If the header value contains quote characters, you must enclose the entire header value within quotes, and escape each embedded quote with two quotes. For example, if the header name is Authorization  and the header value is Token token="537d7d", you should enter Authorization: "Token token=""537d7d""" in the header line.

For example, when invoking Pushpad from a webhook you might need to include the following header values:

Authorization: Token token="9474e7dfeffa2eb49e656b4ba7c96a06"
Accept: application/json

Do this by specify each of the header values on a separate line:

Authorization: "Token token=""9474e7dfeffa2eb49e656b4ba7c96a06"""
Accept: "application/json"

We automatically set the "Content-Type" header to the following value:

Content-Type: "application/json"

 

Body

You have three options when it comes to the body of the HTTP request. 

  1. You can specify nothing and receive a default HTTP body that contains all of the values from the updated row except for Hidden columns and Show type columns.
  2. You can specify a body in the Body field.
  3. You can specify a Body Template as described here. In most cases you should specify a Body Template.

Execution Options

Timeout 

You can specify the webhook call timeout value.

Max Number of Retries on Failure

You can specify how many times a failed webhook call is retried.

Run Asynchronously

You can use the Run Asynchronously option to control whether the webhook is invoked synchronously or asynchronously. Invoking the webhook asynchronously can improve client response time when the webhook is invoked from a workflow rule. 

When you specify Run Asynchronously "On", the server invokes the webhook Post call but it does not wait for the webhook Post call to finish. As a result, the webhook Post call's response time is not included in the overall client response time.

When you specify Run Asynchronously "Off", the server invokes the webhook Post call and waits for the webhook Post call to finish. As a result, the webhook Post call's response time is included in the overall client response time.

Before you specify Run Asynchronously "On", consider whether your application requires the webhook to complete synchronously for correctness. If your webhook is changing data and your application relies on that data being updated before the sync completes, then using an asynchronous call may yield incorrect results.

Test and Troubleshooting your WebHook

See this article.

Did this answer your question?