Test and Debug workflows in Workflow Builder

Pbmacintyre
RingCentral Developers
6 min readFeb 23, 2024

RingCentral Intelligent Workflow Builder™ allows you to create automated workflows for RingCentral’s cloud based products. This can all be done without the need for a computer programmer.

In this tutorial I’ll show you how you can test and debug your workflows.

To get started, after you log into Workflow Builder you will be taken to the dashboard area that lists all your existing workflows, if you have any. It may look like that shown in figure 1.

Figure 1 — Workflow Builder dashboard

In our example we are wanting to test the “SMS Product Support Request” workflow. This workflow was built to respond to a received SMS message if it contained the text of “support request” and then if it contained the text of “SMS granted”. It is shown in figure 2, below. In the first condition [1], if the incoming SMS text contains the words “support request”, we want to post a note to a Team Messenger chat group [2] with the full text of the received SMS.

Hopefully, the incoming text will be descriptive and concise enough that the support team can lend assistance. In our workflow the group receiving the note about a new support request is called “Messenger Tests”, but this can be updated to any individual or group chat that the account has access to. The next condition [3] is another query into the incoming text to see if the string “SMS granted” is also contained within it. If the case is true [4] then we send a courteous SMS message back to the sender telling them that the message was received and that it would be worked on as soon as possible. We take no action on the false conditions of either case.

Figure 2 — The workflow’s logical path

Testing a workflow

Once you have your workflow designed to a point where you want to test it you can save it and then test it by clicking the “Save & Test” button at the top right of the design area. If you have already saved the workflow you will just see separate “Test” and “Save” buttons.

Either way the “Test automation” screen will display and you can enter in any sample information that the workflow needs. In our case we need to provide a sender’s mobile number [1], the recipient’s mobile number [2], and the body of the text message [3] that we want to send. We can change the sender’s name if we like, but “John Doe” is fine for testing purposes. The test screen should look like figure 3. The other information that is on the test form is not required to run a test on our current workflow so you can leave those values all as they are by default.

Figure 3 — Workflow testing screen

If you look at the logical flow of the workflow you will see that based on the content of the message text this should do nothing and fall down through the initial “false” side of the process. Here is the result screen of the test.

We received a successful result because our workflow acted as we expected. We can click “Test again” to perform more tests on different scenarios. As we perform other tests on different text message content we can see the results each time. See the series of “good” tests that follow.

The above sample text returns this result screen. [1] shows the condition being tested and its result (true), [2] shows the success of sending a note to the designated Team Messaging group, and [3] shows the result of the second conditional test of looking for “SMS granted” within the message. Overall it is still a successful test as the workflow performed as desired.

To prove that [2] worked above, here is a screenshot of my Team Messaging Group that I sent the note to.

If we run the test again with all the content in the message that we are looking for we should see the following sequence.

1. A Team Messenger note

2. An SMS message to the sender

3. The test result screen

If any of the process steps fail, for example a bad phone number was used, then the error will be identified as accurately as possible by the Builder environment. You should see a test result screen similar to this,

Seeing the results on an active workflow

All of the above tests have been performed on the workflow while it was being built or edited in the workflow design area. After you complete your workflow and “Enable” it, there is another way to see the results of its activities. Figure 4 shows the sending and receiving of a test SMS message to the phone number that the workflow will respond to.

Figure 4 — SMS text sent and Workflow SMS response

RingCentral Workflow Builder also keeps a results log of your workflow when it runs. You can view your log on the dashboard screen by clicking on the ellipsis sub-menu (“…”) [1] for the workflow in question and select “View history” [2]. Figure 5 shows this for you.

Figure 5 — Selecting the View history page from the dashboard

You should then see a log of activity that your workflow has generated so far. Here is a screen showing the logs for our workflow with 4 triggering events listed on it; 3 were successful and one has an error.

If you click on the “i” icon to the right of the status code “SUCCESS” or “ERROR” [1] you can see the details of the particular event. The details of the ERROR log look like this:

RingCentral Intelligent Workflow Builder is a great time saver when your workflows perform as desired. Workflows can grow to be quite complex and sometimes hard to follow so it is a good idea to test your workflows thoroughly before they are enabled. Be sure to also occasionally check the log page to ensure that your workflow is running at its best.

You can try out Workflow Builder yourself and play with its many potential scenarios by going here and logging in with your RingCentral account or you can read more about the platform here.

--

--

Pbmacintyre
RingCentral Developers

Peter has over 35 years of experience in IT, primarily in PHP. Author of PHP: The Good Parts; co-author: Programming PHP-4th Ed. Zend certified in PHP 5.3 & 4.0