Iterator to HTTP 'Get a file' module : "Invalid URL in parameter 'url'" error

Hello Makers,
I made several attempts to attach URL files from Iterator, then HTTP module to Email module and I have every time the same error “Invalid URL in parameter ‘url’.” Here the output from Iterator :
output-iterator.json (6.4 KB)

Iterator

HTTP ‘Get a file’

Email

How to make it work with multiple URL files? What format it’s needed?

Thank you

Topic refers to Extract pictures URL through Iterator module - #18 by Garry_V

The map function returns an array. If you want the first string value from the map function, wrap it with the first function:

{{ first(map(array; "url")) }}

If you want to loop/map each value from the map function, put it in an array Iterator module, which will split them into multiple bundles.

For more information, see

Links

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

Articles & Videos

samliewrequest private consultation

4 Likes

Hi @Garry_V
After mapping you will get an output like this:

You need to iterate to pass the URL separately. Put the map function inside the iterator.

Now it will work fine.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

2 Likes

Thank you guys. As @samliew suggested, it works with the first function :

Anyway, I really don’t understand what I must do to attach every URL files. Here every output :
output-iterator.json (22.0 KB)
output-HTTP.json (2.1 KB)
input-email.json (4.7 KB)

While I got every URL in the string in the last Email module :
Content
Screenshot 2024-04-23 à 11.13.01

Output

Best,

Hi @Garry_V
You need to iterate to pass the URL separately. Place the map function inside the iterator.

image

Now it will work fine.

2 Likes

Thank you @Msquare_Automation

That’s already the case :
Screenshot 2024-04-23 à 11.20.06

Should I put another one over the first one?

@samliew @Msquare_Automation any idea?
Thank you

What is the output bundle of module [1]? This didn’t come into the picture earlier.

You can try a second iterator with the array from module [44]. You said “That’s already the case” but it looks completely different from what Msquare suggested.

samliewrequest private consultation

2 Likes

“That’s already the case”, I meant I already put a map function into it.

Here the .json:
output-module1.json (90.6 KB)
input-iterator-module39.json (24.3 KB)
output-iterator.json (22.0 KB)

Thank you

Welcome to the Make community!

Yes, that is possible. You’ll need a minimum of two modules:

Then, to combine the attachments into an array for the Attachments field, see:

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.

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.

In your case,

Screenshot_2024-04-24_175724

Give it a go and let us know if you have any issues!

If you need further assistance,

samliewrequest private consultation

2 Likes

Hello @samliew , I’m so sorry but I’m not sure to figure out what I must do.

What I understand : Making consecutively Iterator → HTTP ‘Get a file’ → Aggregator and then Email module.

Is it that right?

Yes, that is how I would do it too.

Output

samliewrequest private consultation

3 Likes

Hello @samliew , I set this up. I’ll let you know if it works.

Iterator et Aggregator are really hard to figure out for a designer like me. I would love to have a clear popularization tutorial that treats Arrays, Collections and at the meantime Iterator and Aggregator functions.
I imagine like a school lesson out of Make interface with kind of blueprint on blackboard :slight_smile:

Best,

Before I started using Make, I completed the entire tutorial in the Make Academy first. I found these useful when I was learning Make, and I recommend going through them before building anything —

General

Help Center Basics

Articles & Videos

3 Likes