Power Apps DIRECTLY upload files to SharePoint Document Library | GRAPH API

Поділитися
Вставка
  • Опубліковано 2 гру 2024

КОМЕНТАРІ • 507

  • @petereriksson6859
    @petereriksson6859 Рік тому +32

    This is so good Rezaa who needs Netflix when you are in UA-cam :)

    • @RezaDorrani
      @RezaDorrani  Рік тому +6

      I need Netflix :)

    • @arydias85
      @arydias85 Рік тому +3

      ​@Reza Dorrani We need You ! 😅

  • @BrianWainman
    @BrianWainman Рік тому +1

    Reza - you are a genius! Whenever I am trying to do something in Power Apps, I always come back to you. With this video you get a file into Sharepoint (with no Flow). By using the code you made to get files to show in the pdfviewer (another excellent video) and putting that code into the Record.Value here, you can now backup a file to pdf in another library - I have used it as part of a document control to supersede the old version as a pdf

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Thanks so much Brian.
      I always think why dont folks mix concepts from 2-3 video and here you are. So happy to hear that you have built a solution using multiple videos.

  • @neorecharge
    @neorecharge Рік тому +1

    OMG... you're a GENIUS!!! I've been trying to get my app to upload file attachments for the last 3 weeks using power automate. This worked first try! THANK YOU!!!!!

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Most welcome!
      Be careful of the file size limit (its small) :)

  • @zerokhan858
    @zerokhan858 4 місяці тому

    Reza, I wanted to say that I got a job as a PowerPlatform Developer, and it's mainly because of you, because from your videos I've learnt so much. I will be forever grateful

    • @RezaDorrani
      @RezaDorrani  4 місяці тому +1

      Congratulations! Very happy to hear the news.

  • @Deadpool12353
    @Deadpool12353 Рік тому +5

    Amazing Reza, I wish we can have another channel on Python from you. I know its too much to ask but your content delivery has been soo simple and straight forward to the community.

    • @RezaDorrani
      @RezaDorrani  Рік тому +4

      I wish I knew Python! If ever I learn it, I would plan on one.

    • @vinayayinapurapu
      @vinayayinapurapu Рік тому +1

      @@RezaDorrani Reza never says NO. :)

  • @youtube_Salim
    @youtube_Salim Рік тому +1

    Thank you reza, it's the 1st time that I discover this with powerapp, ... really it's great👌

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks Salim. I tried to show a different technique to upload files :)

  • @The_US
    @The_US Рік тому +1

    Great video Reza, you are a game changer in powerapps!

  • @FredyArg
    @FredyArg Рік тому +1

    Thanks!

  • @wjameswilliams
    @wjameswilliams Рік тому +2

    Thanks for the clear explanation Reza! HTTPRequest seems a very powerful method, but how do we know what permissions it has (like the ones you say it has at 8:30 ?) Is it any graph permission that doesn't show as "Admin Consent Required" on the Graph Explorer? Also given that there is now a HttpRequestV2 method which only has access to the groups segment, do you think Microsoft will deprecate the "V1" functionality?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I do not have the list of permissions (not documented). Im not sure about deprecation. Typically when a new version comes out, its recommended to use the latest one.

  • @michalsubrt323
    @michalsubrt323 Рік тому +2

    Nice video. For who is not see Libraries IDs, dont forget activate Document ID service under Site Collection Features.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I did not know that. Thanks for sharing the tip on document ID service

    • @kurthenderson6848
      @kurthenderson6848 Рік тому

      Michal and Reza, I am getting a null array when I try and use the http request to get the library IDs. Are you saying you have to have the Document ID service turned on in order to get a return list of the library IDs or is this possibly a permission issue? Is there any other way to get to the library ids?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Looks like it is needed as per Michal. Is there any issue in turning it on?

    • @mmipeconfidence2923
      @mmipeconfidence2923 Рік тому +2

      @@RezaDorrani I have activated the documents ID Service still I can't get the IDs on the api?

    • @alizishan4306
      @alizishan4306 Рік тому

      @@mmipeconfidence2923 did you get ID's?? I'm facing the same problem

  • @dineshb
    @dineshb Рік тому +2

    Amazing stuff!! This opens up new opportunities. Thank you

  • @yttanel
    @yttanel Рік тому +1

    I could see this being useful to me down the road, Good stuff Reza :)

  • @AlbertoAllegueVarela
    @AlbertoAllegueVarela Рік тому +1

    Thank you Reza. Your videos area really amazing!!. Great job!! Even, in the site, there are some lists and libreries, when I make the query, value is empty [ ]

    • @RezaDorrani
      @RezaDorrani  Рік тому

      You need to ensure you are consenting in graph api explorer.
      Top right there should be an option to consent.

  • @JasonRoberts-zk5ns
    @JasonRoberts-zk5ns Рік тому +1

    Awesome. I've had mixed results using PowerAutomate to upload files (often seems slow to trigger), so it's great to learn an alternative.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Thanks!
      Do check documentation though for limitations with file size and more.

  • @gslvqz8812
    @gslvqz8812 Рік тому +1

    Great tutorial on Attachments --> Doc Library

  • @rajeshlohana100
    @rajeshlohana100 4 місяці тому

    Crisp and clear lecture - Excellent

  • @jasonthedogcatcher
    @jasonthedogcatcher Рік тому +1

    This is great. Once the doc is uploaded, this app allows you to edit/update doc metadata, but what if you wanted to re-upload a replacement document as part of the document update process (without interacting with the SharePoint doclib directly)? That would be handy if it could all be done within the app.

    • @RezaDorrani
      @RezaDorrani  Рік тому +2

      Check and see if there is a graph api endpoint for that. I have not tried this scenario.

  • @DaniilStanisevschi
    @DaniilStanisevschi Рік тому +3

    Hey Reza this is awesome! Question on the Refresh() operation vs. the varReset variable and their differences/expenses on performance: how does the varRefresh consume less resources than Refresh() operation? Aren't both performing a lookup against the data source either way or am I missing something? If you could do a video on how to best leverage updating/refreshing collections after making record updates that write to SharePoint that'd be much appreciated!
    For example: I set a collection using a Filter() on a data source. I then create/modify an existing record via a form, but using data from the collection initially (maybe I set varFormRecord to ThisItem from a gallery that feeds from the collection). Now that the data has changed (we updated SharePoint from an Edit Form), what is the best performance-wise way to update the local collection without doing a ClearCollect() operation again? Is this possible?

    • @RezaDorrani
      @RezaDorrani  Рік тому +7

      The Refresh function retrieves a fresh copy of a data source
      learn.microsoft.com/en-us/power-platform/power-fx/reference/function-refresh
      The varReset technique simply re-triggers the Filter condition which in turns performs a delegable (server-side) query to get items.
      A lot is cached in power apps for performance reasons.
      I recommend connecting galleries to data source and preferably not load all data or filtered data in collections. Collections are stored locally in power app for user session.
      If you need static data, then collections makes sense.
      For data on which CRUD is being performed in apps, direct connection is a better option.

  • @dquagliano
    @dquagliano Рік тому +2

    Awesome as usual, Reza! I run into an issue I managed to solve this way: When quering drives, it won't return any data unless modify permission right there in the "Modify permissions" tab, and concent Sites.Read.All, Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All in my logged in session from Graph Api Explorer (all delegated permissions so no admin concent requested as Reza states :) ). Cheers!

    • @RezaDorrani
      @RezaDorrani  Рік тому +2

      Good tip! This one is in the graph api explorer.

  • @saisanthosh1697
    @saisanthosh1697 Рік тому

    Great to see New Power Apps Features... Brilliant Explanation...Keep up the good work..

  • @bobleach
    @bobleach Рік тому +3

    Thanks Reza, you know I've been waiting for this 😁
    What great idea on his documents are uploaded, I guess the only Downside is the file limitation. Have you tried it with larger files? Are you aware if this limit is likely to increase at all?
    Also is that resetting the gallery by a variable reduces the impact then I'll look into putting that into my Apps in future - Might need to do a few tests tho.
    Thanks again, keep up the great work 👌

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      File size limitation is called out in video. Check comments on video - there are comments and responses for both your questions.

  • @suryaraochowdarykoduri
    @suryaraochowdarykoduri Рік тому +2

    at 10:11 I struggled with enumerate the document libraries under the root site (Graph Explorer). Realized that I need to consent to permission under "Modify permissions" tab.

  • @wadihrizk
    @wadihrizk Рік тому +1

    You are the reason why I have a youtube account.

  • @abhishekgore9039
    @abhishekgore9039 Рік тому +1

    Hi Raza, it is very helpful. Nicely explained. Thank you

  • @angrybatvoice
    @angrybatvoice Рік тому +1

    Excellent video as always. Well done!

  • @MrRtth
    @MrRtth Рік тому +1

    Wow! Thanks for informing me a new useful feature with API.

  • @StraighterSwing
    @StraighterSwing 6 місяців тому +1

    Hey Reza, GREAT video. Do you have an example of uploading a document to a folder that doesn't exist yet with GraphAPI? I know we can do it with PowerAutomate but was just curious.

  • @voodoomanclothingco.3102
    @voodoomanclothingco.3102 Рік тому +1

    omg you are amazing! seriously, life saver!

  • @davidsheumaker3836
    @davidsheumaker3836 Рік тому +1

    Reza great video. I got it working but am struggling on uploading the files to a folder in the document library. What is the syntax for that?? Thank you.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Video description has links to documentation. It states how to define folder path.

  • @aysanhaghani5271
    @aysanhaghani5271 Рік тому +1

    Hi Reza, Thanks for the great video, I was wondering if we can use the same connector for creating a folder ( POST /sites/{site-id}/drive/items/{parent-item-id}/children)

    • @RezaDorrani
      @RezaDorrani  Рік тому

      There are graph api endpoints available for creating folders. Check the graph api documentation.

  • @drscott212
    @drscott212 Рік тому +2

    Reza this is an amazing video! I found it extremely helpful and it works flawlessly. I have one issue that I am running into. I want to sort by name in alphabetical order. However, the name column in SharePoint when used to sort gives a Delegation warning. But the Title column does not. Do you know of a way when uploading using the GraphAPI to set the Title column in SharePoint to the Attachment Name?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks!
      You cannot set metadata using file upload action. Even in SharePoint, one has to first upload file and then set its properties.
      You would need to first upload file and then use patch function to update its properties. I do not have a specific video on this though.

    • @drscott212
      @drscott212 Рік тому +1

      @@RezaDorrani Thank you for the speedy reply! If you do create a video that would be awesome. I tried using the Patch in graphAPI and couldn't get it to work. For now even though I didn't want to use Power Automate I just created a simple flow and sais when a file is created update the title column.

    • @RezaDorrani
      @RezaDorrani  Рік тому +3

      @@drscott212 I make videos when I receive multiple requests on a topic. Every quarter I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.

  • @JamieTorontoAtkinson
    @JamieTorontoAtkinson Рік тому +1

    You are the man! Thank you for this video

  • @jjcamello8698
    @jjcamello8698 Рік тому +1

    Thank you so much for these Reza!

  • @adedaporh
    @adedaporh Рік тому +1

    Amazing as always Reza. I wonder if there are end points for lists...

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      There are :)
      Check the graph api documentation

  • @juancarlosmoralgonzalez1509
    @juancarlosmoralgonzalez1509 Рік тому +1

    Amazing, Reza!, as usual.. :)

  • @shaikhfirdos2723
    @shaikhfirdos2723 Рік тому +1

    Amazing video and great knowledge shared..thanks Reza..👏👏

  • @akrutidhabu9210
    @akrutidhabu9210 Рік тому +1

    Great video!!! It saves extra work of creating a power automate flow. Could you please let me know if is it possible to check if a folder exists and if folder does not exists then first creating a folder then uploading the files inside it

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Possible, however for that a flow would be needed as the Get method for graph is not interpreted by Power Apps.

  • @jasona7029
    @jasona7029 Рік тому +1

    I learn something new, thanks for the tutorial as always. Supposed I uploaded 2 files, I need to update a column dynamically based on the selected ID from the gallery. Is there an easy method to update the metadata?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      First a file has to be uploaded. Metadata can be set after file upload is complete. You can use patch function or form control or graph api to update metadata.

  • @debernd82
    @debernd82 Рік тому +1

    Thanks and right on time for a solution for my problen. Yo're the best ☺

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You're welcome 😊
      Please also check file size limitation as well shown in end of video :)

  • @Saif_Ali_Khan_1301
    @Saif_Ali_Khan_1301 Рік тому +1

    We can directly patch it as well using filecontent in library without graph api, but thanks to you I learnt graph api approach as well

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Great 👍

    • @sebastianmarin7290
      @sebastianmarin7290 Рік тому

      May I ask how did you upload the file just using patch? Without using power automate ? Thanks

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@sebastianmarin7290 Uploaded file using api directly from power apps. No usage of flow.

  • @srikanthb8549
    @srikanthb8549 Рік тому +1

    Hey Reza,
    Thanks for the awesome video.
    I have a ask here how to update the metadata of the documents uploaded?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      You would need to get context of item(file) created and then update metadata as a separate request. You cannot upload and update metadata with same api call.

    • @srikanthb8549
      @srikanthb8549 Рік тому

      @@RezaDorrani I have the context but how to update the metadata using office365groups httprequest.. in which parameter we need pass the body

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I have not tried updating the metadata so do not know the specifics. You will need to check the graph api documentation for the same.

  • @MsMartin360
    @MsMartin360 Рік тому +1

    Thanks Reza for the idea.
    Is there any possible option to update file properties while performing the Upload action?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Not possible with upload function.
      It would have to be a separate function call after upload is performed.

    • @MsMartin360
      @MsMartin360 Рік тому

      @@RezaDorrani I have had the opportunity to implement this concept in my project, and it works fine. However, when it comes to the Desktop player, Upload action is not working. Do you have any ideas or suggestions on how to resolve this issue?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@MsMartin360 I have not tested with desktop player hence not sure what the fix would/could be.

    • @MsMartin360
      @MsMartin360 Рік тому

      @@RezaDorrani Hi, I finally found the solution. We need to use "Text(ThisRecord.Value, Language())". Thank you for your support.

  • @mdhidayat5706
    @mdhidayat5706 Рік тому +1

    Thank you so much Reza for sharing!

  • @emmanuelVatanintsoa
    @emmanuelVatanintsoa Рік тому +1

    Thanks Reza ,this is awesome. My question is can we add metadata from this request?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      No, since the API only supports uploading files (This is also what happens in a doc lib. You first upload a file and then set metadata). Once file is uploaded, you would need to get context of item and then fire another query to update the metadata.

    • @emmanuelVatanintsoa
      @emmanuelVatanintsoa Рік тому +1

      @@RezaDorrani Thank you very much 🙏

  • @akashsinghal7307
    @akashsinghal7307 Рік тому +1

    Hi @reza, your content is always helpful. I have a question here related to this video
    In this video, we saw that we can upload a file in any Sharepoint document library. Can we make this process completely dynamically? This means you will get an option of different SharePoint sites - document library in a drop-down where they want to upload? and File viewer for different SharePoint sites in the Power app.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Possible but you would somehow need the list of site ids and drive ids where files are being uploaded.
      However, to showcase data, you would need to connect to each of those data sources.

  • @rayanmohammad910
    @rayanmohammad910 Рік тому +1

    Hello reza
    Thanks for sharing your videos, tutorials, and the valuable information you've provided.
    I have a question, I have a requirement to use sharepoint library to store files through power apps the files have a large size so can I open a link directly from power apps to the library and allow user to upload his files?
    Is there any points to take into consideration when doing that?
    Thank you again

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I have not built any scenario with linking over to SP so not sure about considerations.
      1 thing for sure though - you will need to provide a refresh feature in app to load the latest files.

  • @StevenDeweerdt
    @StevenDeweerdt Рік тому +1

    Thanks for al your great video's life savers.
    Is it possible that this method doesn't work with a sub sites ? My document library doesn't show up

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks Steven.
      As per graph api docs, it should work with sub site as well.

  • @alibux
    @alibux Рік тому

    Thank you so much Reza! Very helpful walk through as usual, and also to learn about the HttpRequest method on the Office365Groups connector - lots of interesting possibilities via the MS Graph API.

  • @grantratcliff1059
    @grantratcliff1059 Рік тому +1

    Thanks Reza! Top tier content always. Question: I assume this would work with Azure blob storage, correct? And, if so, would that be more efficient and scalable?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      This video is specific to SharePoint doc library. Not sure about Azure blob storage.

  • @mattiee
    @mattiee 8 місяців тому +1

    This was even better method for uploading files than with flow. And i was able to get it work this time 🙂 But i like to use dynamic variable for upload to target folder, instead of root. I manage to insert variable between http-request, but this make only whole path folders to root.

    • @RezaDorrani
      @RezaDorrani  8 місяців тому

      Thanks!
      Not sure how I could help here.

    • @mattiee
      @mattiee 8 місяців тому +1

      @@RezaDorrani ok. I figure it out some day. I have learned how to use Graph API in practice. Thanks to you. You are greate teacher!

    • @mattiee
      @mattiee 8 місяців тому +1

      @@RezaDorrani there it was, when watch the video to the end. Using Substitute solve my issue 😂 My App works now perfectly. Thanks!

  • @MV-us8lw
    @MV-us8lw Рік тому +1

    Thanks, works like a charm!

  • @tosindanielyt
    @tosindanielyt Рік тому

    Thank you so much Reza, you are an inspiration. I have a question. how can you upload files to the document library with metadata please?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Uploaded files does not have open to set metadata. First file has to be uploaded then metadata can be set.

  • @vigneshm7011
    @vigneshm7011 Рік тому +1

    Amazing Reza 👏

  • @-Einar
    @-Einar Рік тому +1

    Great video, Thanks! Is it possible to set status in the ForAll loop?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      When uploading document, setting properties is not possible.

  • @Psrk4287
    @Psrk4287 Рік тому +1

    Thanks. This is useful as we can now remove our power automate flows and use the direct connectors. We have struggled with power automate flows when we move our app and associated flows from one environment to another using solutions. The connection between the app and the flows always get disconnected when we move to higher environment as managed solution. We then have to edit the managed app and individually hit refresh on each of the associated flows.
    We also have flows that set permission on the list items in sharepoint online. Unfortunately, we have not found Graph API calls to update list item level permissions.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      There are known challenges with flows with solutions that are connected to an App. All of them are well documented and hopefully the experience would be seamless in future.
      I have not explored all of the graph endpoints hence not sure if it has the permission apis for SharePoint.

  • @einfachmachengmbh
    @einfachmachengmbh Рік тому +1

    Great stuff! Can’t wait to try this out. I’m curious Is it possible to send values for columns in my document library? E.g. I have 3 text and three choice columns regarding the document that I want to „patch“ when uploading via graph api. Can I do this with the graph API call as well with parameters or something like that?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You cannot do that on upload of file. Can be done after file is uploaded however, we can straight out leverage the form control for that as shown in video.

    • @einfachmachengmbh
      @einfachmachengmbh Рік тому

      Okay. So giving my user the opportunity to for example assign the document to a project and status in powerapps via Dropdowns and sending his selection via graph api to the document library is not possible?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@einfachmachengmbh Possible but only after doc is uploaded. Same behavior as SharePoint.

  • @felixverduin569
    @felixverduin569 Рік тому +1

    Sick! That's very nice stuff Reza. Do I still need to add logic for duplicate files that are uploaded again in the SP doc library? Also, is it possible to add other metadata to the file via the graph api?

    • @RezaDorrani
      @RezaDorrani  Рік тому +2

      Thanks!
      You can always use the Lookup function to check if file already exists prior to executing the graph api call. Currently, if file is uploaded with same name, it will override the existing file (same as what SharePoint does).
      Video shows how to update the metadata via Power Apps. When uploading file, one cannot set metadata (similar to SharePoint behavior). Once uploaded metadata can be set via form control in Power Apps (As shown in video).

    • @felixverduin569
      @felixverduin569 Рік тому

      @Reza Dorrani I see, thank you for your answer. I skipped through the first part at first but looking back at it I see how you change the metadata after the file upload. Amazing Reza!

  • @DroneEyes
    @DroneEyes Рік тому

    Another great and very useful video Reza ... thanks very much!

  • @GreyDob
    @GreyDob Рік тому +1

    Thanks Reza, perhaps this solution will fix another problem I have when using Power Automate. When I upload a document in Power Automate "Copy file" from 1 library to another with the "replace" option we lose the previous versions of that document.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Video shows create new file. Check graph documentation to see if it has endpoints for copy file and more.

    • @khasimshaik2606
      @khasimshaik2606 Рік тому

      Hi, Reza I have a scenario like iam sharing a url through power automate flow by send email(v2) action. That link will expire after 21 days is there any idea about this Reza please help me

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@khasimshaik2606 I have no idea about this. Please post your query on forums at powerusers.microsoft.com

  • @ashutoshpandey1684
    @ashutoshpandey1684 Рік тому +1

    Thanks Reza, Great video. Only question I have here is it will not upload files larger than 50MB. Can you guide me any solution for larger files. Thank you

    • @RezaDorrani
      @RezaDorrani  Рік тому

      There is a graph api endpoint to upload large files as well (Upload large session - resuamble file).
      The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true).
      So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks.
      This would be a complex process and better off to use flow to load the files.
      Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).

    • @muthusamythangavel3985
      @muthusamythangavel3985 Рік тому

      @@RezaDorrani What is the max file size we can upload it to Sharepoint (through power automate or graph api). In DV it's around 128 Mb (i have increased max file attachment size upto 128MB in environment advance settings) but i don't know that will support for Sharepoint also
      Could you help me on that??

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@muthusamythangavel3985 Dataverse file size has nothing to do with SharePoint. The graph api has a limit and I have that mentioned in video. I will recommend checking on forums in case someone has a workaround powerusers.microsoft.com/

  • @allison7324
    @allison7324 Рік тому +1

    Incredible tutorial! I successfully made my power app using your video. One question, instead of uploading all files to root, is there a way to upload to a specific folder? I have 2 screens. 1st screen, has user input their information with a Next button; Next button when clicked will create a folder in the document library based on the user's name and go to second screen. 2nd screen will allow multiple file uploads, but uploads to root. how can i specify the newly created folder for the files to upload to? Thanks!!

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Possible! I think in video itself I give a demo of uploading to a folder. Check API documentation for how it can be uploaded to a folder.

    • @allison7324
      @allison7324 Рік тому

      @@RezaDorrani appreciate it! Thanks!

  • @manikandhar
    @manikandhar Рік тому +1

    Ah! At last 🥳🥳🥳🥳🥳

  • @dhananjaykharade2711
    @dhananjaykharade2711 8 місяців тому +1

    This is a really good new thing I learned today. I can see this approach supports a file size of 4 MB only. What is the approach to uploading large files in the SharePoint library without using Power Automate?

    • @RezaDorrani
      @RezaDorrani  8 місяців тому

      Power Automate

    • @dhananjaykharade2711
      @dhananjaykharade2711 8 місяців тому

      @@RezaDorrani You mean we need to use Power Automate to handle the actual upload of file chunks using SharePoint REST API? Automate would use HTTP requests to SharePoint to upload chunks of the file?

    • @RezaDorrani
      @RezaDorrani  8 місяців тому

      @@dhananjaykharade2711 Chunking will be super complex. Power Apps is not designed for uploading large files. Max I would say 20 MB per file. Beyond that you will see performance degradation.

    • @dhananjaykharade2711
      @dhananjaykharade2711 8 місяців тому

      @@RezaDorrani okay, what is the file size limit for uploading files using Power automate?

    • @RezaDorrani
      @RezaDorrani  8 місяців тому

      @@dhananjaykharade2711 I don't know the file size limit for power automate. It's about what's max file size power apps can handle as the file will be uploaded in apps.

  • @sachadrousie3180
    @sachadrousie3180 10 місяців тому +1

    Hi Reza, love your videos! Wanted to ask you if you have ever tried to create a folder directly from PowerApps also? I tried it with graph API, but powerapps asks for the body of the request to be provided in binary format, and I do not know how to transform the JSON to binary.

    • @RezaDorrani
      @RezaDorrani  10 місяців тому

      Thanks!
      I have not tried creating a folder

  • @JørnHerbrandDølving
    @JørnHerbrandDølving Рік тому +1

    Hi Reza. This was a very good and instructional video. I am new to PowerApps, but I have spent two days on your video, and now I got everything to work except the varCurrentPath. I want to save the files in a subfolder. I am on Sharepoint with Norwegian language, and I cant get it to work with "Shared documents/". Can you explain how I can find the root name of my Document library, and also the syntax of varCurrentPath

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I do not have a specific video on this scenario. I had done it as part of one of the demos. In fact I did a video recently where I showed a full document library experience. I shared the entire code base (Member only). Link is in that videos description. Here is that video -> ua-cam.com/video/JxPznTUsaiQ/v-deo.html

  • @JeanJacquesQuang
    @JeanJacquesQuang Рік тому +1

    Hello Reza, great video tutorial!
    Was able to achieve as per your tuto.
    One additional question: is it possible to upload in subfolder of root, but dynamic using item title as reference? As I already created subfolder with title as folder name? Thank you for your input. Jack

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I think I mentioned in video that subfolder is possible. So I would say Yes.

    • @JeanJacquesQuang
      @JeanJacquesQuang Рік тому

      @@RezaDorrani Hello Reza, indeed, you mentioned it is possible, with created folders. But any possibility to refer to dynamic field such as item title?your hint is appreciated. Best.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@JeanJacquesQuang Possible. You simply concatenate the title in it. Check concatenate function in power apps.

    • @JeanJacquesQuang
      @JeanJacquesQuang Рік тому +1

      ​@@RezaDorrani Reza, thank you very much for the hint! I'll look into it with concatenate function. I see it now! Great. Thanks again.
      Please keep your fabulous videos. Jean

  • @oluwatobipaul6171
    @oluwatobipaul6171 Рік тому +1

    Awesome video Reza

  • @lipabera9729
    @lipabera9729 Рік тому

    Hi Reza, great video again. thanks for this. I want to know how can we make the Graph api endpoint dynamic. Basically the document library id, is there a way it can be made dynamic?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      You could call graph api to get libraries, list it in dropdown. User can select and based on the selection pass that document id. That would be one way.

  • @glennbenzing5551
    @glennbenzing5551 Рік тому +1

    Reza, why has Microsoft not included an attachment control in the group of controls under Insert? Seems that this would have been in the first version of Power Apps to me.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I wish it was a control readily available

  • @basehumax
    @basehumax Рік тому +1

    Hi Reza, as always, very interesting solutions. One question I do normally use patch to save my records to SharePoint list, is it possible to add this solutions at end of my patch and the attachment will save on same record just patched? 🙏

    • @RezaDorrani
      @RezaDorrani  Рік тому

      This video is related to document libraries. You are trying to attach items to SharePoint lists. I have done multiple (4+) videos on uploading files to list item attachments. Check my playlist on list item attachments.

    • @basehumax
      @basehumax Рік тому

      Thanks replying, my question was to save the attachment with my records to SharePoint list using API Graph and patch is it possible? NOT FLOW

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@basehumax Check my videos - I have shown how to do that without flow. It uses form control. Patch does not support attachments.

  • @necdetsaritas8722
    @necdetsaritas8722 Рік тому

    Learning continue... Thanks for the awesome lecture

  • @neorecharge
    @neorecharge Рік тому +1

    This has been an excellent tutorial. I had this working flawlessly.. but all of the sudden, I have no filename in between root:/ and /content on the output.. I wonder if they changed something

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I have not come across the mentioned issue and hence not sure what the fix for your issue is. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com

  • @srikanthpaladugu1728
    @srikanthpaladugu1728 Рік тому +1

    Appreciated work 👏

  • @bartbossuyt
    @bartbossuyt Рік тому +1

    very nice tutorial, how to upload a attacment and a note(multi line text) with the PUT? in short, i have a attachment and a text in a variable.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Upload file action only uploads the file. After the file is uploaded, you would need to execute a Patch function to update any metadata.

    • @bartbossuyt
      @bartbossuyt Рік тому

      thx any idea where i can find a video?@@RezaDorrani

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@bartbossuyt I do not have a specific video on it.

  • @Worrelpa
    @Worrelpa Рік тому +1

    Thanks reza, I had seen this method once or twice before. It's ust that 4mb limit is just a show stopper for me. If you have to worry about the file size uploaded. If there is a way to send that in chunks then that would be something.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks Phil!
      There is a graph api endpoint to upload large files as well (Upload large session - resuamble file).
      The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true).
      So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks.
      This would be a complex process and better off to use flow to load the files.
      Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).

    • @Worrelpa
      @Worrelpa Рік тому +2

      @@RezaDorrani we just have scenarios where people would input data and provide documents / images as evidence. A lot of times people are out in areas where mobile connectivity is the only option. They end up emailing documents or worse third party doc storage which breaks the process.
      I see it as a graph limitation as opposed to Powerapps. A little increase to 10mb would cover a lot.
      Always grateful for you content Reza it explains ways of doing common things that business apps need to do but are not always straight forward to achieve.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@Worrelpa I agree with at-least having 10 MB to work with.
      Thanks Phil for your kind words

  • @rembautimes8808
    @rembautimes8808 Рік тому +1

    Great video thanks for sharing

  • @cesarb1543
    @cesarb1543 Рік тому +1

    You're Great, thank you for share!

  • @marianroca6329
    @marianroca6329 Рік тому +1

    As always thank you so much, just a problem... Can't find a way to list id of libraries of a subsite, the id of the subsite is the same as the parent and when I run the query to list the drives they won't appear :(

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I am not sure about subsites. I have not tried it. I recommend checking or posting your query on the forums at powerusers.microsoft.com

  • @robertadincalevis3800
    @robertadincalevis3800 Рік тому +1

    Hi Reza, thank you, again, for your videos!! Many people would be lost without you.
    I believe I have to consent for permissions to see the drive id, because my query gives me an empty value as a result. Am I correct? Which permission should I consent to to being able to see the id of my library?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      In graph yes. It uses your identity.

    • @urosgabrovec
      @urosgabrovec Рік тому +1

      I am also experiencing a similar issue. I logged into the Microsoft Graph using the same user account that is the owner of the SharePoint site and has full control over the document library. However, I am still receiving empty results when trying to retrieve the drive ID. The document library does not have broken permissions, and the site ID should be correct (I also tried obtaining the site ID using PnP, and it was the same).
      Does anyone have any suggestions on what could be causing this issue?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@urosgabrovec check video comments. Someone did post something related to it.

  • @darmissservicedesk8744
    @darmissservicedesk8744 Рік тому +1

    Thank you Reza for this tutorial. What could be the problem? I am stuck in the enumerating of document libraries as it shows an empty date on value. I tried with different sharepoint sites and I the site ID is correct. Hope you can address my issue. Once again, thank you.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I think someone did run into a similar issue and may have mentioned the fix. It requires some service running on site. You would need to look through the comments.

    • @darmissservicedesk8744
      @darmissservicedesk8744 Рік тому +1

      @@RezaDorrani Thanks for the response. Appreciated it.

  • @paolovr1970
    @paolovr1970 Рік тому +1

    Thanks Reza 🙏🙏🙏

  • @grungewess
    @grungewess 4 місяці тому +1

    Where was the "Reza Here" ?

  • @sonakification
    @sonakification Рік тому +1

    Hi Reza, this is very nice and elegant solution however would it be possible to tag each file before we upload to sharepoint? We are working with drawings and each have a unique number. Currently I have parse json in power automate and form control in power apps. Could we tag this attchments before we upload them to sharepoint with graph api? Many thanks Norbert

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You cannot upload and tag at same time. You can take user inputs for properties, first upload and then Patch an update to its properties.

    • @sonakification
      @sonakification Рік тому +1

      @@RezaDorrani thank you much appreciated!

  • @gilesgregg
    @gilesgregg Рік тому

    hi Reza, great video, what about creating or deleting folders using the Graph API?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I'm sure there are APIs for that as well but not something I have tested

    • @gilesgregg
      @gilesgregg Рік тому

      @@RezaDorrani I’ve been trying to use the graph api http request examples, but the file/body parameter appears to only accept binaries, not a json record

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I will recommend posting your issue with screenshots on the forums at powerusers.microsoft.com/

  • @MrGaztab
    @MrGaztab Рік тому +1

    Great video, thank you.

  • @LAAatBLS
    @LAAatBLS 11 місяців тому

    Hi, @rezadorrani. Excellent content, as always. How do you set document library properties or column values using this method for document uploading? Also is there any way around the MB limit? Or could you get the list ID or document ID as a return value?

    • @RezaDorrani
      @RezaDorrani  11 місяців тому

      You cannot upload and set properties for doc library. First one has to upload the document and later can set properties.
      There is no workaround the MB limit for this api.

  • @jray1429
    @jray1429 Рік тому +1

    Reza, great work!!
    Now I just have to figure out how to copy files. I’m trying to make it so users don’t have to manually upload the same file again when the second “project” is referring to that project.
    One of my biggest problems I have though is when a user download a file via a link using download and not launch, edge may respect it and download it and chrome may still launch it. I don’t want the user to overwrite the original file and when it launches, it allows them to edit it. They could “save as” on their computer, but that will be forgotten by many users.
    Is there anyway that I can make it so that they can’t edit the original file by forcing it to download and not allow it to launch❓ Also, with downloading, they don’t easily see the actual file location either.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Thanks Ray.
      Your scenario is not something I have come across or tried out. So not sure what the possibilities are. Reality is user will need access to SharePoint and nothing stops a user from taking these actions in SharePoint- uploading file with same name which would override.

  • @MrHaider2003
    @MrHaider2003 7 місяців тому

    Hello @Reza,
    any insights on what's max file size limit when uploading file using this method or using power automate?

    • @RezaDorrani
      @RezaDorrani  7 місяців тому

      I have called it out in this video.
      Power Automate allows higher file sizes.

  • @guillermomartingaray4092
    @guillermomartingaray4092 Рік тому

    Hello Reza, the video and the explanation are great, my only question is, do you need any premium functionality to be able to do this?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      custom connector is a premium feature

  • @nikkijoy226
    @nikkijoy226 Рік тому +1

    Thank you, thank you, thank you 😊

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You are so welcome!

    • @nikkijoy226
      @nikkijoy226 Рік тому

      @RezaDorrani do you have a video for a multi-level document approval process where the 2 levels of approvers change with each document? Selecting a manager from Office 365 doesn't work for me since the approvers aren't managers or in specific departments
      Thank you

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@nikkijoy226 I don’t remember having a video on this topic

    • @nikkijoy226
      @nikkijoy226 Рік тому

      @@RezaDorrani thanks for responding so quickly. I'll keep looking. My problem is getting the flow to send the email to a chosen recipient by I keep getting errors

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@nikkijoy226 Best place to post issues is the forums at powerusers.microsoft.com

  • @yehunlavolontededieu322
    @yehunlavolontededieu322 Рік тому +2

    Thanks Reza good thing somehow helps, Q: Can the user upload/create folder instead of single docs? IF yes , Is there size limit? IF not So , the only option is that they need to upload folders in the backend (doc-library)?
    I know It's a bit complicated as doc is involved, wish MSFT make a direct connection like list to manipulate the backend 😣pls MS do something, For my previous req The closest soln i found was from Andrew Hess , which meets my metadata gathering req with the doc, even that's more applicable only for single doc plus small size 10MG aint' doable.
    Now my req includes folder structure I mean not only display but also to create. Literally we wanted to mimic the whole doc library features in PowerApps so users don't need to access the backend. I think for now i better stick to the doc library not pull everything in PowerApps so i don't have worry about metadata /folder creation /size blalala ...

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Folder upload - No
      Small file sizes are the challenge with most of the approaches including the one I have showcased in emails. Power Apps is designed keeping mobile experience in mind - large file sizes is a definite challenge on mobile devices.
      There are APIs in graph to create folders and then add files in folders but all of them will have size limits.

    • @yehunlavolontededieu322
      @yehunlavolontededieu322 Рік тому +1

      @@RezaDorrani Thank you Reza for the speedy response. That's all I wanted to confirm before investing anything in it . Have a beautiful and blessed 2023 .

  • @arng4494
    @arng4494 Рік тому

    Hi Reza, as always, very interisting video. One question : you use the Attached file datacard from a form control. Is it possible to do the same logic with a Import Control (already included in PowerApp) instead of creating a form and deleting it after you copied the attachment control ?
    Kind regards

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Import control as far as I know only runs in edit mode of app.

  • @AnupamaK-u7w
    @AnupamaK-u7w Рік тому

    Hi Reza,
    When I needed it most, this video saved the day. I appreciate your thorough explanation, which made the learning process go smoothly. On the basis of best practices and an effective screen run, I have a question for you. I must save my submitted files in a document library and I have five upload controls on one screen linked to a SharePoint list. All that is left for me to do at this point is to push all of the uploaded files to the library after the form has been submitted (in separate 5 fns because the controls are different). Is it advisable to include everything in the Submit button's OnSelect property? What are your recommendations?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      You can submit them on click of single button one after the other. Big challenge is that the response is a problem as you would not know if it succeeded or not.
      My next video will show something new which would help in evaluating the response.

    • @AnupamaK-u7w
      @AnupamaK-u7w Рік тому

      @@RezaDorrani Thanks for the response. I look forward as always for your next video. I tried to upload file and ended up in a run time error. How can we identify the reason behind response error?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      As I said, the response does not give any information. Wait for my next video

    • @AnupamaK-u7w
      @AnupamaK-u7w Рік тому +1

      @@RezaDorrani Yes sure. Always

  • @davidnelson579
    @davidnelson579 Рік тому

    Thanks for this approach - it is a great alternative to using Flow. Is it possible to also populate the file(s) and their metadata all in the same Graph call? In other words create the file and populate all of the metadata.

  • @charlesdawnbeltran9603
    @charlesdawnbeltran9603 Рік тому

    Another useful video. 🎉
    Would there be any advantage if you store the attachments to SP document library instead of SP List attachment column?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Glad to hear that!
      Doc library has many advantages of list attachments.
      Il put a few forward
      - file size
      - versioning

    • @charlesdawnbeltran9603
      @charlesdawnbeltran9603 Рік тому +1

      Appreciate for taking your time writing your feedback. But will this solve as well of disabling the auto compress in Power Apps when uploading an image file?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@charlesdawnbeltran9603 No, thats a Power Apps thing and has nothing to do with list or library.

  • @mathiskoppx7848
    @mathiskoppx7848 Рік тому +1

    Hi, Reza as always, your video was just what I was looking for!! I just face one issue: I can not seem to find a way to rename the file in the attachememt control. I want to avoid using a flow to do this, and the method you used for tagging lists attachements does not work for libraries [ClearCollect(Defaults(datasource).Attachements)]. The reason I need to rename the files, I.e. make them unique is because if there is a file with the same name, it will be overwritten without any notification if I use the Graph API. Is there a way to fix this? Would really appreciate some help since I could not find a solution online!

    • @RezaDorrani
      @RezaDorrani  Рік тому

      This video is about uploading files to document library and not list item attachments. I have done other videos on list item attachments and renaming them. You can check those.

    • @mathiskoppx7848
      @mathiskoppx7848 Рік тому

      @Reza Dorrani Yes, but you are using an attachment control to upload to a sharepoint document library, so I thought it might be possible to apply your tagging method from your other videos to this case. Or do you know any way to change the name column of a document library using power apps?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@mathiskoppx7848 Attachment control is only to upload files. Video shows how file is uploaded and name is added. You can easily add logic to update it. Check my other videos to get an idea.

  • @brunoplacha
    @brunoplacha Рік тому +1

    Hello Reza, Thanks for the amazing video. When I try to find the library ID using the Grafh explorer, it returns me the Microsoft graph website address instead of my SharePoint one. do you know why?

  • @alzaimoor79
    @alzaimoor79 Рік тому +1

    Thanks, great video

  • @bg-jr3yz
    @bg-jr3yz Рік тому +1

    Great, thank you!

  • @michaelleu6104
    @michaelleu6104 Рік тому

    Hey Reza, thank you for this video. Is there a way to implement error handling using this method?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Currently no as power app has no context of what happened.

    • @michaelleu6104
      @michaelleu6104 Рік тому +1

      @@RezaDorrani Thank you for your timely response!