Microsoft Power Automate to "Empty" an AudioFile field
Time to execute: approx. 10 min.
Microsoft Power Automate became the successor of Anywhere365 Timer Jobs. Microsoft Power Automate is capable to do the exact same thing, plus many more things from which you can benefit to deliver the best possible experience to your customers.
Sometimes it may be necessary to clear a populated field in one of your SharePoint lists. For example an AudioFile selected in one of your IVR Interactive Voice Response, or IVR, is a telephone application to take orders via telephone keypad or voice through a computer. By choosing menu options the caller receives information, without the intervention of a human operator, or will be forwarded to the appropriate Agent. Questions needs to be cleared to have a silent anouncement or revert back to the Text-To-Speech mechanism.
In Power Automate replacing a file in a field with "nothing" takes a special approach. Using the custom value "-1" as your AudioQuestionId (and a change on the List settings containing your audio file), will make sure the field will be cleared when being processed by Power Automate.
Getting started
This section will help you to create a flow that is triggered daily on 07:00 PM to clear the Audiofile in the Welcome Message of the IVR.
-
Go to the Dialogue Management, IVR list.
-
Click on the List and then List Settings in the top ribbon.
-
In the Columns section locate the item for the Audio option we need to adjust ‘Audio Question’.
-
In the Edit Column view under the Relationship Section uncheck the Box for ‘Enforce relationship behavior’.
-
Click OK to Save.
-
Navigate to Microsoft Power Automate.
-
Click “Create”
-
Below “Start from blank” select “Scheduled cloud flow”
-
Fill in a descriptive name for the flow, along with the date, time and recurrence. For example:
-
Flow name:
Remove the Audio Question from an IVR Choice
-
Starting:
1/1/2023 at 07:00 PM
-
Repeat every:
1 day
-
-
Click “Create”
-
The following window shows-up
-
-
If you re-open the “Recurrence” action by clicking on it, you can edit the recurrence.
-
If you click “edit”, you will see that the current recurrence is set to 1 day (as set during the creation of the flow).
-
When clicking “advanced”, you will see the start time of the flow. Beware this Power Automate time is in UTC.
-
If your UCC runs in a different time zone, compared to the time zone that you (your browser) are in, please update the start time accordingly (optionally you can set the time zone of the UCC SharePoint Site).
-
-
Next, add a new step to the flow by clicking “New Step”
-
In this step, the Welcome Message will be retrieved from SharePoint.
-
-
In the search box, search for the SharePoint connecter, for example, by typing “SharePoint”, and under “All” click the “SharePoint” icon.
-
Next, search for the term “Get items” and select it.
Note
Please beware there are two similar action names:
- Get item: This action can be used to retrieve a SharePoint item based on its unique identifier. This identifier will change if the Welcome Message is deleted and re-created afterwards.
- Get items (note the trailing letter s): This action can be used to retrieve one or more SharePoint items based on various criteria. For example, the title of the item should be Welcome Message. This results in a less error-prone flow, as such this action is used in this example.
-
After selecting this action, the connection towards SharePoint is tested. Once the connection is established successfully, the following form shows-up:
-
Fill in the Site Address of your UCC
-
If the Site Address does not show-up in the suggestions, scroll to the bottom and select “Enter custom value” and type in the Site Address manually.
-
-
Next, select the List Name “IVRQuestions” from the dropdown
-
Finally, click “Show advanced options”, and fill in the Filter Query.
-
To filter out the Welcome Message, the query should be:
Title eq 'Welcome Message'
-
Other options can be ignored for now.
-
-
-
Again click “New Step” to add a subsequent action
-
In this step, the Welcome Message will be updated.
-
-
In the search box, search for the SharePoint connecter by typing “SharePoint”, and under “All” click the “SharePoint” icon.
-
Next, search for the term “Update item” and select it.
-
Again fill in the Site Address and the List Name “IVRQuestions”.
-
In the Id field select the Dynamic Content “ID” that is retrieved by the previous step “Get items”.
-
As soon as you do this, Power Automate will automatically add a “Apply to each” block around the action “Update item”.
-
This is because the “Get items” action could result in multiple items being retrieved from SharePoint. As such it will update each of the items accordingly.
-
Click on “Update item” to expand the action, and continue with the final configuration.
-
-
In the Title field select the Dynamic Content “Title” that is retrieved by the previous step “Get items”
-
Click into the AudioQuestion Id Value and enter the value of -1 and then chose the option for ‘Use ‘-1’ as a custom value’.
-
The field could look like below (but "-1" wrapped in an Expression is also possible):
-
Finally click “Save”
-
In the top
-
Or the bottom
-
-
Test your flow thoroughly!