Summary
This article describes a business use case to send an email notification for running Amazon EC2 instances.
Prerequisites
-
User should have a working webMethods.io Integration tenant.
-
User should have a working Amazon account.
Steps
-
Login to webMethods.io Integration tenant and create a Workflow.
-
Drag and drop the Amazon EC2 connector to the workflow palette.
-
Click the Settings to configure the Amazon EC2 connector. Select the describeInstances action and add an account to authorize it.
-
In the next screen, click Next. Test the action and click Done.
-
Drag and drop the Loop to the workflow palette.
-
Click on Settings of Loop to configure it. Select Loop Type as Each Item and map the response from the describeInstances to the Source Array/Object as shown below.
-
In the next screen, click Next. Test the action and click Done.
-
Double click on loop to configure the action for the loop.
-
Drag and drop the Switch under Developer Tools to the workflow palette.
-
Now drag and drop the Send an Email under notification to the workflow palette. This should be connected to the Switch in step 9.
-
Click on Settings of Case 1 to configure the condition. Add a condition that should send an email notification when the Amazon EC2 has running instances as shown below.
-
Click the Settings to configure the Send an Email. Click Done on the next screen that appears.
-
Provide the necessary inputs to send an email. Map the fields from the describeInstances response if required.
-
Skip testing the action in the next screen, then click on Done.
-
Now, the loop should appear as shown below.
-
Save and execute the workflow. Check the execution history for the results.