Finalize the scenario aggregating two variables

:bullseye: What is your goal?

I want to iterate a block array from Slack, create different variables and then update one single database in Notion with both variables.

:thinking: What is the problem & what have you tried?

I created two different variables (I will have to create more but for now just testing), and now I am not able to aggregate them again to obtain a clear structure of elements that can be used for my Notion scenario. Can’t introduce an array aggregator and can’t connect both variable set scenarios to Notion.

:clipboard: Error messages or input/output bundles

No errors, just got stuck understanding if the previous steps are wrong for what I want to achieve.

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hey Mike,

What’s the difference between them and why are you using a router with filters?

Depending on the exact use case, you can use a switch module instead, or a switch function, or some if functions.

Hello @Stoyan_Vatov,

If I don’t set the variable, I am unable to retrieve values from the Iterator. And I am not able to set multiple variables because I need to indicate the exact element of the array I want to extract.

So with the first variable I am extracting the first element I need from the initial array, and with the second variable I am extracting the second element.

I am unsure if this is a wider ride than expected, but I made several attempts with iterator only and never worked. Output is always empty, and get map functions do not help me because the initial array has multiple collections.

Sounds like you don’t need the iterator at all. Instead you can use the map() function to extract specific values from the array directly.

Can you show some screenshots of what the data looks like and what you are looking to map and we can help you with the function setup?

WIthout the iterator there is no way to unpack a single rich text section into different bundles. Anyway I am sharing with you three screenshots:

  1. the overview of the block in slack. As you can see there are 16 different collections, not just a single collection with more than one column. So the map function won’t work here as explained in this other thread by alex.newpath Extract an Item from Array | Get and Map Function | Make Beginners Guide - #16 by alex.newpath

  2. how the macro collection is unpacked in 16 different bundles.

  3. if I don’t set variables, I have no way to map notion dimensions with the bundles I have just extracted (only the last bundle is visible from the Iterator module).

I just made the scenario public Feed Partner Growth RevOps task database - Make.com Automation Scenario

Do you need the text assembled back in a single text string? You can do that with a join(). What else are you trying to do with these arrays?

If possible can you copy paste the input bundle here so we can test along?

The final goal is feeding a data source in Notion. So a Notion page is composed of several properties: I need to map three of my output bundles to specific Notion dimensions.

This is the starting input:

Text

New Feature Request request from <@U024ZAPBVB4> for the RevOps Team

*Feature description*
Club X wants to integrate the accounting solution with Playtomic data
*Feature Title*
Request to include an API for Payments
*Product Triage*
Chains

This input [block] is considered by Slack as an Array whose type is rich_text_section and is composed of 16 collections.

Sorry can you paste the entire JSON here (bar any sensitive information) that is getting produced from the slack module?

{“type”:“rich_text_section”,“elements”:[{“type”:“text”,“text”:“New “},{“type”:“text”,“text”:“Feature Request”},{“type”:“text”,“text”:” request from “},{“type”:“user”,“user_id”:“U024ZAPBVB4”},{“type”:“text”,“text”:” for the RevOps Team\n\n”},{“type”:“text”,“text”:“Feature description”,“style”:{“bold”:true}},{“type”:“text”,“text”:“\n”},{“type”:“text”,“text”:“Club X wants to integrate the accounting solution with Playtomic data”},{“type”:“text”,“text”:“\n”},{“type”:“text”,“text”:“Feature Title”,“style”:{“bold”:true}},{“type”:“text”,“text”:“\n”},{“type”:“text”,“text”:“Request to include an API for Payments”},{“type”:“text”,“text”:“\n”},{“type”:“text”,“text”:“Product Triage”,“style”:{“bold”:true}},{“type”:“text”,“text”:“\n”},{“type”:“text”,“text”:“Chains”}]}

And do you need the entire text block together or split it in separate parts? Also is this standardized text? Will all bundles follow the same logic or will there be differences?

You can use an iterator followed by a text aggregator to rebuild the text back in a single string and then follow it with a match pattern module to extract different elements. This will work regardless of the length and exact structure of the incoming text block, as long as the overall structure is the same.

Here is a scenario to rebuild the message and match the three different items (if that is what you are looking to get) Integration JSON - Make.com Automation Scenario

You can change the switch module for a switch function to save on operations.

1 Like

Many thanks, text aggregator + match pattern works. I was not so far away from the solution. I have more logics so it should be readapted a little bit, but I think I can manage it on my own. Thanks again

1 Like

Don’t forget there are several “aggregator” modules in make not just an array aggregator. They serve to combine multiple bundles into one.