# Building a HTTP trigger

After you have setup your HTTP connection, you can now configure HTTP triggers.

The HTTP connector supports New Event via Polling. Each new/updated record will be processed as a trigger event.

The number of events retrieved per poll depends on the API endpoint that the request is sent to. This trigger does not support pagination. If the API enforces pagination, this trigger will only read the first page of records.

If your use-case expects a paginated response, you can setup a trigger using the connector SDK.

Real-time trigger

If your use-case requires you to respond immediately to trigger events and your app allows you to create webhooks, you can use a webhooks trigger from the Webhooks connector.

# New Event via polling

This trigger fetches events at each polling interval. Workato will make a GET request to the URL that you provided. The corresponding data returned will be converted into usable datapills in subsequent actions.

# Input

New Event via Polling New Event via Polling

Input field Description
Event name The name for this polled event.
URL The HTTP endpoint that you are connecting to.
Request headers Provide the HTTP request headers, if applicable.
Response content type Select the expected response data type.
Response body example Provide a sample of the response body. Ensure that this example follows the content type indicated. Please find valid sample payloads in the section below.
Trigger poll interval Select how frequent to check for new events. Learn more about polling intervals here.

# Response body example

# JSON

For JSON responses, please enclose the sample payload with square brackets. For example:

[
  {
    "fullName": "John Doe",
    "firstName": "John",
    "lastName": "Doe"
  },
  {
    "company": "Workato",
    "legalName": "Workato Inc",
    "domain": "workato.com"
  }
]

# XML

For XML responses, the outermost tag should be of type array. For example:

<roles type="array">
<role>
		<id.w_a-b type="integer">3</id.w_a-b>
		<name>User</name>
		<description>Standard role</description>
		<omnipotent type="boolean">false</omnipotent>
		<system-role type="boolean">true</system-role>
		<updated-by>
			<id.w_a-b type="integer">1</id.w_a-b>
			<login>sampleaccount</login>
			<email>=sampleaccount@company.com</email>
			<employee-number />
			<firstname>Company</firstname>
			<lastname>X</lastname>
			<salesforce-id.w_a-b nil="true" />
			<avatar-thumb-url nil="true" />
			<custom-field-8 />
			<custom-field-7 />
			<gpo-entity />
			<radio-button-test />
			<subsidary />
			<function />
			<seg3default />
			<username1 />
		</updated-by>
	</role>
</roles>

# Output

The output of this trigger depends on the response schema provided.

# HTTP setup documentation

You can also browse the other chapters:


Last updated: 3/29/2023, 2:00:59 PM