Hello, I am currently successfully using custom email templates for different languages by using user_metadata and including code like this in the email template
{% if user.user_metadata.lang == ‘de’ %}
Bestätigen Sie Ihre E-Mail-Adresse.
{% else %}
Confirm your email address
{% endif %}
In my application I am using the /api/v2/jobs/verification-email endpoint to provide the user with an option to manually resend verification email. But the user_metadata apparently is not available in the email template in this case. In the request body I can only pass the user_id
Is there a solution to send internationalized custom email templates trigegred via management api?
Yes, Auth0 provides a solution to send internationalized custom email templates triggered via the Management API. You can customize email templates using Liquid syntax and include user metadata to personalize the content:
{% if user.user_metadata["lang"] == "de" %}
Bestätigen Sie Ihre E-Mail-Adresse.
{% else %}
Confirm your email address
{% endif %}
To internationalize the templates, you can use the user’s preferred language information stored in their profile metadata (user_metadata).
When triggering emails through the Management API, you can specify the template to use and include any necessary custom variables. This allows you to send localized email content based on the user’s preferences or location.
Please note that before customizing email templates, please set up your Email Provider.