cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
glura
Frequent Visitor

automated reply to new Team's channel message when a string is not found in message

I would like to build a flow that would reply to a new Team's channel message when a string of a specific format is not in the message.  So it would be:

  1. New message is posted to channel, triggering flow.
  2. The flow searches new message text for a string that matches:
    1. Length = 15
    2. only contains numbers
    3. starts with 1  (this could be optional, or maybe instead of only contains numbers)
  3. If no string is found matching the above criteria, automatically reply to the message.  If a string is found matching the above criteria, no auto reply is needed.

 

I have the steps to automatically reply to a message, but am not sure how to accomplish the search in #2 and reply if needed.  I'm assuming it's done using expressions and I haven't worked with those yet as I have just begun messing around with Flow.

Any suggestions?

 

thanks,

gary

3 REPLIES 3
RezaDorrani
Dual Super User II
Dual Super User II

@glura 

 

for only numbers use expression int(dynamiccontentstring)

 

This will succeed for number and throw error(fail for non numeric)

You can then use configure run after settings for next action (based on failed case) and send email if non-numeric

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

v-alzhan-msft
Community Support
Community Support

Hi @glura ,

 

Does the whole message would be the string that you mentioned?

 

If the whole message would be the string that you mentioned, then your requirement could be achieved, and please let me know an d I would offer you the workaround.

 

Best regards,

Alice       

 

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

Hi Alice, yes, the whole message is what I'm searching through.  I'm not a developer but I think of it as something like this.

Parse the message and put each word in to the element of a variable array.

Check each element of the array to see if contains a string of 15 characters.

If a 15 character string is found, check if they are all numbers.  If so, flow is done and do nothing.

If a 15 character string is NOT found, automatically reply to the message.

 

The scenario is a user posts a new question on a Team channel.  The flow would verify that this message includes a 15 charater ID.  If it does, there is nothing to do.  If it does NOT, the flow should automatically reply to that message, requesting the user post the ID.

 

Thanks,

gary

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,351)