Grant-level templates
Grant-level templates let you create reusable messages with dynamic content. Each template is linked to the grant specified in a Create Template request.
Nylas supports the following templating engines:
Use mustache }} for simple variable substitution. Use Handlebars if you need conditionals, loops, or the formatDate helper, which mustache can't call.
GET /v3/grants/{grant_id}/templatesReturns a list of grant-level templates.
POST /v3/grants/{grant_id}/templatesCreates a grant-level template.
GET /v3/grants/{grant_id}/templates/{template_id}Returns the specified grant-level template.
PUT /v3/grants/{grant_id}/templates/{template_id}Updates the specified grant-level template.
DELETE /v3/grants/{grant_id}/templates/{template_id}Deletes the specified grant-level template.
POST /v3/grants/{grant_id}/templates/{template_id}/renderRenders the specified template with the provided variables. Nylas looks for a grant-level template with this ID first. If the grant doesn't have one, it renders the application-level template with the...
POST /v3/grants/{grant_id}/templates/renderRenders the HTML content of a grant-level template using the provided variables and specified templating engine.