# Custom activity based newsletters

**URL:** <https://community.hubspot.com/t/custom-activity-based-newsletters/60283>\
**Category:** APIs & Integrations\
**Tags:** email, developer-tools\
**Created:** [July 4, 2022, 11:07am UTC](https://community.hubspot.com/t/custom-activity-based-newsletters/60283 "2022-07-04T11:07:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArnoldMA](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ArnoldMA](https://community.hubspot.com/u/ArnoldMA)\
**Post date:** [July 4, 2022, 11:07am UTC](https://community.hubspot.com/t/custom-activity-based-newsletters/60283/1 "2022-07-04T11:07:05Z")

</div>

Hi All!  
If we need to accomplish the send of a custom, specific user activity-based newsletter that sends weekly/monthly to all users of a custom app… How would we accomplish this? Think Fitbit weekly activity report they email to all users.  
More specifically:  
How would we create a template inside of HubSpot that pulls in specific user information according to the template sections (Perhaps the top displays how many in-app friends they connected with and the middle section displays how many goals tey achieved, and the bottom tells them what % of their goal they have left to attain)  
How do we get this to send to ONLY the user whose data is pulled into it, and then do that for EVERY app user we have?  
And finally, how do we get this data from the custom-built app into HubSpot in a way that makes it useful and accessible to this type of requirement?  
Thanks!  
PS. We have a full dev team, whatever we need to build we will build it. Just looking for some direction to get us started.

---

<div class="post-metadata">

**Author:** ![JPanama](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jpanama/32/43754_2.png) [@JPanama](https://community.hubspot.com/u/JPanama)\
**Post date:** [July 7, 2022, 12:54pm UTC](https://community.hubspot.com/t/custom-activity-based-newsletters/60283/2 "2022-07-07T12:54:34Z")

</div>

Hi @ArnoldMA,

Thanks for getting in touch. Sounds like a great idea and I think we have just the thing to get you started. If you have a CMS Hub Pro or Enterprise, or Marketing Hub Enterprise subscription you can make use of [HubDB](https://developers.hubspot.com/docs/cms/data/hubdb#:~:text=HubDB%20is%20a%20tool%20that,and%20through%20the%20HubDB%20API.).

You can store you app data within tables in HubDB, from there HubDB data can then be retrieved a few ways, depending on your use case. You can:

- Query the data externally via the [HubDB API](https://developers.hubspot.com/docs/methods/hubdb/hubdb_overview?_ga=2.196207854.330901250.1583937788-2053671461.1524595016)
- Use HubSpot’s HubL markup tags to pull data into the CMS.
- Use the HubDB API with [serverless functions](https://developers.hubspot.com/docs/cms/features/serverless-functions) to provide an interactive web app experience.

Once you’ve managed to bridge the gap between your external data and HubDb, you can then render that data in your Marketing Emails using personalisation tokens. [You could do this using the Progammable Email feature.](https://knowledge.hubspot.com/email/create-programmable-emails)

If you’re not familiar with [HubL](https://developers.hubspot.com/docs/cms/hubl), it’s our HubSpot Markup Language which is an extension of Jinjava. You can use HubL alongside the Programmable Email beta to pull your HubDB data directly into your Marketing Emails.

Let me know if you have any questions on this!

Best,  
Joe (HubSpot Moderator)

---

<div class="post-metadata">

**Author:** ![ArnoldMA](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ArnoldMA](https://community.hubspot.com/u/ArnoldMA)\
**Post date:** [July 12, 2022, 5:39pm UTC](https://community.hubspot.com/t/custom-activity-based-newsletters/60283/3 "2022-07-12T17:39:06Z")

</div>

Wow thanks for the great response, I’ll review this with our developers and check back in if we have follow-up questions.
