paul2
January 20, 2024, 12:34am
1
Hello,
I’m trying to modify my output structure in the screenshot to this one below (I want to create new rows in a Google spreadsheet that is generated from a template using a webhook / button in Airtable )
Bundle 1
recSaJPhLTTvWkL0n
CL832
Madame n°7
Bundle 2
recQRjsqC0cYKRJ9P
CL832
Le Monsieur 2
Bundle 3
recIp3E9zjywJLHQu
CL463
Diomme
How can I achieve this (knowing that the number of items in my array can change ? Also I just need to collect the data in the 3 arrays that are expanded.
Any help would be much appreciated
Thanks!
samliew
January 20, 2024, 12:49am
2
Welcome to the Make community!
Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
A.
Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.
Uploading it here will look like this:
bundle.txt (12.3 KB)
B.
If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle 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:
Providing the 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
paul2
January 20, 2024, 1:13am
3
Thanks for the welcoming
Sure here you go
[
{
"fld3aXzVFZQ2GUW0L": [
"rec4o2eTtF79wkaZg",
"rece83a6hxF8wQc8F"
],
"fldCGjfIrMqTGsWKk": "ORDER8983",
"fldieBPUIMNRwTock": [
"recECD1ERNuGPxy0b"
],
"fldJ51li0PDpJvOqE": "ORDER8983",
"fldlPIYWzM2Ulphr4": [
"CL768",
"CL123"
],
"fldtdGRO2gDArN7Zx": [
"Madame n°8",
"Le Monsieur 1"
],
"fldt43W0lxgokeh3c": {
"label": "Créer GG Sheet",
"url": "https://hook.eu2.make.com/xxxxxxx?airtablerecordID=reczp249JOxMMZBvc"
},
"fldWnVUUGkhUeIXA7": [
"SEPHORA"
],
"id": "reczp249JOxMMZBvc",
"createdTime": "2024-01-19T20:00:20.000Z"
}
]
Hey there @paul2 you can get your output for webhook into an array aggregator and map the 3 fields you want into aggregated fields
This will create an array with elements each containing the three required fields
Then you can use an iterator on array aggregator and map the artay you get from aggregator there
This will make the bundles as you specified
Cheers!
2 Likes
Looks like it can’t work this way. Can you provide an example of how your suggestion will work?
1 Like
paul2
January 20, 2024, 11:32am
6
@ThakurHemansh @samliew
Hey! Thanks for feedback. I tried to follow your instructions but I think that I missed something because final result is not the expected output.
1- “you can get your output for webhook into an array aggregator and map the 3 fields you want into aggregated fields ”:
configuration and output
[
{
"array": [
{
"fld3aXzVFZQ2GUW0L": [
"recSaJPhLTTvWkL0n",
"recQRjsqC0cYKRJ9P",
"recIp3E9zjywJLHQu"
],
"fldlPIYWzM2Ulphr4": [
"CL832",
"CL345",
"CL463"
],
"fldtdGRO2gDArN7Zx": [
"Madame n°7",
"Le Monsieur 2",
"Diomme "
]
}
],
"__IMTAGGLENGTH__": 1
}
]
2- “Then you can use an iterator on array aggregator and map the array you get from aggregator there ”:
configuration and output
[
{
"value": "recSaJPhLTTvWkL0n",
"__IMTINDEX__": 1,
"__IMTLENGTH__": 3
},
{
"value": "CL832",
"__IMTINDEX__": 2,
"__IMTLENGTH__": 3
},
{
"value": "Madame n°7",
"__IMTINDEX__": 3,
"__IMTLENGTH__": 3
}
]
So yes at the end I got the right structure I wanted (3 bundles) but unfortunately without the correct values. This is what I would need
Bundle 1
recSaJPhLTTvWkL0n
CL832
Madame n°7
Bundle 2
recQRjsqC0cYKRJ9P
CL345
Le Monsieur 2
Bundle 3
recIp3E9zjywJLHQu
CL463
Diomme
I would need this output in order create 3 new rows in a Google sheet (The Google sheet will be generated from a template)
This is the Google Sheet template:
This is the Google sheet I expect:
paul2
January 27, 2024, 12:08pm
7
Any update / new feedback would be much appreciated as i’m still struggling to solve this issue
Cheers
Yes, that is possible. You’ll need a minimum of two modules:
1. Iterate one of the arrays
2. Use Set Multiple Variables to Map values from the arrays
Use the “Bundle order position” variable from the iterator
Give it a go and let us know if you have any issues!
2 Likes