Navigate to Design ManagerFrom the HubSpot Dashboard, click on Content > Design Manager.
Create new templateClick on the blue button at the top-right to create a New template.
From this window, choose Code Editor then Email. Once you've selected those two options, click the blue button to Create.
Next you'll want to give your template file a name and choose your save location. It's important to note that when you're naming your file you'll want to make sure it includes a file extension, such as .html, otherwise it won't work properly. Once you've given your file a name and chosen where you'd like to save your file, click Save.
Add your code
You'll be taken to a coded template file that already includes some code to get you started. From here, add your code where necessary. For extra information on coding your email template with HubSpot's markup language (HubL), take a look at email template markup here. You'll want to make sure you add the appropriate HubL modules to give your user editable areas when constructing emails using your custom template.
NOTE: Be sure to include all the required email and CAN-SPAM tokens otherwise it will not allow you to save your email template.
Publish your template
Now that you've added in your code, you're ready to Publish changes to your custom email template.
By default the checkbox next to "Make this template available for new content" should be checked - leave that checked and click Update. Your new custom email template is now ready for use!