Hi team! I have a question re email templates for ...
# ory-network
m
Hi team! I have a question re email templates for verification and recovery emails. We have multiple frontends (different application names) that use one Ory project (we're using Ory Network). We want to add to the email the frontend application name. So users are familiar with what and where the email comes from. For example, if a user registers in Frontend A, an email from Ory verification should contain a welcome message (e.g., Welcome to Frontend A) and then the verification link. The same scenario if a user registers in Frotend B and so on. Is there a way to achieve this? Some questions in mind: • Can we pass a parameter from the verification/recovery workflow that can be accessed in the email template? • I see we can access the Identity public metadata in the email templates. How can we populate that during the registration workflow (i.e., add the registration source) in both email+password and social sign ups? Thanks!
m
Hey @mysterious-van-90907 • Can we pass a parameter from the verification/recovery workflow that can be accessed in the email template? Yes afaik you can pass anything from the identity https://www.ory.sh/docs/kratos/emails-sms/custom-email-templates#metadata-in-templates • I see we can access the Identity public metadata in the email templates. How can we populate that during the registration workflow (i.e., add the registration source) in both email+password and social sign ups? Using Ory Actions: https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#update-identity-metadata
m
Thanks! We ended up adding it to the identity traits (the registration source). I think it is easier than implementing webhooks (ie. need a separate external REST API).