SENDHTTPPOST Workflow Application
Overview
The SENDHTTPPOST workflow application lets you create outgoing webhooks to external systems. Webhooks allow an API to exchange information with other applications through HTTP POST requests, and can be used to build integrations with extendable applications such as Slack, GitHub, and Dropbox. For example, they can be used for notifications when an expected event (as previously configured by the user) has occurred. Since they allow real-time communication, webhooks are efficient and performant.
The SENDHTTPPOST workflow application sends outgoing webhooks to external applications using JSON or URLENCODED payloads. SENDHTTPPOST will then receive and process the response from the external API. For more information, see the Using webhooks with WorkflowGen topic on the WorkflowGen Forum & Knowledge Base.
For an example of how you can use SENDHTTPPOST to send messages to Slack channels from WorkflowGen, see Workflow Application: Using SENDHTTPPOST to send messages to Slack. As well, samples of APIs that use SENDHTTPPOST are available in the SENDHTTPPOST Workflow Application repository on GitHub.
How it works
The default payload content type (
APP_CONTENT_TYPE
) is JSON; URLENCODED is also supported.Since the application parameters are case-sensitive, parameters must use the API’s accepted notation.
The SENDHTTPPOST application requires the
APP_URL
parameter, which corresponds to the external API URL.The
TOKEN
parameter is available for authentication for external APIs where the token is not included in the URL. In these cases, the token will be sent in the payload using theTOKEN
parameter.The response can contain an optional payload mapped to user-defined OUT parameters.
In case of error when then
APP_RESPONSE_STATUS
OUT parameter is not defined, an exception will be triggered.Besides the optional parameters listed below, you can also add additional custom IN and OUT parameters (specific to the external API) to send and receive custom user-defined data to and from the external API. For example, in a Slack integration, you can add a parameter to include an emoji in a Slack message, and map this to Slack’s "icon_emoji" parameter (this is the Slack API’s accepted notation for this particular parameter).
The default timeout (
APP_TIMEOUT
) is 3000 milliseconds; the maximum timeout is 60,000 milliseconds.Application logs are available; these can be specified by setting the
SendHttpPostLogLevel
parameter value in the "web.config" file to0
to disable logging,1
for simple logs, or2
for debug logs.
Examples of JSON payloads
A payload created by SENDHTTPPOST to send a message to a Slack channel would look something like this:
A payload created by SENDHTTPPOST to send nested JSON to be converted into objects by an external API would look something like this:
Parameters
Required parameter
Optional parameters
Last updated