This ensures the flow is triggered every time a new message is added to the specified Teams channel.
Optionally, you can use the Format DateTime action if you want to change how the date appears.
Once you've selected the table, Power Automate will automatically show fields for each column in the table.
Message
column.Sender
column.Date
column.In the Compose action, click the Expression tab.
Use the following expression to extract the last 7 digits from the message:
last(split(triggerOutputs()?['body']?['messageBody'], ' '))
If the number isn’t always the last part of the message or if there are other complications, you can use the match() function to extract just digits from the message body:
substring(triggerOutputs()?['body']?['messageBody'], length(triggerOutputs()?['body']?['messageBody'])-7, 7)
This expression splits the message content into an array of words by spaces, and the last()
function gets the last "word," which should be the 7-digit number at the end of the message.
Note: This assumes the 7-digit number is the last "word" of the message. If the number can sometimes be surrounded by text, you may need to refine this based on other patterns.
stampcoin
55
Michael E. Gernaey
39
Super User 2025 Season 1
VictorIvanidze
26