cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VanillaBear
Regular Visitor

Update a task based on email subject line

I am using the Planner as a semi service desk. I have a flow that currently goes like this.

 

Email Arrives 
>
Does the Email have #VS in the Subject line?

If NO create a task with the Subject line as the title > Wait 30 seconds > Convert the HTML to Text > Put Text in Description of the Task

I then manually amend that task to have #VS and a number between 01 and 99 in the title. So if the Email Subject was 'Test', I would amend it to be 'Test #VS01' (if this can be automated as well, please let me know!)

 

I then add this into the subject when I am emailing the users to help me keep track of the task.

 


What I want to do, is if YES (the Subject line does have #VS in it, because they have replied to my email), I want to update the comments of the specific planner tasks with their email.

Is this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
v-duann-msft
Community Support
Community Support

Hi @VanillaBear

 

Thank you for posting.

 

According to your description, you would like to create/update task based on arrived emails. If any misunderstanding, please kindly let me know.

 

If that’s the case, I believe we need 2 conditions to filter subject and task title.

 

Here is the flow overview:

v-duann-msft_1-1620705311259.png

 

In yes branch:

v-duann-msft_2-1620705349883.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

4 REPLIES 4
v-duann-msft
Community Support
Community Support

Hi @VanillaBear

 

Thank you for posting.

 

According to your description, you would like to create/update task based on arrived emails. If any misunderstanding, please kindly let me know.

 

If that’s the case, I believe we need 2 conditions to filter subject and task title.

 

Here is the flow overview:

v-duann-msft_1-1620705311259.png

 

In yes branch:

v-duann-msft_2-1620705349883.png

 

Hope the content above may help you.

 

Best regards,

Anna

Thanks @v-duann-msft that looks really good, but for it isn't working for me.

The flow goes all the way through to the second If yes statement, but reports false for all 24 tickets like it isn't matching to name of the ticket to the subject line. Could this be because there is a RE: in the subject line once the user replies?

 

Edit 1: I just re-tested this and removed the RE: at the start of the reply and it worked.

However, it completely overwrites the original details in t he 'notes' section, so this wouldn't work as that is the 'original call'. Is there a way for these updates to be added as comments? I can't see a way.

Edit 2: Through the power of Google and something I happened on yesterday, I have got the solution to the RE: Problem. In the 'Condition' section for 'value Title' is equal to 'Subject', I have changed this to be 'value Title' starts with

 

substring(triggerOutputs()?['body/subject'],4,5)


- So, it takes the subject, counts out 4, which is RE: and the space and then takes the 5 after which is #VS01 and matches that to the task. So aslong as I have the title to be #VS** and the Subject line starts #VS** when I send the email, they reply and that will work.

My only issue now is that it overwrites the notes, rather than puts it in the comments section.

Hi @VanillaBear 

 

Thank you very much for your information.

 

So the remaining issue is related to description overwriting. Ideally, you would like to attach replied email in comments area.

 

I tested as required, but seems it’s impossible to achieve it. There is no comments field in all of planner actions. It means we can’t configure comments for plans in flow.

 

You can double check available configurations in planner

https://docs.microsoft.com/en-us/connectors/planner/#actions

 

Best regards,

Anna

Thank you for your help on this, I have found a semi solution which is to get the task details before updating the task and use them in the description ahead of the update. So I am essentially adding the task details in again to retain them. 

Not ideal, but it semi works.

I have marked your reply at the top as the solution as that did mainly what I needed with some tweaking 🙂

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,519)