cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate V
Advocate V

Reply to email (v3) does not reply to the last message in the conversation

Dear all,

 

I have built a Flow that should automatically reply to an email message together with an attachment (invoice).

 

Actually I have created two workflows.

 

  • Workflow A 

Trigger:

Is being triggered when the email message is being delivered to a specific mailbox folder.

 

Action:

Retrieves the invoice number from the subject line.

Creates a SharePoint Online list item, and saves the Message ID together with the Invoice Number (extracted from the subject line):

2019-10-03 15_41_54-Logic Apps Designer - Microsoft Azure.png

 

 

  • Workflow B

Trigger:

When a file is created in a specific folder within a SharePoint Online document library.

Please note: The file name starts with the invoice number.

 

Action:

Extracts the invoice number from the file name and puts it in a variable called 'Offertenummer'.

Get items from SharePoint Online list. Therefore I use the filter function: Offertenummer eq Offertenummer (variable).

2019-10-03 15_44_54-Logic Apps Designer - Microsoft Azure.png

 

The problem is, when I use the "Reply to email (v3)" action, and put in the Message ID retrieved from the SharePoint list, Microsoft Flow is replying to the initial message received in the mailbox.

I wish Microsoft Flow would reply to the last (most recent) email message  in the conversation.

 

Think of this scenario:

- A external person asks for an invoice

- The Microsoft Flow automatically sends the PDF file to the external person through a reply to the email (this works fine)

- The external person asks for a change to the invoice

- The Microsoft Flow automatically sends the latest PDF file, but replies to the original message and does not answer the latest email

 

For the end users this is inconvenient, if Microsoft Flow does not reply to the latest email, the conversation is broken.

 

I have noticed that when the external person replies to the email sent by Microsoft Flow, the Message ID stays the same!

2019-10-03 15_52_46-Pilot SharePoint - E-mailberichten - All Items.png

I was looking for a different metadata value, that is actually unique, but the action "Reply to email (V3)" requires the use of property "Message id".

 

How could I let Microsoft Flow reply to the latest email in the thread?

 

Thank you for all help provided!

 

Kind regards,

Joost

1 ACCEPTED SOLUTION

Accepted Solutions

@v-litu-msft 

Well I received an update from an Integration Support Engineer after I had created an official SR, and it seemed that the reason why was I needed to apply an Order By in the Get items action.

 

The value for Order By schould be: "Created desc".

 

I was shocked that this resolved the issue because I thought the message ID was still the same, but after all, there was a 1 character difference between the message ID, and that's why I should have performed an Order By.

 

This means that this has been resolved!

 

Thanks for all the help provided.

View solution in original post

6 REPLIES 6
Community Support
Community Support

Hi @jvdlinden,

 

I have tested that reply to the Email in order with number 1,2,3,4, and the reply with shows like that:Annotation 2019-10-04 125521.png

 

Test Flow ( the message ID always the same 😞

Annotation 2019-10-04 125944.png

So the Flow if you use the Reply to Email action, the action will reply to the last message according to the message ID.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-litu-msft ,

 

I am wondering if this problem might be related to the fact that I have configured the 'Reply to email (V3)' as follows:

2019-10-04 09_54_41-ReplyToEmail.png

 

Because this is a test environment, I have entered my email address manually, to prevent Flow from sending emails back to customers. Should I leave this blank instead for Flow to reply to the last message in the conversation?

 

Kind regards,

Joost

Hi @v-litu-msft ,

 

I have tried to change the "Reply All" property of the Reply to email (V3) action. I have set it to value "Yes" instead of leaving it blank.

Unfortunately this did not resolve the issue.

 

I have included screenshots of my workflow configuration:

 

  1. The first workflow that saves the email message into a SharePoint list

The invoice number in the subject is built up using 'current year' and a unique number.The invoice number in the subject is built up using 'current year' and a unique number.

 

I am extracting the invoice number from the email Subject, and put it in this variable Offertenummer.I am extracting the invoice number from the email Subject, and put it in this variable Offertenummer.

I save the email message along with the invoice number into a SharePoint listI save the email message along with the invoice number into a SharePoint list

 

2.    The second email that sends a reply once a file has been created

A PDF file is being generated by the user, and it will be saved into a SharePoint folder. 

The file name of the PDF file always starts with the invoice number. So I tell Flow to exctract the invoice number from the file name.The file name of the PDF file always starts with the invoice number. So I tell Flow to exctract the invoice number from the file name.

I tell flow to get SharePoint items, filter based on the invoice number, and retrieve the Message ID.I tell flow to get SharePoint items, filter based on the invoice number, and retrieve the Message ID.

I tell Flow to send an email back to the contact.I tell Flow to send an email back to the contact.

Hi @jvdlinden,

 

I have tested on my side, the reply all will work, you should store the message ID dynamically in a column, (every time I test, I should get the new Message ID):Annotation 2019-10-08 155220.png

Run result:

Annotation 2019-10-08 155447.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-litu-msft ,

 

I am still not able to make this work.

Could it have something to do with the fact that I am using Logics App from Azure?

I notice that in your last message, you do not use the output of the Get email action. In my case there is no way that Flow is replying to the latest email.

 

I even setup a Microsoft Flow workflow, and even this one is not working.

@v-litu-msft 

Well I received an update from an Integration Support Engineer after I had created an official SR, and it seemed that the reason why was I needed to apply an Order By in the Get items action.

 

The value for Order By schould be: "Created desc".

 

I was shocked that this resolved the issue because I thought the message ID was still the same, but after all, there was a 1 character difference between the message ID, and that's why I should have performed an Order By.

 

This means that this has been resolved!

 

Thanks for all the help provided.

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (25,951)