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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating planner tasks...
Power Automate
Unanswered

Creating planner tasks based on email subjects

(0) ShareShare
ReportReport
Posted on by 2
Hi all,
 
I’m new to PA but keen to learn how it can benefit our business. 
 
I’d like to find a way of keeping track of new business requests that come to us by email so that we can better make sure that we are responding to them on time and allocating them to the right staff to action effectively.
 
To do this, I would like for our staff members to be able to forward any new quotation request or invitation to tender to a shared email inbox and for a new task in planner to be created for each new and unique request. Sounds simple?
 
I have built a very basic Flow which looks for a particular phrase in the subject line (“NEWQUOTE” which the forwarder would have to add to the subject of the forwarded email) and then creates a new task using the rest of the subject line as the title, assigns it to a certain team member and puts a due date of a few days in the future.
 
All well and good but I’m struggling to expand this flow so that it doesn’t then make a new task every time a reply with the same “NEWQUOTE” phrase and existing subject line is received by that same inbox. This happens when an email conversation is begun between the owner of the shared mailbox and the Original forwarder. 
 
Can anyone Devise a way of doing this? Am I going About it the wrong way requesting the NEWQUOTE be added? Perhaps this is possible to get PA to Check whether the entire subject line is new and unique in the inbox (Adjusting for RE: and FW:) or not?
 
Any thoughts greatly appreciated!
Thank you,
H
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,181 Most Valuable Professional on at
    Creating planner tasks based on email subjects
     
    Yes, you could definitely add a check to see if the email subject value does not start with RE: or FW:. You can use a trigger condition for this in the settings of the trigger action.
     
    Additionally, you could use the Conversation Id property value in your Planner Tasks and check for that. But that requires a bit more checks and actions. So, my suggestion would be start with that first check.

    Below is an example of that.
     
    @and(not(startsWith(triggerOutputs()?['body/subject'], 'RE:')), not(startsWith(triggerOutputs()?['body/subject'], 'FW:')))
     
  • HF-18122311-0 Profile Picture
    2 on at
    Creating planner tasks based on email subjects
    Thanks, Expiscornovus,
     
    Thinking about this some more, I was wondering whether I could just only make a new task if the subject of the trigger email did not end with the title of any existing task - at the moment I have the following steps:
     
    1. Trigger: When a new email arrived in a shared mailbox V2 - i specify the mailbox and some other basic parameters
     
    2. List Tasks: I specify the plan ID to list the tasks of
     
    3. Filter Array:
    In the 'From' field I use the 'value' (planner) dynamic content - is this right?
    In the 'Filter Query' field I use this expression:  endswith(triggerOutputs()?['body/subject'], item()?['title'])
     
     
    4. Apply to each: Not sure what to put in the 'Select an output from previous steps' field. 'Body', maybe?
     
     
    5. Condition: Not sure what to put in the left and right fields here. I basically want this part to filter out positive instances of the check for the presence of a task title at the end of the incoming email subject.
     
     
    6. True: Create task. I think I've got it sussed here!
     
     
    7. False: Nothing at all? 
     
    If someone could sense check this, that would be great!
     
    Thanks,
    H
  • Expiscornovus Profile Picture
    33,181 Most Valuable Professional on at
    Creating planner tasks based on email subjects
     
    You approach looks good. The only suggestions I would make would be:
     
    1. Remove the Apply to each of Step 4.
     
    2. In Step 5 check the if no matching items are found in the body of the Filter Array (number of items is equal to 0)
     
    length(body('Filter_array'))
    is equal to
    0
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard