I have an email list, it has a subject which is actually a title I've renamed it, from emails the person who will send you the email, email body, and email date and attachments for the email body. You want to make sure that it is a multi-line field and is an enhanced rich text box field so I will just show you quickly what I mean by this. So if I go to settings icon and list settings, and if I go to email body column, now you can see that the type of the text below is the enhanced rich text which means you can add pictures, table, hyperlinks, etc when you have an email body you sometimes have like headings paragraphs images links and stuff like that so you want to make sure that it is enhanced rich text box where you will capture the email body to create the workflow.
How To Make Save Emails Contents And Attachments To Sharepoint Online List
I will navigate back to office 365 and select the power to automate option, so we will use power automate flow to capture the incoming emails and save it to that list in SharePoint, so I will click on the create, and I will click on automatic flow. I will give it a name and I will select just search for email "when an email arrives", so when an email arrived version 3 I will just click on create, when an email arrives in the inbox you can actually put an email to or from and other filters here, I will not do that for now. I will click on the new step, the step need here is to create an item, so create an item in a SharePoint, so I will select that. So in terms of site, I will select the training KeaPoitsite and the list name I will select the emails and you can see the title is actually the subject. so I have to select the subject in the title. From email is a personal email coming from and the even body will be the body of the email so if I select the body here an email receives time so that's when the email is received. so I'll select all those four columns which will be saved in a SharePoint list. Now the next step is we have to add attachments so they could be more than one attachment so for that,
we have to put apply to each loop. First, if I click on the next step, we search for applications to each control so the control input is going to be the attachments from the email, so if I look for attachments the file has an attachment for this message. I click that and then for each attachment we what we need to do is, we need to attach that file into the item we created here. so I will click on add action and there is a SharePoint action called Add Attachment so I will select that action now again I will select the same site, it is a training site, and same list, Now the ID will be the Id of the last item which got created. So "create item"ID, so it will attach the attachments to the item which we just created. The file name will be the "attachment name" from the email so attachment name and the file content will be "attachment content" from the email again so if I look down here, you can find" attachment content", so now this workflow is ready.
what we did is when the email arrived we're creating a record in a SharePoint list with all the data going into the list subject, from email, body and the received time and then we actually going looping through all the attachments in the email and then attaching it to the same record which we already created. I will click on save The workflow is saved now the workflow is ready to test. what I've prepared already an email, so the email is going to the inbox and this is a subject and I have two attachments and this is the body of the email. so I will click on send here click on send so the email is sent so hopefully that workflow will run and it will copy the contents as well as the attachment into the SharePoint list as anew item. Now if I go back to the incoming email workflow I will see that once is run it will start appearing here the history of the workflow.
now if I navigate to Outlook I can see the email has been received to this email account now this is the email body and we have two documents attached to it and if I goto the workflow and refresh this page so we can see the workflow ran successfully it didn't take a long time so it only took one second to run it. So you can see the workflow steps. It is creating an item and also for each loop, it runs twice because there were two documents attached, the document to the item. so now if I navigate back to the list I can see that the record is already created. if I click on the record I can see the whole email body with all the formatting is there and also the two attachments are appearing here as well as list attachment and we can see the email date and the form and subject.
This is an easy way to move incoming emails, listen to the incoming email box using power automated flow, and moving that data, copying the information into SharePoint lists and all the documents in an attachment. hopefully, you liked this video give it a thumbs up if you found it useful
إرسال تعليق