Hello,
I have created a flow in such a way that when new email is sent to a shared mailbox, all the attachments along with body of email as an .eml file will be added to Sharepoint library inside a folder, which will created based on the subject of the email. Folder name will be the subject of the email which is sent.
I was able to create it successfully but the modified by column displays my name as am the owner of the flow. But it should be someone who sends the email to the shared mailbox. Can someone kindly help me with this?
Note: Files are getting uploaded inside a folder and that folder is being created in the name of the subject added in email for every run.
Regards,
Sushmita.
Solved! Go to Solution.
Hi @Susmitha95 ,
I had a chance to create a working demo flow as shown below:
These are the steps in my flow:
Create a folder based on the emails Subject line:
(You can change the Created by and Modified by properties of the folder if needed).
Save all attachments,
then change Created by and Modified by properties of the file:
Export the email and save to SharePoint:
then change the Created by and Modified by properties of the eml file:
This is the sample runtime output
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi @Susmitha0706 ,
After the file has been saved your Sharepoint library you can then update the Modified By column by calling an API using the Send an HTTP request to SharePoint action:
You will need to use the internal name of the Modified By column in the Send an HTTP request to SharePoint action. The internal name is Editor. For more information see: How to find the internal name of a SharePoint column – Ellis Karim's Blog
_api/web/lists/GetByTitle('Solution Information')/items(1)/validateUpdateListItem
{
"formValues": [
{
"FieldName": "Editor",
"FieldValue": "[{'Key':'i:0#.f|membership|AlexW@dev365.com'}]"
}
],
"bNewDocumentUpdate": true
}
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi Ellis,
Thank you for the response.
I tried to use the above action and ended up getting errors. My requirement is just to replace the incoming emails setting in Sharepoint onpremises.
Modified by or created by of all the files in a folder(which is being created with the title in the name of Subject of email) should be updated with name of email sender.
Here in my case Folder and files that include attachments and .eml file are getting created inside a folder that is being created dynamically based on our email Subject.
Could you check the above screenshot and kindly do help me on this.
Regards,
Susmitha.
Hi @Susmitha0706 ,
The code snipped I shared above is for SharePoint Online only. What is the exact error message you are getting?
As I understand, your flow performs the following actions:
The Problem: When files are created or modified by the flow, the created by and modified by properties are set to the owner of the flow. You want to
Is this correct?
Here are some things to check:
(1) Check the Uri property for the API. See the following posts:
(2) Please ensure the FieldValue is set as:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi Ellis,
Thankyou for the clear response!
I have tried to use the url as mentioned in the above articles. Below is the screenshot.
Error message is "Request is not Valid" Status:400.
Could you kindly suggest something on this.
Regards,
Susmitha.
Hi @Susmitha95 ,
Can you use the following logic to change the author property of the attachments and eml file:
Use the following API to change the author or editor:
_api/web/lists/GetByTitle('BDS Archive/FOLDER_NAME')/items(ID)/validateUpdateListItem
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi Ellis,
I tried to use the URL that was mentioned above. It gives me a different error.
The list BDS Archive/test Proj sites does not exist on the site whose URL is
URL that is being used is : _api/web/lists/GetByTitle('BDS Archive/@{variables('Subject Variable')}')/items(@{outputs('Create_file')?['body/ItemId']})/validateUpdateListItem
Regards,
Susmitha
Hi @Susmitha95 ,
I had a chance to create a working demo flow as shown below:
These are the steps in my flow:
Create a folder based on the emails Subject line:
(You can change the Created by and Modified by properties of the folder if needed).
Save all attachments,
then change Created by and Modified by properties of the file:
Export the email and save to SharePoint:
then change the Created by and Modified by properties of the eml file:
This is the sample runtime output
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hello Ellis,
Our issue has been resolved. your detailed steps helped a lot. Thanks so much for your support.
Regards,
Susmitha
User | Count |
---|---|
25 | |
14 | |
12 | |
10 | |
9 |
User | Count |
---|---|
51 | |
29 | |
28 | |
24 | |
22 |