cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
glura
Level: Powered On

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

 

 

Community Support Team
Community Support Team

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.

glura
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,733)