Skip to main content
Solved

Version control for templates

  • March 4, 2025
  • 5 replies
  • 53 views

Forum|alt.badge.img+1

Hi,

I was wondering if anyone has been able to integrate version control for Klaviyo templates? ideally via github or something similar. 

I’ve been looking into it and have come up with an idea to export the template HTML and keep that in github. The issue with this is that the templates would then need to be changed to be a single HTML block and some of the WYSIWYG functionality will no longer work.

Thank you

Best answer by MANSIR2094

Hey ​@Joely , Thank you for reaching out.

 

I know you're looking for a way to integrate version control for your Klaviyo templates using GitHub. While Klaviyo doesn't have built-in support for this, there's a workaround.

 

One simple approach is to export your template HTML and store it in a GitHub repository. This way, you can track changes, collaborate with others, and revert to previous versions if needed.

 

However, if you're using Klaviyo's drag-and-drop editor, this method has a downside: you'll lose the editor's functionality. To get around this, you could maintain two versions of each template: one for GitHub and one for Klaviyo.

 

A more elegant solution is to use Klaviyo's API to automate the process. You can set up a script to fetch template data from Klaviyo, push changes to GitHub, and even re-upload modified versions back to Klaviyo.

 

This way, you can maintain version control while keeping your templates editable in Klaviyo's system. Let me know if you need help with setting up an API workflow to automate the syncing process!

5 replies

MANSIR2094
Expert Problem Solver IV
Forum|alt.badge.img+19
  • Expert Problem Solver IV
  • Answer
  • March 4, 2025

Hey ​@Joely , Thank you for reaching out.

 

I know you're looking for a way to integrate version control for your Klaviyo templates using GitHub. While Klaviyo doesn't have built-in support for this, there's a workaround.

 

One simple approach is to export your template HTML and store it in a GitHub repository. This way, you can track changes, collaborate with others, and revert to previous versions if needed.

 

However, if you're using Klaviyo's drag-and-drop editor, this method has a downside: you'll lose the editor's functionality. To get around this, you could maintain two versions of each template: one for GitHub and one for Klaviyo.

 

A more elegant solution is to use Klaviyo's API to automate the process. You can set up a script to fetch template data from Klaviyo, push changes to GitHub, and even re-upload modified versions back to Klaviyo.

 

This way, you can maintain version control while keeping your templates editable in Klaviyo's system. Let me know if you need help with setting up an API workflow to automate the syncing process!


Forum|alt.badge.img+1
  • Author
  • Contributor IV
  • March 5, 2025

Thanks ​@MANSIR2094 , the API could be a good option. Is there a webhook or trigger that Klaviyo will fire when a template is updated? 


MANSIR2094
Expert Problem Solver IV
Forum|alt.badge.img+19
  • Expert Problem Solver IV
  • March 5, 2025

 

Hey ​@Joely , Thanks for the feedback, and for your question I realized that Klaviyo doesn't have a built-in webhook for template updates. But don't worry, there's a workaround!

 

You can use the Klaviyo API to periodically check for changes to your templates. Essentially, we will fetch the template data using the GET /api/templates/ endpoint, and then compare it to a stored version.

 

If we note any differences, we can trigger an action to push those changes to GitHub. It's a bit more manual, but it gets the job done!  Want some help setting this up


Forum|alt.badge.img+1
  • Author
  • Contributor IV
  • March 5, 2025

Thanks ​@MANSIR2094 , I was hoping that there would be something within Klaviyo that would allow us to do this. It’s baffling that such a large product doesn’t have some sort of version control integration or better yet, version control built in.  

 

I’ll park this for now and reach out to you if we do decide to go ahead. 


MANSIR2094
Expert Problem Solver IV
Forum|alt.badge.img+19
  • Expert Problem Solver IV
  • March 5, 2025

Alright ​@Joely , 

Don't hesitate to reachout if you need help.