Hi. I am testing out sending an email via Mailgun, and using the Templates API. I have a saved template in Mailgun, using the Handlebars notation.
The module takes a section - Template Variables. With map unticked, this allows you to enter name-value pairs, like Name = “John Doe”.
I would like to also pass an array of items in the template variables, like Products = [ {title: “Product 1”, price: 10.00}, {title: “Product 2”, price: 20.00} ] in JSON notation.
The Value field shown above does not seem to take any array form notation.
I could find no documentation on what it expects when you set Map = TICKED. Ive tried passing JSON as per below, but it doesnt work, giving an error:
Validation failed for 1 parameter(s).
- Array of objects expected in parameter ‘templateVars’.
Any idea how this would be possible? Are there specific documentation articles related to such integrations?
Regards,
Karl