Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Download image from url and save to sharepoint as image

(1) ShareShare
ReportReport
Posted on by 13

Hi

I'm having issues getting an image from a URL (received in an email body as hyperlink) and saving the image to sharepoint.

The flow successfully parses the email, extracts the URL, saves it as a working hyperlink in excel online file.

I can have the URL inserted into another Send Email V2 as hyperlink. 

The When a new email arrives (v3) is set to "include attachments - yes"

 

I can get the file to create in Sharepoint with HTTP Body as content, the file can be opened using browser, but it's not an image.

 

I've tried the implementing flows as suggested in https://powerusers.microsoft.com/t5/Building-Flows/Image-attachments-not-displaying-when-uploaded-to-SharePoint/td-p/190777

and

https://powerusers.microsoft.com/t5/General-Power-Automate/HTTP-get-download-file/td-p/49568

and I tried the suggestion to use base64tobinary(body('HTTP')?['$Content']) as suggested in other posts.

I've tried to use a parse json, but I can't figure out the schema to make it work.

 

Screenshot 2020-10-22 192546.jpg

  • persona Profile Picture
    persona 13 on at
    Re: Download image from url and save to sharepoint as image

    Thanks @v-bacao-msft 

    When the Body is input as file content I get a file saved which can’t be opened as an image.

    if I save without file extension then I can open in a browser without issue. But I need the image file either as .png or .jpg

     

    I get the same result with both OneDrive and SP. 

     

    I’ve also tried the new (preview) convert file function but it doesn’t recognise the file which is saved to OneDrive. 

    any other suggestions?

  • v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Download image from url and save to sharepoint as image

     

    Hi @persona ,

     

    You seem to need to configure the body of the HTTP action directly in the File content field.

     

    Best Regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,940

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,523

Leaderboard