Extract pictures URL through Iterator module

Hello Makers,
As you will see in attachment files, I seem to use Iterator in a good way because I got Array of Collections as OUTPUT. But then, in my Text aggregator, I got the following string “[Collection], [Collection], [Collection]”…

Can you please help me to get every variable called “url”, which are URLs from pictures, in my Text aggregator? (Ideally, each URL in a new line in order to integrate them in an email)


Thank you,

PS : I have a second question about this use case, how to attach those pictures thanks to URLs in an email, with the Email module I already use in my scenario? I surely won’t use it here but I’m curious to learn how to do it

You might not even need an Iterator-Aggregator combo if all you need are some values.

An example would be How would you get all values from specified elements without using iterator? - #8 by samliew

If you need further assistance, please provide the following:

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Input/Output bundles

Please provide the input and output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-input-bundle.txt (12.3 KB)
module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Hi @Garry_V

You have mapped the array with array in your iterator. Resultant you are getting an array from your iterator output. The array I have marked in the image is the one to map in ietartor or you can use map function over this array to map urls:

Screenshot 2024-03-14 213413

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

3 Likes

Hello @samliew , thank you for your link [quote=“samliew, post:2, topic:30524”]
How would you get all values from specified elements without using iterator? - #8 by samliew
[/quote]

I deleted Iterator-Aggregator combo and here I show you what I’ve done :
Screenshot 2024-03-15 à 11.10.46

I’m waiting for new data as a test and let you know if it works, thank you!

By the way, if I apply this function in Attachments field, do you think it works?
Screenshot 2024-03-15 à 11.13.48

best,

Hello @samliew, as I said in my previous message, I’ve tried as it is described in your link, it works but I got only the 1st item ok the collection.

Here is the output.json from my webhook :
output.json (68.1 KB)

And here the formula I used as you describe :
Screenshot 2024-03-18 à 15.21.55

Do you have any suggestion?

Best,

Hello Makers, @samliew , @Msquare_Automation ,
Any idea?
Thank you

hi @Garry_V
Created a sample output after the iterator module in your first scenario

you can map the array to get all the urls as an array

output:

3 Likes

Thank you @Msquare_Automation

Here what I’m trying following your answer, let’s see what will happen


Iterator module is really not easy to understand, even after having watched videos and videos :face_with_diagonal_mouth:

@Garry_V
Can you show what output you are getting after the iterator

2 Likes

@Garry_V
It seems input is empty for the given file
image

2 Likes

@Msquare_Automation Thank you so much. After several tests, it finally works as you suggest me

Iterator
Screenshot 2024-03-29 à 13.36.44

Set a variable
Screenshot 2024-03-29 à 13.37.04

Email
Screenshot 2024-03-29 à 13.38.24

Now I’m trying to attach those files into email module through URLs I get out from the Set a variable module :

Let’s try, it’s a test :slight_smile:

I think you’ll have to download each file using the HTTP “Get a File” module before you can attach it to the email.

2 Likes

Ok thank you. I’ve just added it, let’s try.

Hello, 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