John Liu Blog

Every drop counts

Power Automate extract email alias address

One can use Azure PowerAutomate to process files received via email. We can setup one central email account and create different email alias for different client where PowerAutomate only need to mornitor one email account. Howerver, PowerAutomate doesn’t (at the time of this article) expose the alias email address in the Office365 Outlook email action. One solution to address this challenge is to use Azure Function App to extract the alias email address from the email body using Regex.

Regex

Some Regex syntax Find quoted text "(.*?)" Lookahead: matches “x” only if “x” is followed by “y” x(?=y) Negative lookahead: matches “x” only if “x” is NOT followed by “y” x(?!y) Lookbehind: matches “x” only if “x” is preceded by “y” (?=y)x Negative lookbehind: matches “x” only if “x” is NOT preceded by “y” (?!y)x CSV file line columns counts Using comma as delimiter. ,|(".*?"(,(?!$))?) break above down as: , a standard comma | or ( start of group ".