web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating a dynamic con...
Power Automate
Unanswered

Creating a dynamic condition and response.

(0) ShareShare
ReportReport
Posted on by 2

Is there a way to create a document that contains possible Subject lines of e-mails that we will get? That same document would contain the response that we would like to reply with.  Then have flow check the document when the e-mail comes in then auto reply with the corresponding response from the document?

Categories:
I have the same question (0)
  • Brad_Groux Profile Picture
    4,556 on at

    You wouldn't use a document for this, but instead a SharePoint list. So your columns for your list could have a Subject column, with all of the possible subjects, and a Response column for the canned response you'd send for that subject. Utilizing parallel conditional branches, you would send the Response emails that match the received email's Subject. The Flow would look something like this (just add branches for each response you need):

    ParallelConditions.PNG

    You could also nest the conditions, it is kind of up to you. I like doing parallel branches at the highest possible level though, to improve the overall performance of my Flows. 

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS

     

  • Mark-E Profile Picture
    2 on at

    So if I had 24 possible subjects, I would need 24 different conditions?  If so what whould be the use of doing it this way vs just having a seperate flows for each subject line?  I'm just thinking toward the future where we will be adding and removing subject lines and responses.

  • efialttes Profile Picture
    14,756 on at

    @Mark-E 

    The Sharepoint approach from @Brad_Groux is a good advise. But taking into account you have such a big number of options... instead of a condition block, I would suggest you to add a Filter Array action block after "Get items". This Filter will provide you all items from Sharepoint list matching Subject in the incoming email (unless you add the same subject twice in the Sharepoint list, you will get 1 or 0 results).

     

    Next I would add a Condition, and use the following expression:

    @equals(length(body('Filter_array'),1)

    On the "True" branch I would apply a service logic dependant on the matching item, on the "False" branch I would add a Terminate action block.

     

    Hope this helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard