Using an Array to feed variables into a module

Hi!

New to make and trying to work through my first application.

I am setting up scenarios that pull data from Google Analytics. Each data set pulled will be identical in what it collects but will pull data from various GA accounts.

I have currently setup a small test case where I had to duplicate the configured GA module and change the “view ID” field to point to each individual account. The rest of the info in the module is identical…jus the “view ID” changes to match the account.

Is there a way to input a switch or some type of array and have it automatically enter the ViewID so I only need to have a single module with the correct data being fed into it?..or if I have 50 different accounts I just need to duplicate the module 50 times and change the individual field?

For sustainability of the configuration, I would prefer to have an array feed the variable into the module configuration. Any direction you can provide will be appreciated.

Thanks!
Matt

Hi @Matt_Lane

In case you need to perform the exact same operation(s) for every ViewID, you can use the Iterator module. For every configured value it will output a bundle (an iteration) with the given value.

Example Iterator configuration with 3 values (viewId’s if you will) to iterate on:

This results in three iterations, each iteration for one viewId:

1 Like

@Loopz Thank you so much! Yes, that works. I’ve been trying to work with the Iterator, but am having a hard time with the documentation as it mostly references a JSON input. Is it possible to create a multi-dimensional array and call the values in various pieces of the flow. IE…

{GA ID ; ClientURL; clientID}
{208080; www.test.com; 20}
{18070; www.thebest.com; 108}

Hi @Matt_Lane

This is how I typically do it:

Create JSON:

Parse JSON:

Iterator:

This is the definition of the data structure used by Create JSON and Parse JSON:

2 Likes

@Loopz Wow! Thank you so much for the detailed screen shots. That’s so helpful. A lot of the current videos that are on make.com’s support pages are so blurry that I can’t see what they are doing at all. It’s amazing to have all of these examples from you. Really appreciate the support!

2 Likes

You’re welcome, glad I could help!

1 Like