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
Highlighted
Dual Super User II
Dual Super User II

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,997)