cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Dual Super User
Dual Super User

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

@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

 

 

Highlighted
Community Support
Community Support

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

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.

Highlighted
Frequent Visitor

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

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (5,125)