Creating first workflow

Start automating your tasks by creating workflows in webMethods.io Integration. Understand how to add and configure trigger and actions to your workflow and then test the workflow to ensure that it’s working as expected.

Creating a workflow is fun and easy with webMethods.io Integration. This tutorial will take you through the six simple steps involved in creating a basic workflow.

1. Select or add a project

Once you log in, you will be redirected to the dashboard. Here, you will see a Default project, and the + New Project option to create a new project. Projects are like folders that save your workflows within them and help you categorize your workflows. Read more about Projects.

Click on the Default project to create a new workflow within it.

You can optionally choose to create a new project. To do so, click on the + New Project button and provide a unique name for the project in the dialogue box that appears. When you click Create, you will be navigated to the Workflows screen, where you can start creating your first workflow.

2. Create a blank workflow

To create a new workflow, click the + New Workflow button. This will redirect you to a new window where you can choose one of the following options to create a workflow:

Core components of a workflow

A workflow is essentially made up of two elements: A trigger and one or more actions. A trigger is something that fires off a workflow, and actions are the tasks that the workflow performs automatically.

Let’s create a simple workflow: Whenever you post a new tweet in Twitter, send the tweet content to a Slack channel.

If we break this workflow into parts, we get:

Let’s start with setting up the trigger.

3. Set up a trigger

To get started with triggers, hover on the Start icon, and click the Settings icon that appears. A pop-up window will appear where you will see the list of trigger applications supported by webMethods.io Integration. Each of these applications has multiple triggers. Scroll down to locate the application you want, or search at the top if you have a specific application in mind.

In this case, we will look for Twitter and select it. This will redirect you to the trigger configuration window for Twitter.

a. Configure Twitter - New Tweet or Retweet Posted by Me trigger

We will now configure the New Tweet or Retweet Posted by Me trigger. To do this, enter details in the input fields as per the instructions given below:

Select one of the options, provide the required information as prompted on the screen, and click Add.

This will create a new account for your Twitter account. Once you create an account, you can use it to execute all other Twitter actions and triggers.

Once you have entered all the details, click on SAVE to save your trigger.

This will create the specified trigger on webMethods.io Integration and redirect you to the Test trigger window, where you can check if you have configured the trigger settings properly.

b. Test the configured trigger

To test your trigger, you need to perform the trigger event in the web service account for which you have set up the trigger (these instructions can be seen in the Test trigger window as well). For this example, go to your Twitter account and post a new tweet.

Once this is done, go back to your canvas in webMethods.io Integration and click on the Test button given at the bottom of the Test trigger form webMethods.io Integration will now fetch the data of the tweet that you just posted on your Twitter 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.

Alternatively, if you don’t want to test the trigger, you can click the Skip button.

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

c. Set up filters for your trigger

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.

You will be redirected to the Filters window where you can set up conditions. Click here to know more about how to set up conditions with filters.

Once you have entered all the details, click on DONE. And that’s it! Your Twitter - New Tweet or Retweet Posted by Me trigger has been configured.

When you return to the canvas, you will notice that the start icon has now been replaced with the Twitter icon. This confirms that the Twitter trigger has been set up properly.

Let’s now set up the action.

4. Set up an action

For this example, we need to set up the Slack - Post Message to Channel action, which automatically posts contents of the tweet to the specified Slack channel. Here’s how to do it:

a. Drag-and-drop the connector on canvas

On the right-hand side of the canvas, under Connectors, look for Slack, and drag-and-drop it anywhere on the canvas. You will see that it gets automatically connected to the Start icon (which is now Twitter icon).

b. Configure Slack - Post Message to Channel action

Double-click on the Slack connector icon. A pop-up window will appear on screen where you can see the configuration form for the Slack actions.

For our example, we need to configure the Slack - Post Message to Channel action. To do so, provide values for the input fields as instructed below:

If you are already logged in to your Slack account, you will be prompted to grant webMethods.io Integration the permission to access your Slack account. Click Allow. (If you are not logged in, you will be prompted to login first.)

On the next screen, you will be prompted to install the webMethods.io Integration app for your Slack workspace. Click Install.

This will redirect you back to the canvas. A dialog box will appear where you can optionally change the name of the account you are about to create. Once this is done, click Add.

With this, your Slack account is successfully created. You can now use this account to configure any Slack triggers or actions.

After this, click Next.

This will redirect you to the Post Message to Channel action configuration window.

Configure the Post Message to Channel action as per the instructions given below:

Once you have entered all the details, click Next. This will take you to the Test action window, where you can check if you have configured the action correctly.

c. Test the configured Slack - Post Message to Channel action

In the Test action window, you can see two tabs: INPUT and OUTPUT. By default, the INPUT tab is open, which displays the input details you have entered for the Slack - Post Message to Channel action.

Scroll down and click on the Test button to check if you have configured the action properly.

When you click on the Test button, webMethods.io Integration will post a message containing the tweet on the specified Slack channel, and will show the output of this action in the window that appears.

This lets you check whether the action is working as expected and also fetches the sample output for this action, which can be used while setting up the next actions.

Just like trigger, you can optionally set up filters for your actions. The process to set up filters for actions remains same as explained here. Once you have entered all the details, click on Done. This will take you back to canvas.

5. Complete and save your workflow

Your workflow is not complete until you:

With this, you have successfully created your first workflow. It is now time to test it.

6. Trigger your workflow

To trigger the workflow, we will reproduce the trigger event that we defined in our workflow. In other words, we will post a new tweet on Twitter, which should trigger our workflow.

To do this, log in to your Twitter account, and post a tweet. As soon as you do this, the workflow will be executed.

Note: Some trigger events may take time to trigger the workflow. Read Types of triggers to know more.

You will see the real-time visualization of the progress of your workflow. This will all happen in a matter of seconds. Once the workflow is completed, check the specified Slack channel. You must have received a message containing the tweet.

Now that you know the basics of creating a workflow, read our Additional Features section to learn about the various tools that you can use to further customize your workflows.