Dynamic copyright year in email template


In the project I’m working on recently, I created an email template in Auth0 for password reset, which has a footer area like this:

    © 2021 CompanyName

I’m trying to make “2021” part dynamic based on the current timestamp so that I don’t have to go into Auth0 dashboard every year and hardcode the year (Likely I’ll forget to do it). Ideally I want to use a variable and make it like:

    © {{current_year}} CompanyName

However, this doesn’t seem to be possible from what is provided in templates:

Is this actually achievable? If not, what would be the best way to make the year dynamic?

Hi @shuhei.nakahodo

Since the email templates are based on the Liquid syntax, to get the current year you can do:

{{ “now” | date: “%Y” }}

You can also read more about the Liquid syntax here: Use Liquid Syntax in Email Templates

1 Like

Thanks for helping on this one Ricardo!

@ricardo.batista Thanks for replying to this thread. The syntax is working for me as expected which is awesome! Thanks a lot for the help.

1 Like

Great! We are here for you!