Describe the problem/error/question
Hello ^^
I am working today on a workflow to create some google document and then fill them up with product titles and information.
The trick is, I need to create only one document per shop and then fill them with every product coming from this shop.
Example : I have 3 products
- Product 1 comes from Shop A
- Product 2 comes from Shop A
- Product 3 comes from Shop B
=> I must have at the end - Document A with Product 1 and 2 info
- Document B with Product 3 info
So, my reasoning was the following. I can order my products by shops with the items list node. Then, I can create a loop that will :
- On the first iteration, create a document and add the info of the first product
- On the second and following iteration, check if the product comes from the same shop than the last iteration product
- If yes, I can add the information to the current document
- If no, I can create a new document for this shop.
What is the error message (if any)?
Only problem is, when I get to the node that check if the current shop is the same than the previous iteration, I get the error : ERROR: invalid syntax
So from my understanding, I am then not able to reference the info of a previous node ?
Please share your workflow
Thanks for your advices and if you have any workaround, that would help
Information on your n8n setup
- n8n version: cloud
- Running n8n via (n8n cloud):
- Operating system: Windows