Use Case - Creating Tasks in Planner for All Nimbus Service Calls

Create different tasks in Microsoft Planner depending on the outcome of a call.

In this Use Case we want to create different tasks in Microsoft Planner depending on the call outcome:

  • Missed Calls without leaving a voice message shall create call back tasks
  • Missed Calls with a voice message left shall create tasks with the voice message content
  • Handled Calls should create follow-up tasks for the Agent who handled the call.

Each case will result in a different Power Automate flow. We will therefore need to create 3 flows.

PRECONDITIONS

  • A Nimbus Service has been set up.
  • You require service owner rights to make changes to the service Workflows and Nimbus Configuration. This also allows you to share the Planner task list within the MS Teams channel of your Service.
 

INC Icon Legend Accordion

Show Icon Legend

💡 = A hint to signal learnings, improvements or useful information in context. 🔍 = Info points out essential notes or related page in context.
☝ = Notifies you about fallacies and tricky parts that help avoid problems. 🤔 = Asks and answers common questions and troubleshooting points.
❌ = Warns you of actions with irreversible / data-destructive consequence. ✅ = Intructs you to perform a certain (prerequired) action to complete a related step.
 
 

Create the planner list and buckets

Add a new Tab on your team and create a new planner list. Add 3 buckets to it

  • Call back
  • Follow-up
  • Voicemail

Here is a preview of what we expect to see, once the Power Automate flows are all set up:

Configuration in Nimbus

In Nimbus we need to create a new Parameters and set up the Workflow:

  1. Create a Parameter named "WentToVoiceMail" and set its value to -1 .
  2. Tn the Workflow:, before sending any calls to a “Voice message” Activity, set the value of this parameter.
    We can use the activities "Save To Parameter “ or ”Collect Information" to do so.
  3. Finish your workflow as needed (e.g. with Voice Message and Caller disconnect). 

Now it's time to prepare the flows in the background.

Flow 1: After every handled call, create a follow-up task in Planner

Create a new Power Automate flow and name it: "<Nimbus Service Name>- Follow-up Task on ConnectedToUser in Planner".

Show Flow Overview

 
 

The flow steps are explained in the following.

Description
Settings
Element
To trigger the flow, begin with "When a task changes state" from the Nimbus Connector and listen to the Connected to User event.
  • Service Item = Your Nimbus service
  • Task Events Item = Connected to User

 

Now add a "Create a task" action from the Planner connector to the flow. 
  • Group Id = Your Nimbus Team
  • Plan Id = The name of the planner list from step 1
  • Title = "Folllow-up on call with @{triggerOutputs()?['body/microsoftCallerId']}(@{triggerOutputs()?['body/customer/displayName']})
  • Bucket Id = Follow-up
  • Assigned User Ids = @triggerOutputs()?['body/LastConnectedUserUPN']

💡 We also set the label Blue to Yes to help distinguish the task in planner.

Add a "Update task details" activity to the flow. 

We also want to see the Voice message link on the task. 

  • Task Id = @{outputs('Create_a_task')?['body/id']}
  • Alias - 1 = CRM link to customer
  • Resource Link - 1 = @concat('https://tel.search.ch/?was = ', triggerOutputs()?['body/microsoftCallerId'])
  • Type Of The Reference - 1 = Other

💡 The reference link could be your customer CRM's URL.

Flow 2: On missed calls without voice message left, create a call-back task in Planner

Create a new Power Automate flow and name it: "<Nimbus Service Name> - Callback on WentToVoicemail = -1 and LastConnectedUser null in Planner".

Show Flow Overview

 
 
Description
Setting
Element
To trigger the flow begin with "When a task changes state" from the Nimbus Connector and listen to the Terminated event.
  • Service Item = Your Nimbus service
  • Task Events Item = Terminated
Add an "Filter array" activity to the flow to filter the WentToVoiceMail parameter value from all the custom context parameters.
  • From = @triggerOutputs()?['body/taskInformation/customContextParameters']
  • Filter Query =

 1. @{item()?['Name']}

2. is equal to

 3. WentToVoiceMail

Add an "Initialize variable" action to the flow to store the WentToVoiceMail parameter's value.
  • Name = WentToVoiceMail 
  • Type = Integer
  • Value = first(body('Filter_array'))?['Value']
Add another "Initialize variable" action to the flow to store the LastConnectedUserId parameter's value..
  • Name = LastConnectedUserId
  • Type = String
  • Value = @triggerOutputs()?['body/lastConnectedUserId']
Add a "Condition" action to the flow. We need to check if LastConnectedUserId is null
  • @{variables('LastConnectedUserId')}
  • is equal to
  • <leave blank>

In the "True" branch we want to go further.

Add a "Condition" action to the flow. We need to check if a voice message has been recorded. If not, then we want to create the call back task.

If the user pressed any key (as indicated in our workflow), then the call went to the voicemail workflow activity.

  • @{variables('WentToVoiceMail')}
  • is greater than or equals
  • 0

In the "False" branch we want to go further.

Add a "Create a task" action to the flow. 

This allows us to create a task in planner. 

  • Group Id = Your Nimbus Team
  • Plan Id = The name of the planner list from step 1
  • Title = triggerOutputs()?['body/microsoftCallerId']
  • Bucket id=Call back

💡 We also set the label Red to Yes to help distinguish the task in planner,

We also want to set some details on the task. Add a "Update task details" action to the flow. Add information according to your own use case. 
  • Task Id = @outputs('Create_a_task')?['body/id'] 
  • Description = Missed a call from @{triggerOutputs()?['body/taskInformation/customer/displayName']}, @{triggerOutputs()?['body/microsoftCallerId']}
  • References Alias - 1 = CRM link to customer
  • Reference Response Link - 1 = @concat('https://tel.search.ch/?was =', triggerOutputs()?['body/microsoftCallerId'])

We also add a checklist item "Call back" and set it to False.

Flow 3: For every voice message left, create a voice-message handling task in Planner

Create a new Power Automate flow and name it: "<Nimbus Service Name> - Voicemail Task on Received Voicemail Card in Planner".

Show Flow Overview

 
 
Description
Setting
Element

We know that Nimbus Voice messages create Adaptive cards in Teams. 

Therefore, begin the flow with a Teams trigger "When a new channel message is added".

  • Team = Your Nimbus service
  • Channel = Select the channel that is configured in Nimbus to send the Voice Message adaptive cards to.

Add a "Initialize variable" action to the flow.

From the Adaptive Card, we want to get to the VoiceMessageUrl.

  • Name = VoiceMessageUrl
  • Type = String
  • Value = json(triggerOutputs()?['body/attachments'][0]['content'])['actions'][0]['url']

💡You might need to use ['body'][0]['attachments'][0]['content'] instead of ['body/attachments'][0]['content'] due to Microsoft changes already effective in many tenants.

Add another "Initialize variable" action to the flow.

From the Adaptive Card, we want to get the Title text.

  • Name = VoiceMessageText
  • Type = String
  • Value = json(triggerOutputs()?['body/attachments'][0]['content'])['body'][2]['items'][0]['text']

💡You might need to use ['body'][0]['attachments'][0]['content'] instead of ['body/attachments'][0]['content'] due to Microsoft changes already effective in many tenants.

Now add a "Condition" action to the flow. We need to check on the Url. 

Only if a voice message has been left, we want to create the task in planner.

  • @length(variables('VoiceMessageUrl'))
  • is greater than
  • 0

In the “True” branch, add a "Create a task" action to the flow. 

We set the title to the Voice Message adaptive card text.

  • Group Id = Your Nimbus Team
  • Plan Id = The name of the planner list from step 1
  • Title = @variables('VoiceMessageText')
  • Bucket id=Voicemail

💡 We also set the label Yellow to Yes to help distinguish the task in planner,

We also need to add the Voicemail Url as a link to the task.

Add a "Update task details" to the flow. Add information according to your own use case.

  • Task Id = @outputs('Create_a_task')?['body/id']
  • Description = Voicemail from @{triggerOutputs()?['body/taskInformation/customer/displayName']}, @{triggerOutputs()?['body/microsoftCallerId']}
  • References Alias - 1 = Download link
  • Reference Response Link - 1 = @variables('VoiceMessageURL')

Table of Contents