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):
- 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).
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!
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