How to download a file from a url

I am trying to download an image (.png) from a URL and store it in Activepices in order to then send it to WordPress.

In Make I can do this by using the “get file” http module and then use the data to create the file (screenshots attached).

However, a similar module does not exist in ActivePieces as far as I can tell. I, therefore, tried to make a GET request (which breaks the builder and I have to refresh so that I loose the data for subsequent steps, but I think this is a bug) and I get back the binary data of the image.

(e.g. PNG\r\n\u001a\n\u0000\u0000\u0000\rIHDR\u0000\u0000\u0004\u0000\u0000\u0000\u0004\u0000\b\u0002\u0000\u0000\u0000���\u0000\u0001\u0000\u0000IDA)

Is there any way to transform this into a .png file and then use it for the WordPress file?

@Davush I created a video on how to handle downloading from external sources not too long ago. Check it out and let me know if that solves your problem.

@menacestudio Just watched the video… Good stuff. @PFernandez98 was helping me with something similar and created the “image helper piece”. Wondering, if wanting to add photo in the content of a blog post, not as the featured image, would the same steps apply? The image. helper piece is great and solved a few issues I was having in getting image to google and Wordpress… in watching your video and using the image helper piece, can both or one process you both hit on be used to add into the content of the post.

Example - ai generated or from pixabay, grabbed photo, uploaded to google or to cloud for later use in flow, then in content of blog insert the grabbed photo and have it uploaded to Wordpress when post is created. Using the Wordpress piece. Currently using html tag and it works but of course it is limited as I’m using the grabbed url from the http request…

Been viewing your other videos as well… everyone should take a peek at them, helpful

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.