cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Taylor_BHC
Regular Visitor

Twilio - Automatic Appointment Reminders 1 day in advance

Apologies if this is not the right board.

 

Currently I am trying to setup a Flow that scans a Calendar for upcoming Appointments (1 day in advance) and sends an SMS message (via Twilio - currently configured with no issues) to the person that appointment is for.

 

Our external scheduling software can be imported into an Outlook Calendar. It generates a unique Number (called an MR #) assigned only to that person that is included in the body of the event once imported.

 

If I create a sharepoint list that includes their mobile number and and their MR # in separate columns, how would I configure the Flow to conditionally search the Body of the upcoming for that MR #, if that MR # matches the MR # in the Sharepoint list, send an SMS via Twilio to the Mobile Number associated with the MR #. 

 

Or in other terms I want the Flow to look like:

 

[When an Event is Upcoming - 1440minutes look ahead] - if [Event Body] CONTAINS [ANY MR# from Sharepoint List] then Send a Twilio SMS to [Mobile Number Associated with MR #]

 

I hope this is not confusing to understand. It has been plaguing me for weeks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @Taylor_BHC,

 

How does the event body look like? What’s the column type of the MR# in SharePoint list?

 

I have made a simple flow for your scenario, please take it for a reference.

 

The event body contains just a MR#, and the MR# in the SharePoint list is of type Single line of Text.

2.PNG

 

Note: To get the unique MR# in the event body, make sure the MR# is always placed in the same place so that you could extract them from the body properly. And let's say that the MR# are in the same length.

 

And for testing, I used the trigger “When an event is added, updated or deleted”, you could change it to the trigger “When an event is coming soon” on your side.

 

Then use the action Html to text to convert the email body to plain text.

 

In action Compose, use the following function:

length(body('Html_to_text'))

 

In action Compose1, use the following function:

add(indexOf(body('Html_to_text'),'MR#:'),4)

 

In action Compose2, use the following function:

substring(body('Html_to_text'),outputs('Compose_2'),sub(outputs('Compose'),outputs('Compose_2')))

 

Then Get items from SharePoint list.

 

Add a Condition to check if the items from the list contains the unique number returned from Compose3.

 

If yes, send Text message(SMS).

 

 

1.PNG

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yamao-msft
Community Support
Community Support

Hi @Taylor_BHC,

 

How does the event body look like? What’s the column type of the MR# in SharePoint list?

 

I have made a simple flow for your scenario, please take it for a reference.

 

The event body contains just a MR#, and the MR# in the SharePoint list is of type Single line of Text.

2.PNG

 

Note: To get the unique MR# in the event body, make sure the MR# is always placed in the same place so that you could extract them from the body properly. And let's say that the MR# are in the same length.

 

And for testing, I used the trigger “When an event is added, updated or deleted”, you could change it to the trigger “When an event is coming soon” on your side.

 

Then use the action Html to text to convert the email body to plain text.

 

In action Compose, use the following function:

length(body('Html_to_text'))

 

In action Compose1, use the following function:

add(indexOf(body('Html_to_text'),'MR#:'),4)

 

In action Compose2, use the following function:

substring(body('Html_to_text'),outputs('Compose_2'),sub(outputs('Compose'),outputs('Compose_2')))

 

Then Get items from SharePoint list.

 

Add a Condition to check if the items from the list contains the unique number returned from Compose3.

 

If yes, send Text message(SMS).

 

 

1.PNG

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

This is very helpful. 

The MR # in the body looks like "Client Appointment with MRN XXXX" (MRN is always a 4 digit Number). The Column type for the MR # in the list is a Single Line of Text.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,139)