dailyhack icon indicating copy to clipboard operation
dailyhack copied to clipboard

Make Dynamic Email Template with JSON data or APIs

Open mddanishyusuf opened this issue 4 years ago • 0 comments

Dynamic Email Template

This tool will Generate Email Template Code with Dynamic Data as JSON object or API. Get the generated email template and add into Mailchimp, Sendgrid or whatever service you are using to send newsletters.

Tool Website: https://dynamic-template.xyz

How to use

Step 1 : Add your template code into "Code" with Handlebars syntax to iterate and bind dynamic data with Email Template code. Ex:

<table>
    <tr>
        <td>
            <h2>Public APIs Weekly</h2></td>
    </tr>
    {{#each items}}
    <tr>
        <td>
            <h3 style="margin: 0; padding:0">{{title}}</h3>
            <p style="margin: 0; padding:0">{{description}}</p>
        </td>
    </tr>
    {{/each}}
</table>

Here you can get to know about Handlebars syntax https://handlebarsjs.com/

Step 2 : Add the JSON data into "Test Data" to bind with the Email Template. If you have API endpoint for the data then you can alse get data through your REST API. Just add your API and click "Get Data". Ex:

{
  "name": "Danish",
  "email": "[email protected]",
  "items": [
    {
      "title": "GitHub API",
      "description": "Information for a user's Github profile"
    },
    {
      "title": "Open Collective",
      "description": "Platform where communities can collect and disburse money transparently to sustain themselves and develop their activities"
    },
    {
      "title": "Fortnite",
      "description": "Fortnite Stats & Cosmetics"
    }
  ]
}

That's all.

Get your generated Email Template from "Template".

Tool Website: https://dynamic-template.xyz

mddanishyusuf avatar Jul 14 '19 16:07 mddanishyusuf