Mandrill Handlebar Template does not render / merge with Parse.com object correctly

860 Views Asked by At

I'm using Mandrill to send template-based email notifications each time a given Object is created in a Parse.com app.

The Mandrill template (made with Handlebars) uses 2 typical Parse.com object properties:

  • objectId --> {{object.objectId}} in the template
  • createdAt --> {{object.createdAt}} in the template

The problem is that other object properties, but these don't.

Any clues?

1

There are 1 best solutions below

0
On BEST ANSWER

The basic problem keeps unsolved. However I had several other problems using the Mandrill api, so I will leave it here for helping others:

Symptom: None of the other object properties got rendered

Problem1: used template_contents that only support strings, not objects as content

Solution1: use global_merge_vars

Problem2: used global_merge_vars outside the message parameter

Solution2: use global_merge_vars inside the message parameter

Symptom: every object property gets rendered except objectId and createdAt

Problem: still don't know

Partial Solution: copy objectId to id in parse