I am trying to create a scenario to create new Facebook Ads campaigns via API.
I do not understand APIs and HTTP, but I successfully created the campaigns and ad sets with the HTTP module.
The problem is I am stuck in the ad creation.
The ideal scenario will read a Google Drive folder with images and videos and then upload it to the Facebook Media Library to generate an image hash that will later be used to create the ad creative.
At least, that is what I understood from the API documentation at step 4 - link here
I’ve tried using the Graph Explorer and HTTP request in Make, but I can’t understand why it is not working!
The image below is part of the scenario I have and encompasses just the ad creation part, where I am having problems.
I first tried to create the scenario without the HTTP Get Files module, but it did not work. Then, I tried to download an image using the Get File and then made a POST request to upload it, but it still did not work.
I have no idea if Facebook allows me to create an ad using HTTP, if I am doing something wrong, or if the Get File image output is an image format that Facebook does not accept… I am lost.
How do you upload a Facebook ad image using the HTTP module? Thanks!
is your google drive image publicly readable? you need to set the visibility to anyone. does your get a file module show the correct image you want? trying sending it via mail e.g. to test
The root folder and the file itself are public to anyone.
I think the Get a File shows the correct image. The Output comes with a data field in binary format, and the filename is the file name file I want.
The URL I am using from Google Drive is in the following format, but I also tried all the fields the Google Drive module returned. https://drive.google.com/uc?export=download&id=1<IMAGE_ID> and even tried uploading it to my website/domain. Nothing worked.
And yes, I was able to get the image in my email. As per your suggestions, after the Get a File I sent both images, PNG and JPEG, and both arrived in my Gmail.
Also since you already have a reference to a searched file in Google Drive, you should use the Google Drive “Download a file” module, since the file might not be publicly shared yet, which means the HTTP Get a File could possibly return a non-file.
Just stepping in to congratulate you on solving your troubles with some assistance from @alex.newpath and @samliew.
Thank you very much for coming back here and sharing the details of your solution with us. We appreciate you keeping our community neat and tidy for others.