If you need further assistance, please provide the following:
2. Scenario Blueprint
Please export the scenario blueprint. Providing your scenario blueprint file will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return - this would greatly benefit you in implementing our suggestions as you can simply paste module exports back into your scenario editor!
To export your scenario blueprint, click the three dots at the bottom of the editor then choose ‘Export Blueprint’.
You can upload the file here by clicking on this button:
3. Output Bundles of Modules
Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).
Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.
Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.
You can upload the file here by clicking on this button:
B. Insert as Formatted Code Block
If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:
Method 1: Type code block manually
Add three backticks ``` before and after the content/bundle, like this:
``` content goes here
```
Method 2. Highlight and click the format button in the editor
Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved, and help you with mapping the raw property names from collections.
Sharing these details will make it easier for others to assist you.
Remove your first “Set Multiple Variables” module.
In your second “Set Multiple Variables” module, use the switch() formula like this:
switch({{1.`ID Fournisseur`}};3;Original Home;4;Chehoma;5;Casa Cubista;6;...) switch({{1.`ID Catégorie`}};8;Art de la ...;9;Art de la ... > Accessorie;16;Art ... Linge de table;17;...)
Rough explanation of how the formula works: you’re “switching”/changing the output of the “variable” based on conditions - “IF_THIS” > “THEN_THAT”, or in your case “3” > “Original Home”, “4” > “Chehoma”, etc.
Your final scenario should then be: Google Sheets (trigger) > Set Multiple Variables (with switch() formulas) > Google Sheets (add a row)
(You can also just write the switch() formulas directly in Google Sheets [add a row] module and get rid of the “Set Multiple Variables” modules entirely)
2. Tools > Switch Module
If you don’t want to use the formula, there’s a dedicated module in Tools > Switch that does the same thing:
Super, great, fantastic!
Not only does it work, but I’ve got it all figured out - I could do it again!
It was superbly explained, and with kindness to boot.
The English support is not easy for a French person like me, even with the translation.
I tried the first and the third (which is the most practical, as I already had the json).
Thanks again, I loved learning this technique.