We are looking to utilize Outlook, Flow, and SharePoint for an applicant tracking purpose. We receive applications via email and would like to pull the email from Outlook (Outlook 365) and put the "From","Subject","Attachment(Resume)", and "Body" of email into a file. It seems to be coming in as a corrupt file. The file does not need to be editable. Is there any way to complete this? And if not, is there a possibility to have Flow create a new folder in Sharepoint for each incoming email (Applicant) and then place the two files (One being the body of the email, and the other being the attachment (resume) in the new folder? Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous,
Which file type is the attachment of the incoming email?
Do you want to create a file within your SharePoint library based on the "From", "Subject", "Attachment" and "Body" of the email?
Based on the screenshot you provided, I think there is something wrong with your flow's configuration. The File Content field of the "Create file" action of SharePoint connector is required to fill a binary data, but the From dynamic content and the Subject dynamic content return text data, the Body dynamic content returns Html data (The Content dynamic content returns binary data).
More details about the "Create file" action of SharePoint connector, please check the following article:
I afraid that there is no way to put the "From", "subject", "Attachment" and "Body" of an incoming email into a file in Microsoft Flow currently.
In addition, you could consider take a try to create a new folder in SharePoint for each incoming email (I assume that the name of the new created folder is based on the Received time of the incoming email) and then place the two files that you mentioned into it. I have made a test on my side and please take a try with the workaround:
/Reporting1/formatDateTime(...)
The formatDateTime(...) expression read as below:
formatDateTime(triggerBody()?['DateTimeReceived'],'yyyy-MM-dd')
Note: The Reporting1 within above formula is a library in my SharePoint site.
File Name field set to Name dynamic content of the trigger, File Content field set to Content dynamic content of the trigger.
Add a "Create file 2" action, specify Site Address, Folder Path set to following formula:
/Reporting1/formatDateTime(...)
The formatDateTime(...) expression read as below:
formatDateTime(triggerBody()?['DateTimeReceived'],'yyyy-MM-dd')
File Name field set to ApplicantBody.doc, File Content field set to the output of the "Html to text" action.
Image reference:
The flow works successfullly as below:
Best regards,
Kris
Screenshot of what I was attempting. The file comes in as "Corrupt". Is flow able to put From, Subject, Body of Email, and Attachement in one Read Only File?
Thanks. Just posted the screenshot.
Hi @Anonymous,
Which file type is the attachment of the incoming email?
Do you want to create a file within your SharePoint library based on the "From", "Subject", "Attachment" and "Body" of the email?
Based on the screenshot you provided, I think there is something wrong with your flow's configuration. The File Content field of the "Create file" action of SharePoint connector is required to fill a binary data, but the From dynamic content and the Subject dynamic content return text data, the Body dynamic content returns Html data (The Content dynamic content returns binary data).
More details about the "Create file" action of SharePoint connector, please check the following article:
I afraid that there is no way to put the "From", "subject", "Attachment" and "Body" of an incoming email into a file in Microsoft Flow currently.
In addition, you could consider take a try to create a new folder in SharePoint for each incoming email (I assume that the name of the new created folder is based on the Received time of the incoming email) and then place the two files that you mentioned into it. I have made a test on my side and please take a try with the workaround:
/Reporting1/formatDateTime(...)
The formatDateTime(...) expression read as below:
formatDateTime(triggerBody()?['DateTimeReceived'],'yyyy-MM-dd')
Note: The Reporting1 within above formula is a library in my SharePoint site.
File Name field set to Name dynamic content of the trigger, File Content field set to Content dynamic content of the trigger.
Add a "Create file 2" action, specify Site Address, Folder Path set to following formula:
/Reporting1/formatDateTime(...)
The formatDateTime(...) expression read as below:
formatDateTime(triggerBody()?['DateTimeReceived'],'yyyy-MM-dd')
File Name field set to ApplicantBody.doc, File Content field set to the output of the "Html to text" action.
Image reference:
The flow works successfullly as below:
Best regards,
Kris