Power Automate - How to upload image in SharePoint Image Column?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video we will have a look at SharePoint image column so this is my SharePoint list called Branch list and I have got a column called picture let me take to the picture column and see the data type so you can see the data type is image here the plan is I'm going to send an email and using power automate we will get the attachment from the email which is the picture and then upload that in SharePoint under this Branch okay so that once I create the list then I could see the thumb name of the picture here okay so how to do this so for that I'm going to go to SharePoint sorry power automate and create a new flow okay so the trigger I'm going to use here is the email trigger so I'm going to use Office 365 outbook connector thank you okay so I'm going to put a subject filter here called upload picture include attachments yes only with attachments I'm going to turn that also and says that okay so that's my trigger and the next step is I want to get this attached attachment the picture in SharePoint okay so the plan is let me go back to my list so this is a branch list so before I create the item I need I need that picture in SharePoint so for that so see this list Branch list that's my URL here yeah so if you look this URL here you can see my sharepoint.com then slash site assets so under the site assets you can see list then there are geodes here so this is this one of the gifts is mine here yeah so if I open this no that one I think is this one here so for this this cute is the one uh which where I am going to utilize to upload the image so how can we create this uh from SharePoint so I'll show you that I'm going to delete this okay let me delete all of them yeah okay nothing there now so what I could do now here is I'm going to create uh this manually now yeah just to create that assets the good uh element I'm going to put a test here and under the image click on the image I'm going to okay this is the image I want to upload there we go let's come up there now yeah so if I open my image you can see my image so that's a manual one yeah so let me go back to the other URL site assets list say it created automatically that geared so this is the Guild of the list also you could find the queued if you go to the settings list settings see the URL here see the list remove the percentage FB and the percentage 70 at the last so if I copy this and open it in a notepad if I take you here now and compare it so you can see security is same so that's why it creates that yeah or you can go and manually create that folder if you want yeah so this is probably the easiest way just go and upload a manual one there so we got that they close this so we got the list and the you know the folder also with the guild okay so let me go back to the branch list again and delete this now so there are no records here okay and now going back to the Outlook email that trigger the next step we want is we want to create that file first so I'm going to use create file SharePoint so that's the SharePoint you know action stuff we need here select the SharePoint site okay the folder path so here the folder path is if you look here I'm going to use the site decides then the related list sine the sets list there we go so select that path so this is where I want you know this is the branch list uh my uh you know the SharePoint list site assets I'm going to store now the file name so here if I look at the file name here just search for name attachment's name here that's what that's going to be so it's going to be more than one attachment so remember for this demo I'm going to only attach one only and one is my thumb nail also in the in the image column yeah so um the file content is the next one we need to map so here we go it's there attachment contract okay so that's done so let me save this so I'm going to say s p some email and attachment image upload to SB list okay and let me save the flow right that's not and I'm going to test this first and see what's happening here yeah so let me go and run this so for that I need to send an email okay I'm going to click my button now and I'm going to send an email now okay we go this is the email I sent you can see there's an attachment image there and my subject also I know I'm filtering by the subject as well so I just put that as upload picture there yeah close that okay my flow is running now just refresh that that's done so that means that should be in SharePoint now that image so let me go back here here we go that's the image now let me open that that's the image yeah it's all good now okay let me delete this again because that's not the one I want to we want to achieve now yeah so let me go back here again so nothing is in the branch distance one and we can carrying on building the next steps of the flow now okay at this stage we pushed that image in SharePoint you know under the assets path yeah I'm going to put all the paths and the other details in my video description as well okay the next step is we want to create the SharePoint list along with the image also so for that we can't use the create item because the image won't appear there so if I use create item you won't be able to see that so for this we need to use a send HTTP one so let me take you there okay here it is okay so for that again we need to select the SharePoint site name and here I need to use the post and the next thing we need to use here is the URI the URI is slash API slash web slash list slash get title Branch space list remember that's what my list is called Branch space list then items okay then we got few content types we need to follow here so the first uh one the header is the content type and the content type is the first content type is this application Json auditor verbose yeah and then we need accept and that's uh only one it's just it's the same as the other one both yeah so we we so we put two headers then the body so body is the one which I need to um go through with you this okay I'll call let me copy this here okay so I'll go through this so again you know I'm going to put this body in my video description as well right so here we got the metadata then SP data dot Branch see underscore x0020 underscore list item so how do I find this so the easiest thing to do always is um the you need to go here and say slash underscore API slash webslash list you get all the list names then search for a branch list see that here we go Branch list list item so that's the exact name we want so and you can see the title is Branch space list so if you put Branch space list it's not going to work for you remember that okay so let me go back here so that's that's that's what that's called uh what are your uh you know the your list name that's for that then you need to put this reserved keyword list item at the end oops okay and then the title okay so title I'm going to map that from my um email uh you know that item you can put your own title you want then the picture so remember the picture is the column name so uh let me go back here see that's picture is my column name here okay so that's given the column name there then you got a type thumbnail file name then the file name I got again from the uh you know my trigger that's my attachment name then the field name again see that's my picture is my column name here so here also the column name here also column name then the server URL so here you need to put the hard coded value of your sharepoint.com then the server relied to URL is see that path slash site assets list slash the give it see the give it yep that's also important here okay let me go back here and show you the give it again so that's a good so you can this is the reason I said you need to create that first so that you need this give to be applied under your body of the HTTP one then finally the attachment name that's all we need go the path you know path need the name only because the content already been uploaded in the previous step okay so let me go back here there is nothing in the list and nothing inside the list um here under the branch list also yeah for the site assets there is no image also here okay now I'm going to run my flow so I'm not going to send another email I'm going to utilize the test flow the platform luckily gives us you know a good feature for um we don't need to send another trigger using this feature I can just say save and test so what that what's that going to do is it's going to use the last run trigger and use that data okay okay that's running now okay it looks like all the steps executed correctly here and if you look the body here you can see the body has been substituted with the right values there see the Grand Canyon dot uh you know JPEG and uh the right list name everything is there now so let me go back first to the assets so here we go that picture is just uploaded a few seconds ago that's good news now if I go back here and refresh my Branch list there we go that's the so the title is uploaded picture I said that's my subject of my email which I mapped remember and this is the grant uh Canadian one oh that didn't uploaded it for some reason I think I messed up something here let me go back and check again here hi okay so um I had looked uh looked at the Microsoft documentation here so it says here like uh one SharePoint online feature Library it doesn't display thumb nail previews I'm not sure this is applicable for the list um image upload also somehow it says here like you know the picture library that uses the classic experience for list and relationship Point online so you add a large image to the pitch Library however when you use the thumb names View for the library that the image isn't displayed and also when I click the image it's a broken image link also so the workaround is it should be less than 50 megapixels so what I'm going to do is I'm going to run another I'm going to send another trigger with a small image size and see whether that's going to work or not okay so let me send that email send that email again okay so I sent this email which contains a small image and let me go by so you can see it's uploaded and I got the thumb name so if I click on device you can see the image let me close that and then going back to the list and under the site assets this is where it got uploaded and I can see the image in full size also there you think hope this is useful thank you for watching
Info
Channel: abm abm
Views: 7,881
Rating: undefined out of 5
Keywords: Flow, Image, List, PowerAutomate, SharePoint, SharePoint Image Column, Upload, Upload Image in SharePoint List Column Image Data type
Id: y-2iDrfgvfw
Channel Id: undefined
Length: 14min 30sec (870 seconds)
Published: Tue Jan 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.