Email template variables not working

Is anyone else experiencing issues with email template form variables?

I’ve tried the following with the syntax from the documentation:

Subject:

Invoice {InvoiceNumber} from Foo Bar

Body:


Invoice {InvoiceNumber} for the amount of {TotalAmount} is now available.

You have {TotalAmount} outstanding to be paid by {DueDate}.

Feel free to contact me if you have any questions.

Below is the output when I test email an invoice to myself. Worth noting too, I don’t have any issues with the @@variables@@ for HTML sales invoice footer forms.

Anyone on the forum have email template variables / merge fields working using the syntax shown here (shown below)?

e.g.

{CustomerName} {InvoiceNumber} {TotalAmount} {DueDate}

They don’t work :frowning: . These do,

{{ reference }}
{{ recipient.code }}
{{ recipient.name}}
{{ recipient.email }}
{{ recipient.address }}
{{ business.name }}

If anyone knows another, please tell.

That’s something! I can get the customer name with {{ recipient.name }}.. I’ve tried guessing others e.g. {{ invoice.number }}, {{ total.amount }}, {{ due.date }}, and they convert to blanks.. so it seems like there’s a partially implemented schema. Given PDF generation works, it wouldn’t be too difficult to get the merge fields working?

If the software were open source and the documentation were a wiki, users like me would gladly spend a bit of time to help in return for the free software @lubos

Liquid is being slowly phased out.

However, no alternative is being given for users to load dynamic content into emails.

I will place this in bugs

You can try this code,

{% capture issue_date %}{% for field in fields %}{% if field.label == "Invoice date" %}{{ field.text }}{% endif %}{% endfor %}{% endcapture %}
{% capture due_date %}{% for field in fields %}{% if field.label == "Due date" %}{{ field.text }}{% endif %}{% endfor %}{% endcapture %}
{% capture invoice_number %}{% for field in fields %}{% if field.label == "Invoice number" %}{{ field.text }}{% endif %}{% endfor %}{% endcapture %}

<table style="width: 100%; border-collapse: collapse;">
  <tr>
    <td style="padding: 5px; font-weight: bold;">Invoice date:</td>
    <td style="padding: 5px;">{{ issue_date }}</td>
  </tr>
  <tr>
    <td style="padding: 5px; font-weight: bold;">Due date:</td>
    <td style="padding: 5px;">{{ due_date }}</td>
  </tr>
  <tr>
    <td style="padding: 5px; font-weight: bold;">Invoice number:</td>
    <td style="padding: 5px;">{{ invoice_number }}</td>
  </tr>
</table>

And this code for subject,

{% capture invoice_number %}{% for field in fields %}{% if field.label == "Invoice number" %}{{ field.text }}{% endif %}{% endfor %}{% endcapture %} Invoice number: {{ invoice_number }}

Thank you @Frankie . I’ve been trying to guess the total amount field e.g. {{ total_amount }}.. however I’ve found your’s shown are the only three available if I loop through the available fields

{% for field in fields %}
  {{ field.label }}: {{ field.text }}
{% endfor %}

will output, in my example

 Invoice date: 19/01/2026

 Due date: 18/02/2026

 Invoice number: 19

:confused: just need total amount due on top of this

I don’t think this is possible, only with a custom field on your invoice it is, but you have to type the amount by hand (not the most elegant way)

Got no idea if this will still work as the version of manager I’m using is old, but it may help

{% for total in table.totals %}{% if total.label == 'Total' %}{% capture invoice_total %}{{ total.text }}{% endcapture %}{% endif %}{% endfor %}
{% for field in fields %}{% if field.label == 'Invoice date' %}{% capture invoice_date %}{{ field.text }}{% endcapture %}{% endif %}{% endfor %}
{% for field in fields %}{% if field.label == 'Due date' %}{% capture due_date %}{{ field.text }}{% endcapture %}{% endif %}{% endfor %}
{% capture if_due_date %}{% if due_date == null %}.{% else %} due by {{ due_date }}.{% endif %}{% endcapture %}
{% for total in table.totals %}{% if total.label == 'Balance due' %}{% capture balance_due %}{{ total.text }}{% endcapture %}{% endif %}{% endfor %}
{% capture if_balance_due %}{% if balance_due == null %} {{invoice_total}} {% else %} {{ balance_due }} {% endif %}{% endcapture %}

<b>{{ recipient.name }},</b>
Please find attached your Invoice Number <b>{{ reference }}</b> dated <b>{{ invoice_date }}</b>
The Invoice amount is <b>{{ invoice_total }}</b>
Total balance due is <b>{{ if_balance_due }}</b>

Gives me, for example,
Recipient,
Please find attached your Invoice Number 2404874 dated 15/01/2026
The Invoice amount is $ 244.05
Total balance due is $ 244.05

Thank you @VACUUMDOG … this works! With the help of ChatGPT I’m using ‘strip’ filters to make sure extra spaces aren’t added, shown below.

For anyone interested the code I’m using is as follows:

Subject

{% capture invoice_number %}{% for field in fields %}{% if field.label == "Invoice number" %}{{ field.text }}{% endif %}{% endfor %}{% endcapture %} Invoice {{ invoice_number }} from BUSINESS NAME

Body

{% for total in table.totals %}
  {% if total.label == 'Total' %}
    {% capture invoice_total %}{{ total.text | strip }}{% endcapture %}
  {% endif %}
{% endfor %}

{% capture invoice_number %}
  {% for field in fields %}
    {% if field.label == "Invoice number" %}
      {{ field.text | strip }}
    {% endif %}
  {% endfor %}
{% endcapture %}

{% capture due_date %}
  {% for field in fields %}
    {% if field.label == "Due date" %}
      {{ field.text | strip }}
    {% endif %}
  {% endfor %}
{% endcapture %}

{% for total in table.totals %}
  {% if total.label == 'Balance due' %}
    {% capture balance_due %}{{ total.text | strip }}{% endcapture %}
  {% endif %}
{% endfor %}

{% capture if_balance_due %}
  {% if balance_due == blank %}
    {{ invoice_total | strip }}
  {% else %}
    {{ balance_due | strip }}
  {% endif %}
{% endcapture %}

Dear {{ recipient.name | strip }},

Please find attached Invoice {{ invoice_number | strip }} for the amount of {{ invoice_total | strip }}.

The outstanding balance of {{ if_balance_due | strip }} is due for payment by {{ due_date | strip }}.

If you have any questions or require further information, please don’t hesitate to contact me.

BUSINESS EMAIL SIGNATURE

Which will output

I’ve been struggling with the spacing on my email templates for a while and using capture like this solves it perfectly.

@All I’ve got the same problems. I was using Liquid but out of the sudden my code isn’t working anymore.

Please see me post: Email and Datafields - #18 by canefield

Hopefully someone can help me out. I haven’t got any helpful answers yet.

Thanks in advance,

Canefield

I’m by no means an expert, so I will suggest using or modifying the code in my post above. I’m currently using this when I issue invoices, it does everything I need it to: client name, invoice number, total, remaining balance and due date.

So the solution to this bug is no longer working in v26.5.20.3630, the syntax is completely ignored and I’ve rolled back to v26.5.7.3530 @lubos is there an alternative to this feature in the pipeline?

I posted similar 10d ago:

The ability to customize customer facing emails and documents is important for customer service and was a strong point for Manager. When we lose these without warning and customers start to see variables in email text ot HTML code in document content, it looks bad!

Please add this to bugs and reinstate email variable or (or as an alternative using the footer tag nomenclature) in email templates again. I’ve had to ‘de-presonalize’ emails again. Thank you.

Agreed.

It’s not an ideal fix, but if you use the desktop version and have a backup file from the last version that worked for you, you can load the binary from here and roll back to an earlier version https://github.com/Manager-io/Manager/releases the caveat is you have to use a backup of your database as Manager will warn you your database was modified by a newer version. I won’t be upgrading until the functionality is brought back.

I think for most users the best approach would be for the dev team to not kill functionality without warning. It’s very clear from the forum that people depend on this personalisation and it’s built into alternative platforms.

I already put this in the bugs category a while ago.

All,

I’m not sure if this is a bug, but recently, direct emailing stopped working properly. I’m referring to the fact that fields are displayed as plain text instead of a reference to a data field.

The version I use: v25.11.3.3093

Example:

Normally, Manager.io would fill in the correct text in the subject line in this case. Namely, the name “Factuur” (Invoice) followed by the “Description” and the Reference (‘‘Debtor number-Invoice number’’). Now it just shows the plain text. It also doesn’t complete the text later, for example, by adding the invoice date, invoice amount, etc. This used to work.

I’ve also tried converting the language to English, but that didn’t help either.

Hopefully this can be resolved quickly.

Thanks a lot,
Canefield

The same thing happened yesterday, and it’s still not resolved. I tried these fields, but it’s still not working. This is causing a lot of problems.

I feel like the recent releases are not very stable and have not been tested before updates are pushed.