{"_id":"54bc89693e9c780c00303844","category":{"_id":"54bb05cf9741c81500078f73","pages":["54bc3666e55d192000a62ef1","54bc89693e9c780c00303844","561454290ab2550d00166d9d","5614eaac8113d20d00082e6d"],"project":"53844557a43e08da4677be0e","version":"53844558a43e08da4677be12","__v":4,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-18T01:01:03.808Z","from_sync":false,"order":1,"slug":"integration-by-email-type","title":"Integration by email type"},"version":{"_id":"53844558a43e08da4677be12","__v":8,"project":"53844557a43e08da4677be0e","createdAt":"2014-05-27T07:57:12.136Z","releaseDate":"2014-05-27T07:57:12.136Z","categories":["53844558a43e08da4677be13","538619e1ef91f96d49aa1a0b","541e82877eb16bb64f83c0ca","5445a073c3eb3808000c76b2","5445a098c3eb3808000c76b3","54bb05ab522f03150054d9e8","54bb05cf9741c81500078f73","55b7d0e5568be2230092bb92"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"false","version_clean":"1.0.0","version":"1.0"},"project":"53844557a43e08da4677be0e","user":"5384345d90c19d5e43a8170c","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-01-19T04:34:49.590Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"When it comes to integrating data for digest emails, most of what you will need to know is covered in the [Behavioral emails](http://api.knowtify.io/v1.0/docs/behavioral-emails) section of our documentation. \n\nBut often times digest emails come with additional requirements for the data that is inserted into the body of the email. \n\n##**NESTED DATA STRUCTURES**\n\nWhen inserting data into your digest emails, it is often necessary to structure the data in array so that you can create flexible sections in your emails in the cases where each user/recipient of the email have a variable number of some element you want to display in your Digest. \n\nFor example, each one of your users may have a different number of Tasks due for the day, each Task having sub-data attached (Name of Task, Type of Task, Due Date, etc). In this case Tasks would be the parent data point and each element of that task would represent sub-data points (or \"children\"). One of your users may have 3 tasks listed in this array, another may have 10. Using this structure, you will be able to easily display the correct number of tasks for each user in your Digest emails. \n\nYou can find more details for using these nested data structures [here](http://api.knowtify.io/v1.0/docs/nested-data-structrues).\n\n##**INSERTING D3js CHARTS INTO EMAILS**\n\nOften times, inserting a visual chart into a digest email is a powerful way to drive engagement. The challenge with this is that you can't insert SVG files (standard file format for charts) into emails. Any SVG file will need to be converted to an image file before being inserted into an email. And if you would like to generate a large number of unique charts (one for each user) in order to insert them into your digest emails before they ship, generating these images is a real challenge. \n\nWe have a [service](http://api.knowtify.io/v1.0/docs/d3js-charts-for-your-email) that allows you to convert any D3js chart into an image at scale. \n\nIf you are interested in inserting charts into your digest emails, you can read more about how this service works in this [blog post](https://medium.com/:::at:::duilen/embed-d3js-charts-in-emails-b7c1cb725154). Documentation for this service can be found [here](http://api.knowtify.io/v1.0/docs/d3js-charts-for-your-email).","excerpt":"Integrating data for your recurring digest emails with Knowtify","slug":"digest-emails","type":"basic","title":"DIGEST EMAILS"}

DIGEST EMAILS

Integrating data for your recurring digest emails with Knowtify

When it comes to integrating data for digest emails, most of what you will need to know is covered in the [Behavioral emails](http://api.knowtify.io/v1.0/docs/behavioral-emails) section of our documentation. But often times digest emails come with additional requirements for the data that is inserted into the body of the email. ##**NESTED DATA STRUCTURES** When inserting data into your digest emails, it is often necessary to structure the data in array so that you can create flexible sections in your emails in the cases where each user/recipient of the email have a variable number of some element you want to display in your Digest. For example, each one of your users may have a different number of Tasks due for the day, each Task having sub-data attached (Name of Task, Type of Task, Due Date, etc). In this case Tasks would be the parent data point and each element of that task would represent sub-data points (or "children"). One of your users may have 3 tasks listed in this array, another may have 10. Using this structure, you will be able to easily display the correct number of tasks for each user in your Digest emails. You can find more details for using these nested data structures [here](http://api.knowtify.io/v1.0/docs/nested-data-structrues). ##**INSERTING D3js CHARTS INTO EMAILS** Often times, inserting a visual chart into a digest email is a powerful way to drive engagement. The challenge with this is that you can't insert SVG files (standard file format for charts) into emails. Any SVG file will need to be converted to an image file before being inserted into an email. And if you would like to generate a large number of unique charts (one for each user) in order to insert them into your digest emails before they ship, generating these images is a real challenge. We have a [service](http://api.knowtify.io/v1.0/docs/d3js-charts-for-your-email) that allows you to convert any D3js chart into an image at scale. If you are interested in inserting charts into your digest emails, you can read more about how this service works in this [blog post](https://medium.com/@duilen/embed-d3js-charts-in-emails-b7c1cb725154). Documentation for this service can be found [here](http://api.knowtify.io/v1.0/docs/d3js-charts-for-your-email).