Templates API: Sample Flows

This article presents a possible use case and corresponding sample flow that you can support. It provides a useful starting point as you plan your implementation.

Enrich a contact's activity feed with template details

When displaying a contact's activity timeline you may want to show the template's icon and description alongside each activity. This flow shows how to look up template details for a list of activities.

To enrich a contact's activity feed with template details:

  1. Call List Activities with the contact's contactId to retrieve the contact's activities.
  2. Call List Templates, iterating through all pages until no next cursor is returned in metadata.cursors. Build a lookup map of id → template from the results.
  3. For each activity with a templateId, look up the matching template. Use template.icon.url to display an icon next to the activity and template.activityDescription for a short human-readable summary of what the activity represents.

Last updated: 18 August 2026

Did this help?