Creating an email action

An email action is a type of action that sends an email. You can create an action by using a curl command or by using the Swagger UI for the WebSphere Automation REST API.

About this task

You must have access to the WebSphere Automation REST API, and you must authenticate with Red Hat OpenShift Container Platform administrator credentials by clicking Authorize on the Swagger UI page.

Creating an email action in WebSphere Automation

Because a webhook action is a type of action, make sure that you are familiar with the process to create an action.

  1. Do the first three steps in the instructions for creating an action.
  2. After you click Try it out, open the Examples menu and select EmailActionCreationRequest.

    The example request body is populated with a sample email action.

  3. Edit the request body to set the parameters and values you want.

    Ensure that the value of the type parameter is email, and enter the details about the email action into the configuration parameter.

Refer to the following example for a valid configuration section.

  "configuration": {
    "host": "an.email.server",
    "port": 465,
    "user": "john.doe@example.com",
    "password": "passw0rd",
    "senderEmail": "john.doe@example.com",
    "emails": [
      "name": "jane.doe@example.com",
    ]
  },

Email actions are not yet fully implemented. The contents of the emails cannot be changed, and the single email action is used for all emails that are sent.

What to do next

To invoke an action, you must create a trigger.