Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Creating planner tasks based on email subjects

Like (0) ShareShare
ReportReport
Posted on 18 Dec 2024 23:34:54 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
  • HF-18122311-0 Profile Picture
    HF-18122311-0 2 on 20 Dec 2024 at 15:41:13
    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
    Expiscornovus 30,967 on 20 Dec 2024 at 13:28:18
    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:')))
     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,154

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,270

Leaderboard
Loading started