Email Template in magento work based on 2 values.
your template must be there in xml file OR in database.
For the first approach, You need to define and create your own email template for this in your custom module .for example etc/email_templates.xml
from Module module-email
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="design_email_header_template" label="Header" file="header.html" type="html" module="Magento_Email" area="frontend"/>
<template id="design_email_footer_template" label="Footer" file="footer.html" type="html" module="Magento_Email" area="frontend"/>
</config>
and template under module-email/view/frontend/email
OR
i have checked by dirty trick
Create new template from admin panel and grab value of id
(increment id)
after that inserted entry in core_config_data
INSERT INTO `core_config_data` (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES (NULL, 'default', '0', 'design/email/footer-invoice_template', 'increment id');
in above case i have added increment id
as 2 which is template id from DB which i have created
now you can place your template in any email
{{template config_path="design/email/footer-invoice_template"}}
it should work.