Triggers

Automate your integration workflows with triggers.

Triggers

trigger is a powerful tool that automatically launches a workflow when a defined event happens. This enables you to automate complex business process without having to manually run the workflow every time. 

Earlier, we learned that creating a workflow is like defining the conditions of your requirement:

When an event occurs in ‘Service A’, do something in ‘Service B’, and (optionally) pass on the data to ‘Service C’, ‘Service D’, and ‘Service E.

Here, the first part, i.e., ‘When an event occurs in Service A’ is a trigger. By defining this, you are informing webMethods.io Integration to run the workflow automatically whenever a particular event happens in Service A.

Example

Let’s look at an example to understand how triggers work, and how to set them up. Let’s say your workflow is ‘When a new to-do item is created in Wunderlist, translate the title text to Spanish, and send the translated text to my email address.’ In this workflow, ‘When a new to-do item is created in Wunderlist’ is the trigger. webMethods.io Integration will keep checking your Wunderlist account for any update. As soon as a new to-do item is created, it will extract the title text, convert it to Spanish, and send the translated text to the specified email id. Let’s look at the steps involved in setting up this trigger.

Types of triggers

A trigger fires off a workflow when an event happens in an external app or service. However, not all triggers keep constantly checking for updates/changes in these external services. Some check for changes periodically, at regular intervals (e.g., every 5 minutes). This type of trigger is known as polling trigger.Polling triggers may not send data to webMethods.io Integration in real time. All the polling triggers are marked with 'Clock' sign in the triggers list.

Trigger_home_page.png

The other type of trigger, on the other hand, keeps checking for updates continuously. It sends data to webMethods.io Integration in real-time, which enables your workflow to run as soon as the specified event occurs in an external app or service. This kind of triggers is called a webhook trigger.

Here is a list of (webhook) triggers that fire off the workflow as soon as the specified event occurs.

Bit Bucket

Raw Engineering Backend

Campaign Monitor

Contentstack

Drip

Eventbrite

Formstack

Github

Hipchat

Intercom

Jira

Jotform

Mailchimp

Pagerduty

Cisco Webex Teams 

Trello

Wufoo

Wunderlist

Adding a new trigger

Let’s say you want to create a workflow such that When a new to-do item is created in Wunderlist, translate the title text to Spanish, and send the translated text to my email address. For this workflow, you will need to set up the trigger ‘Wunderlist - Task Created’. Let’s look at the steps involved in setting up this trigger.

Step 1: Create a new workflow

To define a new trigger, you need to create a new workflow. To do so, navigate to the project and create a blank workflow. Add Google Translator connector and Send an Email action on canvas and connect them. If you are new to webMethods.io Integration, get more help on creating first workflow.

Trigger_Connection.png


Step 2: Configure Start icon

Trigger is the starting point of a workflow. Therefore, the Start icon houses all the settings related to triggers. Hover on the start icon, and click the Settings icon to add and configure a trigger.

Step 3: Add Wunderlist

A new window will appear where you can see the list of all web services for which webMethods.io Integration supports trigger events. Locate the Wunderlist service from the list of services, and click on it.

Step 4: Configure Wunderlist trigger

Certain fields are common for every trigger.

Trigger Label: Provide a suitable name for the trigger.

Select trigger: Each service has multiple trigger actions to choose from. Select the trigger action of your choice, from the drop down list. For the purpose of this example, we will select the Task Created trigger.

Authorize Wunderlist: Select the account for which you want to set up the trigger, from the drop‐down list. If you have not created an account yet, hover on the + button. You will see two options:

  • Default Authorization: Select this option to allow webMethods.io Integration to automatically generate all keys required to execute all Wunderlist triggers and actions.
  • Or: Select this option to provide the relevant keys required to execute all Wunderlist triggers and actions.

After you have entered these details, click Next. This will redirect you to the trigger configuration window.

Wunderlist_Trigger.png


Apart from these fields, you may see a few other fields, depending on the trigger you choose. You need to enter relevant data in these fields in order to successfully set the trigger. View our documentation on various service-specific triggers to get in-depth info on how to configure each trigger.

Once you enter data in all the fields, click ‘Save’ to save your trigger. This will create the specified trigger on webMethods.io Integration.

Step 5: Test Wunderlist trigger

After this, you will be redirected to the Test trigger window, where you can check if you have configured the trigger settings properly.

Wunderlist_Test.png


To test your trigger, you need to perform the trigger action in the web service account for which you are setting up a trigger (these instructions can be seen in the Test trigger window as well). In this example, Wunderlist - Task Created trigger, you will need to create a new task in the specified list of your Wunderlist account.

Once this is done, go back to your trigger in webMethods.io Integration and click on the Test button given at the bottom of the Test trigger form webMethods.io Integration will then fetch the data of the item your just created in your Wunderlist account.

If you have configured the trigger correctly, you will see the output data for the trigger. This will give you an idea of how your trigger will work when used in a workflow and which keys are returned in the output of the trigger. This output data will then be used to configure the rest of the workflow.

Wunderlist_Test_Pass.png


You can alternatively Skip testing the trigger.

Wunderlist_Skip.png


If you Skip testing the trigger, webMethods.io Integration will use mock data for that trigger to configure the rest of the workflow.

Wunderlist_Skip_Test.png


You can also set custom filters to specify the conditions which must be met in order to execute the workflow. To do this, click on the filters link given at the bottom of the trigger output.

A new window will appear where you can set up custom triggers using the sample output data returned.

Wunderlist_Filters.png

Editing a trigger

There are two ways to edit triggers.

1. From Canvas

2. From ‘Projects’ page

1. Editing trigger from canvas

To edit an existing trigger from canvas, first open the workflow of which the trigger you want to edit and double-click on the ‘Start’ icon (which now has the icon of the service used as a trigger). You will see the list of all triggers of your account that are associated with the service.

21-edit-trigger.png


You will see the Edit icon given against the trigger that is being used in the workflow. When you click on it, it will open up the trigger configuration window where you can make your changes. Once you have made the changes, click on Save.

2. Editing a trigger from Configurations page

To edit an existing trigger, go to your project and then navigate to Configurations > Triggers. You will see all the existing triggers associated with your project workflows.

Trigger_Config.png

Locate the trigger you want to edit and hover over the trigger name. You can see Edit and Delete icon appear beside the trigger name. Click on the Edit icon. 

22-wunderlist-edit.png

A trigger configuration window will appear on screen. Make your changes in the window that appears and click on Test to test the updated trigger settings. Once the trigger has been tested successfully, click on Done to save the trigger settings.

Deleting a trigger

There are two ways to delete a trigger:

  • From the workflow
  • From your webMethods.io Integration account

Deleting a trigger from a workflow

To delete a trigger from any particular workflow follow the steps given below:

Step 1: Go to Workflows and click on the workflow of which the trigger you want to delete.

Step 2: Hover over the Start button and click on the Settings button or double-click on the Start button.

Step 3: You will see a Delete button beside the trigger name in the window that appears. Click on this button. You will be prompted to confirm the delete action. When you click on Yes, it will delete the trigger from that particular workflow.

Note: In case the trigger you want to delete is not being used in any other workflow, it will be permanently deleted from your webMethods.io Integration account.

24-delete-workflow.png


Deleting a trigger from your account

To delete an existing trigger permanently from your account, follow the steps given below:

Step 1: Go to your project and navigate to Configurations > Triggers'. You will see all the existing triggers associated with your project workflows. Locate the trigger you want to delete and hover over the trigger name.

Step 2You will see the Edit and Delete icon appear on window beside the trigger name. Click on the Delete icon.

25-delete-from-proj.png

In case the trigger you want to delete is associated with any workflows, a new dialogue box will open where you will be prompted to delete the trigger from those workflows first. You can navigate to the workflows by clicking the workflow name given in the dialogue box.

26-delete-from-workflow-first.png

Once you have deleted the trigger from those workflows, you can delete it permanently from the project.