Goal: Create a Notion carousel using a dynamic amount of images from Notion.
My Notion page has the property “Final image/Video” that contains an array of collections with media type and file url.
Right now I have hard coded into the Instagram module, all of the images from the array using their indexs but I want to support an array of N elements.
When I use the “map” feature in the Instagram - create carousel - Module, it says the image/video type is missing. I’m guessing this is because the structure of the collection doesn’t match the requirement of the IG Module. How can I restructure the collections, If thats what I need to do?
You’ll need to aggregate your files media types and URLs into a mapped / (Map) Files field.
Every result (item/record) from a search/match module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.
Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and has applies to many use-cases.
Read this
The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.
Here is an example of using the “Target structure type” of an Array Aggregator module:
As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.
To use the Array Aggregator, doesn’t the “Final image/Video” property containing the image data need to be in separate bundles? Currently “Final image/Video” is an array of collections.
I added an iterator to solve the previous problem but now I’m getting an error from Notion saying that it can’t find the database item id. I feel that there must be a better way to do this.
did you solve this problem? I have the same issue, I want to support an amount of N files for the instagram carousel post from notion; if you solved this, would you be so kind and share your settings?
I’m still trying to work out the “Missing value of required parameter ‘page’” issue but so far the carousel is being posted with a dynamic amount of images. What I did was add an Iterator to break up the bundle that contains the array of images, then aggregate those bundles into the target structure for the IG Carousel module. I hope that helps some.
Did you find a solution to this? I’m having the exact same problem. It seems that after an array aggregator, the only variables that can be mapped are the ones from the aggregator.
I do have the “Target structure type” and it works for the carousel part. But in my final node where I want to update the Notion database to change the status to “Published”, the mapping doesn’t work right.
Weirdly, I have an identical structure for the Facebook post and IG post, but in the IG post sequence, I cannot map to the page ID & in the FB one I can…
That looks like a new question, could you please create a separate topic for this?
While it’s tempting to hop onto an existing thread, a more effective approach would be to start a new topic just for your question. It helps community experts find and respond to your query quicker, and keeps our space organised for everyone. If you start a new conversation you are also more likely to get help from other users. You can refer others back to a related topic by including that link in your question. Thank you for understanding and keeping our community neat and tidy.
The “New Topic” link can be found in the top-right of the header:
@Josiah_Pilon since you had more than one question/issue in this thread, I suggest you start a new question for the new question too.
There’s no point in starting a new question because you still haven’t helped me solve the original problem. As the title says, I’m trying to post a carousel to IG. Now I have restructured the data from Notion and can successful post to IG but now can’t update Notion as I should be able to. How do I restructure the data so that both modules are satisfied??
Anyone still looking for an answer, here is my solution.
You need to have an Iterator module to break up the array from Notion into bundles.
Then an Array Aggregator to combine the bundles into an array structure that meets the requirements of the Instagram Carousel module.
My mistake was choosing the wrong “source module” in the Array Aggregator. I initially selected Notion but it needs to be “iterator”. See the picture for reference.
If anyone has questions, ask them here. This was an unnecessarily frustrating problem and I hope I can save you the trouble.
I just wanted to quickly say great job figuring this out! Awesome to see that you overcame the frustration, pulled through, and found the answers you were looking for.
Thank you very much for stepping back in here and sharing your learnings and your final setup with the rest of the community. Also, your willingness to assist with follow-up questions is incredibly valuable and 100% appreciated.