I want to generate an email (Gmail) with order details every time a new Upsales order has been registered. I’ve managed to trigger the email, but I can’t figure out how to sort the text in the email correctly. I want to pair each product with its correct location and time period, which is where I got stuck. Right now the email looks like this:
Upsales-ID: 1234
Key Account Manager: Jane Doe
Client: Client ABC
Products: Product 1,Product 2,Product 3
Location: Location 1,Location 2,Location1
Time period: 2023-10-04,2023-12-04,2023-10-04,2023-12-04,Week 42,44,46 and 50,2023-10-04,2023-12-04
I want to group Product 1 with Location 1 and the first time period (2023-10-04 → 2023-12-04), and so on, in the email. How do I sort and pair the text correctly?