Power Automate Exchange

Please login or click SIGN UP FOR FREE to create your FlowUG account to join this user group.
Expand all | Collapse all

Shared mailbox attachment and add them to SPO list column attachments

  • 1.  Shared mailbox attachment and add them to SPO list column attachments

    Bronze Contributor
    Posted Feb 07, 2021 06:40 PM
      |   view attached

    What I'm running into is Power Apps for attachments has a 50 MB size limit. For this current client build they could have a file attached up to 250 MB. 

    What I have come up with is what I think is a fair solution. When the submitter is in the Power App and asked if attachments or not if they say Yes have a pop up saying an email will be sent to you to add attachments. My first power automate is working at intended and that is when a new item created it then sends an email from a shared mailbox to the submitter. In the subject line includes the ID from the SPO list row. Now my second power automate is where I'm getting hung up. What I need is when the submitter replies back to the shared mailbox with attachments I need the ability to get the ID number (which I have that with a variable), then take the attachments and add them to the SPO list ID row attachments column. Here is the two power automates I got and how far I got on the second one but again running into snags.  Second is if you have a solution it can't involve any premium connectors for its not allowed.

    Thank you and look forward to assistance from the community.



    ------------------------------
    Craig
    ------------------------------


  • 2.  RE: Shared mailbox attachment and add them to SPO list column attachments

    Top Contributor
    Posted Feb 08, 2021 10:16 AM

    Since you have sharepoint online in the mix anyways, can you have the files saved to a document library and pass a file link over instead of attachments?

    I can't see from your post where the snag is, If i'm reading it right you've extracted the ID from the email subject and now you need to add attachments to the sharepoint online list that matches the given ID. I have a similar flow, using forms to collect responses and users upload attachments that get saved to sharepoint before being added to the sharepoint list via the add attachment step and get file contents actions.  I do run a replace on the file name first to replace spaces with underscore "_". Not sure if spaces in file names mess with adding attachments.



    ------------------------------
    Sam Duval
    Data Quality Analyst
    Element Financial
    Indianapolis IN
    ------------------------------



  • 3.  RE: Shared mailbox attachment and add them to SPO list column attachments

    Bronze Contributor
    Posted Feb 08, 2021 12:52 PM
      |   view attached

    @Sam Duval thank you for your reply.  The document library and SPO url link only issue is could have multiple attachments and need to make sure link them up with the appropriate id.  Also, trying to keep it simple where for the client that they don't have to dig into two different locations to get information needed in the backend of SharePoint.  This way all is stored in the same record row vs having to jump to a second storage area.  This then also helps when it comes to the Power App build in pulling back the information needed.

    The area that is giving me the issue is around the ​apply to each get attachment.  I've included the error point and error details.  



    ------------------------------
    Craig
    ------------------------------



  • 4.  RE: Shared mailbox attachment and add them to SPO list column attachments

    Bronze Contributor
    Posted Feb 08, 2021 06:55 PM
      |   view attached

    @Sam Duval  it seems I got this to work now tweaked it a bit.

    The only piece that I see is an issue is that when I reply to the email a second time with an update to my pervious file the automat fails. 

    Example:  Reply to email with word document named Test1.  I then make update to file Test1 and reply to email and attach Test1 file that I updated.  When automate runs it fails.  The error I get is vague:  Action 'Apply_to_each_2' failed,  An action failed. No dependent actions succeeded.

    Just not sure how to deal with the if the attachment is the same name to over write the one already attached.

    Here is my automate that is working except for the piece failing due to same file name issue.



    ------------------------------
    Craig
    ------------------------------



  • 5.  RE: Shared mailbox attachment and add them to SPO list column attachments

    Top Contributor
    Posted Feb 09, 2021 07:01 AM
    Progress is progress glad you got it working so far.

    As for deleting attachments, you might have to leverage the api, which luckily there's an out of the box connector to run api commands via automate. I'll try to find a reference for you. I've had to do it for removing people from a person picker field before because the other actions can't erase person fields or at least multi person fields

    ------------------------------
    Sam Duval
    Data Quality Analyst
    Element Financial
    Indianapolis IN
    ------------------------------



  • 6.  RE: Shared mailbox attachment and add them to SPO list column attachments

    Bronze Contributor
    Posted Feb 09, 2021 12:49 PM

    @Sam Duval  hi same another update that just dawned on me.  Had a Charlie Brown moment.  Outlook I'm going to run into the same file limitations when crew add attachments.  So, I had to go back to drawing board and from what I've come up with it will meet the requirements.  Not great, but gets the job done.

    What going to do is use a MS Form, Power Automate, SPO list combo.  In the Power App I'll have link that will open the MS form for the crew to open the MS form to do their attachments.  This then gets me around the MB limitation.  Next I just need to test if will overwrite file if file name is same or not.  

    Thanks again Sam and still interested in seeing that api out of the box via automate you mentioned. 



    ------------------------------
    Craig
    ------------------------------



  • 7.  RE: Shared mailbox attachment and add them to SPO list column attachments

    Top Contributor
    Posted Mar 05, 2021 07:40 AM
    The API action you are looking for is called: "Send an HTTP request to SharePoint"

    This handles the authentication for you, so all you have to do is google the API URLs you need to do certain actions. It might take some trial and error to perfect it and/or find a good simple "how to" for the various actions, but once you get it coded right it works well.

    ------------------------------
    Sam Duval
    Data Quality Analyst
    Element Financial
    Indianapolis IN
    ------------------------------