I want to automate my process of posting images to all my social media pages. For this I have set up a workflow in which I insert all the necessary data (title, caption, and imageurls of the images I want to use) into a google form, which then gets formatted and passed on to the instagram module.
Now the problem is the following: sometimes my posts have 2 images, sometimes 5 or 6. I want to be able to create a caroussel instagram post that, depending on the size of my “image_url” array, creates a post with an addequate amount of images. Since this is one instagram post, I guess I can’t use the iterator. My guess is I have to use the “map” slider in the instagram module somehow, but I can’t figure out how. My goal is to have a “dynamic” automation that adapts, depending on the amount of pictures one of my instagram posts has.
Does anyone have a possible solution? Screenshots are below
Hello! Welcome to the Make Community!!
You do need an Iterator, but just after an Array Aggregator. When you do this, the Iterator first splits all items in your Array into Bundles, and then the Aggregator turns the bundles back to an Array.
The trick is to leave Instagram where it is, and right-click on the link before it, and add first the Iterator (and choose your array of pictures), and then right-click on the link between the Iterator and Instagram, and add an Array Aggregator. You will be able to select the “files” array from Instagram so that you can them map the fields you need.
then in Instagram, you switch the “map” circled in green in your picture, and you map the result of the aggregator.
Tell me if you manage to do it. If blocked because I wasn’t clear enough, I will try and show you more details.
Benjamin
I have added the itterator and the aggregator as you have recommended. In the array aggregator, however, I don’t know what to select for this to work (see screenshot). Should I just select “Value”? Also, using this method, how would make.com know if the image_url number 4, for instance, is empty, and should not be considered?
Also, in the instagram module, if I simply pass on / map the array from the aggregator, how would it know the media type, in this case “Image”. Should the array being passed on to the instagram module maybe have a “Media Type” key to make this work?
Sorry if this seems trivial, its my first day using the tool
On source module select the iterator.
In Target Structure you should find the Files array from instagram.
If you select it you will see its fields
Benjamin
I do see the iterator source module, but not the target structure type unfortunately, only “Iterator”
Sometimes there is a refresh issue. If it’s before the Instagram module, there should be all the arrays it requires in the aggregator.
Can you try and remove it then put it again?
Benjamin
Like this? Is this sufficient or do I have to click the “map” switch here aswell?
In this case the “Photo URL” would be the value, which would be different each time, and the media type key would remain constantly as “Image”, right?
The question remaining for me, is how does this process assure that, if url number 4 and 5 are empty strings, that this does not lead to an error being caused. Do I have to add an “if” to the iterator somehow in order to ensure that each value of the bundle being created is a non-empty string?
Yes, it’s like this!
For Media type, you could map it as well and use a if
function to decide whether it’s an image or video.
If you want to avoid empty URL, you can add a filter between the iterator and the aggregator. Like this it skips empty urls.
I found that I have an Instagram Business account I can use to demo you what it can look like. Do you want me to record an example?
Benjamin
I tried to do this to skip empty urls. Will try it out later:
And yes, I would love a demo!
One last question though, I have set the “watch responses” google forms module as a trigger. What do I have to adjust / switch so that the whole automation actually runs, whenever I / someone submits the form? Right now everything is set to “on demand” by default:
Here is an example
I simulated your source Array with the images/videos and urls - one is empty to show you what it looks like, and I will use “type” to make “Media Type” dynamic as well
You must have noticed that you need to set some fake data if you want the Aggregator to detect the array
This is the filter. You have to check if it’s not equal to “emptystring”. But if in your source the “url” field is not present, your current filter is correct.
This is how I configured the Aggregator (I didn’t set any tag). You will see it’s a little painful, because you need first to select a media type so that it refreshes and shows the “url” field.
Then I removed the 2 fake images I had added
Then I map the output of the Array aggregator
This is the result of the array aggregator (I unlinked Insta because my account doesn’t allow to create posts).
You can see it removed the empty URL image, and that it set the media type
I hope it will help you.
For your other question, you will be obliged to configure your scenario to be scheduled and then set the schedule time. With Google Forms (that uses Google Sheets), there is no instant trigger unfortunately…
Benjamin
Hi, thanks so much for the response. The isntagram part works really well now. Unfortunately, the next part doesn’t for me.
After posting to instagram, I want to pull the url of the newly created instagram post (which works for now), and then create one pin for each image_url that exists. However, when running the scenario, I get the error [400] {“code”:1,“message”:“Sorry we could not fetch the image.”}
This is weird however, since the image_url worked before for posting to instagram
Here are some screenshots to provide context. If you could help me find out why this is it would be a huge help:
as you can see the value that is passed on to the iterator is indeed a normal jpeg, so I don’t really understand the issue
Hello!
I tested your image and it looks like there is a cookie consent screen that appears…
Which means there is some redirect. Not 100% sure it’s the issue, but I think that maybe Instagram knows how to handle this type of issue, while Pinterest can’t?
I tried on my side and I have the exact same error than you
And I managed to make it work with a workaround, using the HTTP/Get a File module
Let me show you
It’s not ideal, since you need one more step to download the file, but it could solve your issue.
This means that after the Iterator you add a Get a File
and map the url of the image
and you configure Pinterest to get an image instead of a url
Note that:
- if your images have different formats, you will need to figure out their Mime type from their extension (Make has a MIME app for that), and map properly the field “content type” in Pinterest
- you could only add a get image and then call Pinterest for each individual image (using "source type=image base64), but you could also optimize the scenario and choose “source type=Multiple images base64”, and in that case, it’s more or less the same as what you did before with Insta (iterator then aggregator and use the target array expected by Pinterest)…
I hope it helps
Benjamin
Thanks for the workaround! I tried it out and it does indeed work to some extent. However, it does not loop and create one pin for every Image URL as intended. Instead, it only creates a pinterest pin with the first image url and then continues with the scenario. I thought by using the iterator, it loops automatically. Am I doing something wrong?
Also, when I tried it out right now, instead of taking the newest google forms response, it takes the oldest one. Am I doing something wrong here? Should I use another module?
Can you please show how you configured the Iterator, the get a file, and an example output of the array you map in the iterator?
Normally, it you iterate from an array that contains the url it should download all pictures.
Maybe by mistake you didn’t select the URL from the iterator (in Get a File)?
Benjamin
Sure.
Here is the iterator:
Here is the http get a file:
Here is the pinterest module:
How about the google forms issue? Does it by default pull the oldest response, rather than the newest one?
You did perfectly!
Just one remark. Since you’re using the same Title for every images, maybe that explains why you don’t see multiple images? Can you remove the mapping for title, or add « bundle order position » from the iterator to generate a unique name? Image 1, image 2, image 3, etc.
For the forms module, it picks the latest submissions, but you should be able to right click the module and use « choose where to start from » which allows you to reset to an older response
Works great! Thank you so much.
I have one last issue, and then I’ll stop bothering you
I want to do the same thing I am going on instagram ( a carousel post). For this I have setup the following chain:
I have iterated through the image urls (max 4 images, since that it twitter’S limit), downloaded each one and mapped it to twitter upload module array. (Works fine). Then the most simple step in the end doesn’t work: creating the post. I get the error: “[400] Invalid Request: One or more parameters to your request was invalid.” However, all parameters look fine to me (only 2, the caption/post text and the Media IDs. I have added screenshots for clarification.
You’ve been very helpful so far, so I hoped that maybe you could help me with this last issue
Hey!! You are not bothering me at all
What you did seems correct. I was wondering if the issue is in the “Text Content” that maybe has some forbidden characters?
Maybe you could try and put a static text instead to see if it works? If it does work, it may mean that you need to remove some bad characters from 48.caption.
Cheers
Benjamin
Hi, I tried that out, only plain text in the text content now, but still no luck