Use Case - Property Management Customer Service with Nimbus, Teams, and HubSpot

Build a properties management customer service with Nimbus, Teams, and Hubspot for various use cases.

Consider, we are a property management company. We have the following Use Cases:

When a NEW Customer calls,

  • ... the new contact needs to be created in HubSpot
  • ... any Agent can respond to the call
  • ... the Agent needs to complete the contact form of the Customer 

When a KNOWN Customer calls,

  • ... and the Customer has a property viewing booked, they wants to speak to the person they will meet at the property.
  • ... and the Customer has no active tasks in the CRM, any agency Agent can respond.
  • ... the CRM contact page of the Customer needs to pop-up when the call gets distributed to the Agent.

PRECONDITIONS


💡 For visualization we use HubSpot as example CRM. You can of course substitute this lookup with any other CRM of your own preference. 

 

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.
 
 

Build the caller identification power automate flow

Build the flow as described in Use Case - Looking up caller information in HubSpot

Extend the Nimbus configuration

First, we need to create two new Parameters in Nimbus:

  • Parameter 1: Name= PreferredAgent; Value=Empty
  • Parameter 2: Name= hasbookings; Value=false

Then we change the existing workflow to the following:

 Workflow Overview

 
 
Description
Screenshot

The "Check Parameter" activity verifies if the Customer has an active property viewing booked in the CRM using the hasBookings parameter that will be set by the power Automate flow.

 

 

The "Transfer" activity will transfer to the preferred Agent if the Customer has an active property viewing booked in the CRM:

 

Prepare the adaptive cards

The following table summarizes the scenarios and the different Adaptive Cards to send.

Call Scenario Workflow Activity Adaptive Card

Incoming call

new Customer

A new Customer calls.

  • The new contact needs to be created in HubSpot.
  • An Agent needs to complete the contact form of the Customer 

Queue call

 

We want the contact to be created automatically and send an Adaptive Card to the teams channel of the service with the following content:

 

 Show Json of this Card

JSON
                                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                                   "type": "AdaptiveCard",
                                                                                                                                                                                                                                                                                   "body": [
                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                           "size": "Medium",
                                                                                                                                                                                                                                                                                           "weight": "Bolder",
                                                                                                                                                                                                                                                                                           "text": "Contact Created"
                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                           "type": "ColumnSet",
                                                                                                                                                                                                                                                                                           "columns": [
                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                   "type": "Column",
                                                                                                                                                                                                                                                                                                   "items": [
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "Image",
                                                                                                                                                                                                                                                                                                           "style": "Person",
                                                                                                                                                                                                                                                                                                           "url": "https://portal.luware.cloud/images/shared_Nimbus.png",
                                                                                                                                                                                                                                                                                                           "size": "Small"
                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                   "width": "auto"
                                                                                                                                                                                                                                                                                               },
                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                   "type": "Column",
                                                                                                                                                                                                                                                                                                   "items": [
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                           "weight": "Bolder",
                                                                                                                                                                                                                                                                                                           "text": "Nimbus Power Automate Flow",
                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                           "spacing": "None",
                                                                                                                                                                                                                                                                                                           "text": "Created @{formatDateTime(utcNow(),'g')} ",
                                                                                                                                                                                                                                                                                                           "isSubtle": true,
                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                   "width": "stretch"
                                                                                                                                                                                                                                                                                               }
                                                                                                                                                                                                                                                                                           ]
                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                           "text": "New call from unknown Customer  @{triggerOutputs()?['body/microsoftCallerId']}",
                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                   "actions": [
                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                           "type": "Action.OpenUrl",
                                                                                                                                                                                                                                                                                           "title": "Please review contact in HubSpot",
                                                                                                                                                                                                                                                                                           "url": "@{concat(variables('HubSpotBaseContactUrl'), body('Create_Contact')?['vid'])}"
                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                   "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                                                                                                                                                                                                                                                                                   "version": "1.3"
                                                                                                                                                                                                                                                                                }
 
 

Incoming call

known Customer

A known Customer calls

  • The Customer has a property viewing booked
  • They wants to speak to the person they will meet at the property

Transfer to the Agent from the booking in HubSpot.

 

We want to inform the team and send an adaptive card to the teams channel of the service with the following content: 

 

 Show Json of this Card

JSON
                                                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                                                   "type": "AdaptiveCard",
                                                                                                                                                                                                                                                                                                   "body": [
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                           "size": "Medium",
                                                                                                                                                                                                                                                                                                           "weight": "Bolder",
                                                                                                                                                                                                                                                                                                           "text": "Incoming Call"
                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "ColumnSet",
                                                                                                                                                                                                                                                                                                           "columns": [
                                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                                   "type": "Column",
                                                                                                                                                                                                                                                                                                                   "items": [
                                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                                           "type": "Image",
                                                                                                                                                                                                                                                                                                                           "style": "Person",
                                                                                                                                                                                                                                                                                                                           "url": "https://portal.luware.cloud/images/shared_Nimbus.png",
                                                                                                                                                                                                                                                                                                                           "size": "Small"
                                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                                   "width": "auto"
                                                                                                                                                                                                                                                                                                               },
                                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                                   "type": "Column",
                                                                                                                                                                                                                                                                                                                   "items": [
                                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                                           "weight": "Bolder",
                                                                                                                                                                                                                                                                                                                           "text": "Nimbus Power Automate Flow",
                                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                                           "spacing": "None",
                                                                                                                                                                                                                                                                                                                           "text": "Created @{formatDateTime(utcNow(), 'g')} ",
                                                                                                                                                                                                                                                                                                                           "isSubtle": true,
                                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                                   "width": "stretch"
                                                                                                                                                                                                                                                                                                               }
                                                                                                                                                                                                                                                                                                           ]
                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                           "text": "Incoming call from @{concat(outputs('FirstResult')?[0]['properties']['firstname'], ' ', outputs('FirstResult')?[0]['properties']['lastname'])}, @{triggerOutputs()?['body/microsoftCallerId']}. Outstanding booking. Call will be transferred to Agent @{body('Search_Agent_of_the_booking')?['email']}",
                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                   "actions": [
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "Action.OpenUrl",
                                                                                                                                                                                                                                                                                                           "title": "Open contact in HubSpot",
                                                                                                                                                                                                                                                                                                           "url": "@{concat('https://app-eu1.HubSpot.com/contacts/26074486/contact/', outputs('FirstResult')?[0]['id'])}"
                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                   "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                                                                                                                                                                                                                                                                                                   "version": "1.3"
                                                                                                                                                                                                                                                                                                }
 
 

Incoming call

known Customer

The Customer has no active tasks in the CRM, any agency Agent can respond

 

Queue call

 

 

 Show Json of this Card

JSON
                                                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                                                   "type": "AdaptiveCard",
                                                                                                                                                                                                                                                                                                   "body": [
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                           "size": "Medium",
                                                                                                                                                                                                                                                                                                           "weight": "Bolder",
                                                                                                                                                                                                                                                                                                           "text": "Incoming Call"
                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "ColumnSet",
                                                                                                                                                                                                                                                                                                           "columns": [
                                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                                   "type": "Column",
                                                                                                                                                                                                                                                                                                                   "items": [
                                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                                           "type": "Image",
                                                                                                                                                                                                                                                                                                                           "style": "Person",
                                                                                                                                                                                                                                                                                                                           "url": "https://portal.luware.cloud/images/shared_Nimbus.png",
                                                                                                                                                                                                                                                                                                                           "size": "Small"
                                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                                   "width": "auto"
                                                                                                                                                                                                                                                                                                               },
                                                                                                                                                                                                                                                                                                               {
                                                                                                                                                                                                                                                                                                                   "type": "Column",
                                                                                                                                                                                                                                                                                                                   "items": [
                                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                                           "weight": "Bolder",
                                                                                                                                                                                                                                                                                                                           "text": "Nimbus Power Automate Flow",
                                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                                           "spacing": "None",
                                                                                                                                                                                                                                                                                                                           "text": "Created @{formatDateTime(utcNow(), 'g')} ",
                                                                                                                                                                                                                                                                                                                           "isSubtle": true,
                                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                                   "width": "stretch"
                                                                                                                                                                                                                                                                                                               }
                                                                                                                                                                                                                                                                                                           ]
                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "TextBlock",
                                                                                                                                                                                                                                                                                                           "text": "Incoming call from @{concat(outputs('Compose')?[0]['properties']['firstname'], ' ', outputs('Compose')?[0]['properties']['lastname'])}, @{triggerOutputs()?['body/microsoftCallerId']}. No bookings found.  Call enqueued.",
                                                                                                                                                                                                                                                                                                           "wrap": true
                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                   "actions": [
                                                                                                                                                                                                                                                                                                       {
                                                                                                                                                                                                                                                                                                           "type": "Action.OpenUrl",
                                                                                                                                                                                                                                                                                                           "title": "Open contact in HubSpot",
                                                                                                                                                                                                                                                                                                           "url": "@{concat(variables('HubSpotBaseContactUrl'), outputs('Compose')?[0]['id'])}"
                                                                                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                                                                                   ],
                                                                                                                                                                                                                                                                                                   "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                                                                                                                                                                                                                                                                                                   "version": "1.3"
                                                                                                                                                                                                                                                                                                }
 
 

Extend the Power Automate flow

Here is an overview of the whole flow

 
 

Add two more Initialize variable steps after the Initialize variable 2 step:

  1. In the editing area click to add a new action.
  2. Search for "initialize variable" and select “Initialize variable” under the “Variable” section.
  3. Rename the new action to Initialize variable 3.
  4. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Name HasBooking
Type String
Value false
  1. In the editing area click to add a new action.
  1. Search for "initialize variable" and select “Initialize variable” under the “Variable” section.
  2. Rename the new action to Initialize variable 4.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Name AdaptiveCardJSON
Type String
Value leave it empty

Add a Condition step after the Compose step:

  1. In the editing area click to add a new action.
  2. Search for "Condition" and select “Condition” under the “Control” section.
  3. Rename the new action to Check if Contact is known in HubSpot.
  4. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Expression
  • lenght(outputs('Compose'))
  • is greater than
  • 0

Add a Post card in a chat or channel step after the Condition

  1. In the editing area click to add a new action.
  2. Search for "Microsoft Teams" and select “Post card in a chat or channel” under the “Microsoft Teams” section.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Post As Flow bot
Post In Channel
Team Select the team in which you want to post the Adaptive Card
Channel Select the channel within the Team in which you want to post the Adaptive Card
Adaptive Card @{variables('AdaptiveCardJSON')}

Branch: Contact check in HubSpot

✅ Now we need to check the if the contact is known in HubSpot. Both cases are explored in the IF-branches below.

IF NO branch

FALSE - No Contact found

 Overview of the branch

 
 
  1. In the editing area click to add a new action.
  2. Search for "HTTP" and select “HTTP” under the “HTTP” section.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
URI https://api.hubapi.com/contacts/v1/contact
Method POST
Headers

Enter the following key/value pair:

Key
Value
Authorization Bearer @{variables('APIKey')}
Content-Type application/json
Body

Paste the following code into the body:

CODE
                                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                                  "properties": [
                                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                                      "property": "firstname",
                                                                                                                                                                                                                                                                                      "value": "Please update"
                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                                      "property": "lastname",
                                                                                                                                                                                                                                                                                      "value": "Please update"
                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                                      "property": "phone",
                                                                                                                                                                                                                                                                                      "value": "@{triggerOutputs()?['body/microsoftCallerId']}"
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                  ]
                                                                                                                                                                                                                                                                                }
  1. In the editing area click to add a new action.
  1. Search for "variable" and select “Set variable” under the “Variable” section.
  2. Rename the new action to Set adaptive card content.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Name AdaptiveCardJSON
Value Paste the first JSON content from the Prepare the adaptive cards section

 

 
 

IF YES branch

TRUE - Contact is found

Overview of the branch

 
 
  1. In the editing area click to add a new action.
  2. Search for "HTTP" and select “HTTP” under the “HTTP” section.
  3. Rename the new action to Task Search.
  4. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
URI https://api.hubapi.com/crm/v3/objects/contacts/search
Method POST
Headers

Enter the following key/value pair:

Key
Value
Authorization Bearer @{variables('APIKey')}
Content-Type application/json
Body

Paste the following code into the body:

CODE
                                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                                          "filterGroups": [
                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                              "filters": [
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                  "propertyName": "associations.contact",
                                                                                                                                                                                                                                                                  "operator": "EQ",
                                                                                                                                                                                                                                                                  "value": "@{outputs('Compose')?[0]['id']}"
                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                  "propertyName": "hs_task_status",
                                                                                                                                                                                                                                                                  "operator": "EQ",
                                                                                                                                                                                                                                                                  "value": "NOT_STARTED"
                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                  "propertyName": "hs_task_type",
                                                                                                                                                                                                                                                                  "operator": "EQ",
                                                                                                                                                                                                                                                                  "value": "TODO"
                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                              ]
                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                          ],
                                                                                                                                                                                                                                                          "properties": [
                                                                                                                                                                                                                                                            "hs_task_subject",
                                                                                                                                                                                                                                                            "hs_task_status",
                                                                                                                                                                                                                                                            "hs_task_priority",
                                                                                                                                                                                                                                                            "hs_task_type",
                                                                                                                                                                                                                                                            "hs_task_body",
                                                                                                                                                                                                                                                            "HubSpot_owner_id"
                                                                                                                                                                                                                                                          ]
                                                                                                                                                                                                                                                        }
  1. In the editing area click to add a new action.
  1. Search for "Data operation compose" and select “Compose” under the “Data operation” section.
  2. Rename the new action to Bookings.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Inputs
body('Task_Search')?['results']

Add a Condition step after the Compose step:

  1. In the editing area click to add a new action.
  1. Search for "Condition" and select “Condition” under the “Control” section.
  2. Rename the new action to Check if Customer has bookings.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Expression
  • lenght(outputs('Bookings'))
  • is greater than
  • 0
  1. Move your existing Update task step after the Check if Customer has bookings condition as can see it under Overview of the branch.
 
 

 

Branch: Booking check in HubSpot

✅ Now we need to check the if the retrieved actually has a booking. Both cases are explored in the IF-branches below.

IF NO branch

FALSE - Customer has no booking

Click here to expand...

 
 
  1. In the editing area click to add a new action.
  1. Search for "variable" and select “Set variable” under the “Variable” section.
  2. Rename the new action to Set adaptive card content 2.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Name AdaptiveCardJSON
Value Paste the third JSON content from the Prepare the adaptive cards section
 
 

IF YES branch

TRUE - Customer has booking

Click here to expand…

 
 
  1. In the editing area click to add a new action.
  1. Search for "variable" and select “Set variable” under the “Variable” section.
  2. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Name HasBooking
Value true
  1. In the editing area click to add a new action.
  1. Search for "HTTP" and select “HTTP” under the “HTTP” section.
  2. Rename the new action to Task Search.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
URI https://api.HubSpot.com/crm/v3/owners/@{body('Task_Search' )?[ 'results' ][0][ 'properties' ][ 'HubSpot_owner_id' ]}
Method GET
Headers

Enter the following key/value pair:

Key
Value
Authorization Bearer @{variables('APIKey')}
Content-Type application/json
  1. In the editing area click to add a new action.
  1. Search for "variable" and select “Set variable” under the “Variable” section.
  2. Rename the new action to Set adaptive card content 3.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Name AdaptiveCardJSON
Value Paste the second JSON content from the Prepare the adaptive cards section
 
 

Table of Contents