Get Cisco Webex Teams space messages and email them

This workflow fetches all the messages of a particular space in Cisco Webex Teams and sends them to the specified recipient’s email address.

To set up this workflow, you will need Cisco Webex Teams application, JSON to HTML action, and Send an Email action.

Add and configure Cisco Webex Teams - Get Space Messages action

The first step is to add Cisco Webex Teams connector to your canvas and use the Get Space Messages action to retrieve the list of all the messages of a particular space. To do this, double-click the Cisco Webex Teams connector icon, select the Get Space Messages action from the Select Action drop down list, and select the Cisco Webex Teams account you want to use to execute the action.

Once this is done, click Next.

In the action configuration form that appears next, provide the details as given below:

Space ID: Select the ID of the space (from the dropdown options) whose messages you want to fetch. You can optionally enter the Space ID manually.

Fetch Messages before Date (Optional): Specify a date if you want to get messages posted before that date.

Fetch Messages before Message (Optional): Specify a message ID if you want to get messages sent before that message.

Number of Messages to be included (Optional): Enter the maximum number of items you want to get in the response.

16-cisco.png


Once you enter the required values in the fields, Click the Next button, Test the action, and click Done to return to the workflow canvas.

Since the output of the Get Space Messages action contains raw JSON data, it is recommended that you use JSON to HTML action to convert JSON into HTML before sending it via email. This will improve the readability of the output.

Add and configure JSON to HTML operation

This action converts any JSON data into HTML format. To implement this, add this operation to your canvas, and connect it with Cisco Webex Teams application. Configure JSON to HTML operation, and enter values in the fields as per the instructions given below:

JSON Data: Use the output of Cisco Webex Teams - Get Space Messages operation as the input value for this field (e.g. {{$a0}}).

Jade template (Optional): Provide a Jade template, if required.

17-json-html.png

Once you enter the required details, click Next, Test the operation, and click on Done to return to integration canvas.

Add and configure Send an Email action

The Send an Email action sends an email to the specified email address. Let’s add this to our canvas, connect it with JSON to HTML operation, and configure it. Enter values in the configuration form input fields as per the instructions given below:

To: Enter the email address of the recipient.

Cc (Optional): Enter the email address of the recipients you want to mark the copy to.

Bcc (Optional): Enter email address of the recipients you want to mark a blind copy to.

ReplyTo (Optional): Enter the email ID on which user can send the reply.

18-mail.png

Once you enter the required details, click Next, Test the operation, and click on Done to return to integration canvas.

Save and test the workflow

Now that your connector and both the applications have been configured, SAVE your workflow. Click Test to manually execute the workflow.

As soon as the workflow starts its execution, you will see real-time indicators showing the progress of the workflow. Once the execution is completed, you will receive an email that contains all the messages of the specified Cisco Webex Teams space in the HTML format.