Set up actions for performing specific tasks. Know what an action is, how to add it to workflow and configure it, and how to test actions and the additional actions you can perform on an action.
Actions are the tasks that the workflow performs automatically when triggered. For example, if your workflow is Whenever a new note is created in Evernote, send a mail via Gmail, the first part, that is, Whenever a new note is created in Evernote is the trigger, and the latter part, that is, send an email via Gmail is the action. A workflow can have one or more actions.
Connectors panel
No subtopics in this section
Each connector supported by IBM webMethods Integration provides several actions, which you can use in your workflows to automate your tasks.
All the connectors are listed in the Connectors panel on the right-hand side of the canvas. For the complete list of connectors, click here.
These connectors are segregated into four distinct categories. Let’s learn more about these categories.
Services: The Services category houses all the external web services (known as connectors)—except IoT connectors—supported by IBM webMethods Integration.
Utility: Listed under Utility category are the developer-friendly, custom applications created by the IBM webMethods Integration team. You can use these applications and their associated actions to send HTTP requests, perform complex file actions, and transform your data.
IoT: The IoT category includes all the IoT-based applications supported by IBM webMethods Integration. You can use these applications to easily integrate different IoT devices with IBM webMethods Integration and simplify your day-to-day activities.
Custom: IBM webMethods Integration lets you add custom code to create your own applications and actions. These actions are listed in the Custom category. You can also create new custom actions by clicking on the + icon located beside the Node.js block. Read more on Node.js.
Now that we know what actions are all about, let’s see how to use them in your workflows.
Add and configure an action
You can add one or more actions to a workflow. Let’s understand how to do it with the help of an example. Let’s say you want to send an email notification via Gmail whenever a new card is created in your Trello account.
To do so, first, configure Trello’s New Card trigger. Read more about setting up triggers.
Once you have configured the trigger, search for the Gmail connector in the action panel and drag-and-drop it on the canvas. You will notice that it gets automatically connected to the Trello-New Card trigger.
After this, connect the Gmail connector to the Stop icon to complete your workflow.
Once done, configure your Gmail-Send an Email action by double-clicking the Gmail application icon.
An action configuration window will appear where you need to enter the following details:
Select Action: Select Send an Email action from the drop-down.
Label: Provide a suitable name for this action (for example, Send an Email).
Authorize Gmail: Select the account you want to use to execute the action from the drop‐down list. If you have not created an account yet, click on the + button.
A new pop-up window will appear where you can enter the keys required to create the Gmail authorization.
Once this is done, click Save. This will add the Gmail account.
After this, click Next. This will redirect you to the Send an Email action configuration window.
To: Enter the email ID of the user to whom you want to send the email.
Subject: {any subject of your choice}.
Body: You can use the output of the trigger as an input for this field. The output of the trigger is visible on the left-hand side of the window, under the {trigger_name} - Trigger Data field. When you click on the drop-down arrow given beside the trigger name, you can see the list of trigger output keys along with the sample output values retrieved from the previous trigger test execution.
From the trigger output list, select the text parameter for the Body field. This will include the content (text) of the tweet in the body of the email when the workflow is executed.
Note
It is mandatory to provide values for all the required fields while configuring an action. You can also provide values for optional fields as per your requirements.
Once this is done, click on Next. You will be redirected to the Test action window where you can check if the action is working as expected before executing the workflow.
Note
Testing a Logger action or any other action is supported up to 10 MB. If you test with data greater than 10 MB, you will get a Message size too large error.
After this, click on Done. This will redirect you to the canvas.
Note
Click here for more information about the action input/output log data support.
With this, our action is successfully set up. Now click on the Save button located at the top-right corner of the canvas to save the workflow. You can now check whether the workflow is running as expected, by creating a new card in your Trello account. This will trigger your workflow and send the notification to the specified email address via Gmail.