Customizing Emails by Language
Last edited: 12/16/2025
When you register a user, you can create meta-data about them.
Creating meta-data with the JS-Client's signUp function
1const { data, error } = await supabase.auth.signUp({2 email: 'email@some_[email.com](http://email.com/)',3 password: 'example-password',4 options: {5 data: {6 first_name: 'John',7 last_name: 'Doe',8 age: 27,9 },10 },11})The above example creates a user entry that includes information about their name and age. The data is stored in the auth.users table in the auth.raw_user_meta_data column. You can view it in the auth schema with the SQL Editor.
It can be accessed in a project's Email Templates. Below is an example:
1<h2>Hello, {{ .Data.first_name }} {{ .Data.last_name }}!</h2>23<p>Follow this link to confirm your account:</p>4<p><a href="{{ .ConfirmationURL }}">Confirm your account</a></p>If you need to update a user's meta-data, you can do so with the updateUser function.
The meta-data can be used to store a users language preferences. You could then use "if statements" in the email template to set the response for a specific language:
1{{if eq .Data.language "en" }}2<h1>Welcome!</h1>3{{ else if eq .Data.language "pl" }}4<h1>Witamy!</h1>5{{ else }}6<h1>chuS'ugh, tera' je (Klingon)</h1>7{{end}}Supabase uses the Go Templating Language to render emails. It has advanced features for conditions that you may want to explore. For more examples, there is a GitHub discussion that discusses advanced language templates.