NOTE: An understanding of web services is highly recommended before using this action. How and when to use a web service is beyond the scope of this article.
Method supports two types of web services: REST and SOAP. Choosing between the two is dependent on the service you are calling. The parameters for both are explained below.
REST Web Service
Description | |
Web service type | REST (Representational State Transfer) makes data available as resources (i.e. nouns). For example: "user", "invoice", "amount". |
Endpoint URL | Url of the server to communicate with |
HTTP Method | Choose from one of the five http methods:
|
Content-Type | Choose from:
|
Parameters:
| The parameter(s) to send to the server.
|
Headers: | If the web service requires a header, you can send a key and a value.
|
Body | (Only visible for POST and PATCH HTTP Method): If the service requires body text, enter the value here. |
Advanced Options |
SOAP Web Service
Description | |
Web service type | SOAP (Simple Object Access Protocol) is its own protocol with more standards. It makes data available as services (verb + noun). For example: "getUser", "payInvoice", "getAmount". |
Endpoint URL | Url of the server to communicate with |
SOAP action | Function call as specified by the server. |
Parameters:
| The parameter(s) to send to the server.
|
Advanced Options |
Advanced Options
In both types of services (REST or SOAP), there are further options.
Parameter | Description |
Advanced Options | When checked, you can:
|
Test Web Service > | Takes you to a separate screen to test whether or not your request to a web service is successful. |
{{ Replace }} Keyword
There are times when you wish the Endpoint URL to dynamically change based on a keyword. There is a mechanism in place to change the URL by enclosing it between two curly braces: {{ }}
.
In the below example, the Endpoint URL requires an account name. Note the highlighted {{AccountName}}
. The curly brackets ({{ }}
) indicates we want to replace this word.
Under Parameter name, we indicate the word we wish to replace, and what we want to replace it with.
In the above example, we want to replace {{AccountName}} with whatever value we have stored in Account Name.
If, for example, the Account Name field held the value "PopAndSkate", then the Endpoint URL would resolve to:
https://api.company.io/data?name=PopAndSkate
Examples
Although we don't have many examples, you can see our article Customizing Method to Integrate with Slack.