Flows can be run manually, but often it is useful to run a flow based on an event. A common event is receiving a remote API call from a separate system or process.

You can do this in Synatic by using the HTTP Trigger step.

Note: You can add one or more HTTP triggers to the Trigger object.


Using an HTTP Trigger Step

The HTTP Trigger is located in the Trigger drawer in the Steps palette. To use the HTTP Trigger step:

  1. Select and drag it to the Triggers step in the flow.

  2. Configure the options available.

  3. After saving, click the HTTP Trigger step edit icon once again to view the URL created for the HTTP endpoint.

Note: The Trigger box is always the first step in a flow and may be left blank and unused, or it may be configured to use one or more trigger steps.


Configuring the HTTP Trigger

Mode

There are two options for mode:

  • Asynchronous - The flow starts, and the result can be checked later. The HTTP call returns immediately with an object detailing the step being run.

  • Synchronous - The flow will start, run, and return the result to the HTTP call. When selected, an extra option selection is available to force the result to be returned as a file instead of as the document body.

Security Level

There are two options for Security Level:

  • Local - This implies that access to the HTTP service requires authentication.

  • None - No authentication is required.

Method

There are five options for the HTTP Method that may be used:

Note: The two most common HTTP methods used are GET and POST.

  • POST is used to send data to a server to create/update a resource.

  • GET is used to request data from a specified resource.

  • DELETE deletes the specified resource.

  • PUT is used to send data to a server to create/update a resource.

  • PATCH is a request method for making partial changes to an existing resource.

Learn more about HTTP Methods.

Enforce Content Type

This enforces the content type of the HTTP call to the trigger. There are three options:

XML - an abbreviation for eXtensible Markup Language, which is used for storing and transporting data.

JSON - an abbreviation for JavaScript Object Notation, which is used for storing and exchanging data.

None - Any content may be posted to the trigger's HTTP endpoint.


Options

Pass Headers

Any headers included in the Method request to the HTTP endpoint will be included in all subsequent HTTP requests made in the flow.

Result To File

This option is visible when the Synchronous mode is selected.

  • If you select the checkbox, then the result is returned as a file.

  • If the checkbox is not selected, then the result will be returned as the body of the HTTP result.


Advanced Mode Option

None.


Example

Let's assume that you want an option on your Client's investment webpage to call a Synatic flow that will extract, convert, and return investment data.

The data can be formatted and returned for display on the client's webpage.

Note: After saving, click the HTTP Trigger step edit icon again to view the URL created.

https://trigger.synatic.com/v2/flows/5e737aa592bde73608ac2717/5fc923f3de04ce4bae9a2974/Yjc5ZjA2NTctZDMzYS00MmQwLWE1ZDEtZmNjOGFhNTFmODdj

The option on the client's webpage will call the URL to execute the relevant flow.

Note: There are two further options available to Disable and Detach the trigger.


Limitations and known issues

None.


See Also

Learn more about HTTP Methods.

Read about other Trigger steps


Useful Tutorials

Revisit the Getting Started page for a refresher.

Read more about Steps here.

Did this answer your question?