• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Customizing Setup Password Emails in FusionAuth: Handling Invitation Personalization

Scheduled Pinned Locked Moved Solved
Q&A
login api
1
2
962
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W
    wesley
    last edited by 31 Dec 2024, 20:11

    We are implementing a user invitation flow where the initiator uses the Create a User API and sets { sendSetPasswordEmail: true } to have FusionAuth send an email and handle the next steps.

    We’d like to personalize the email by adding information such as "You were invited by ABC." However, we couldn’t find a field in the API request to include custom data for use in the email template. This functionality exists in the Send an Email API, where the requestData field allows custom values to be used in the email template.

    Are we missing something, or does sendSetPasswordEmail have this limitation?

    W 1 Reply Last reply 31 Dec 2024, 20:17 Reply Quote 0
    • W
      wesley @wesley
      last edited by wesley 1 Feb 2025, 16:21 31 Dec 2024, 20:17

      The sendSetPasswordEmail functionality currently has a limitation in that it doesn’t allow you to pass custom data for use in the email template through the API. However, you can still achieve personalization by configuring the email template directly in the FusionAuth Admin UI.

      Steps to Personalize the Setup Password Email:

      1. Edit the Email Template:
        • Navigate to Customizations > Email Templates > Setup Password in the Admin UI.
        • You can either edit the existing default template or duplicate it to create a new one. Use variables like ${user.firstName!'Unknown User'} or any other user data fields to customize the message.
      2. Assign the Template to Your Application:
        • Go to Applications in FusionAuth.
        • Edit your application and assign the appropriate template to the Setup Password field.
      3. Consider Custom Message Content:
        • Include static or semi-dynamic content like "You were invited by ABC" in the email template. If you have multiple initiators, you might need to create separate templates for each scenario.

      Documentation for Reference:

      • Email Templates and Replacement Variables
      • FusionAuth Email Templates

      While the API does not allow for passing custom fields directly for sendSetPasswordEmail, configuring the templates in the Admin UI should allow you to achieve the desired level of personalization.

      1 Reply Last reply Reply Quote 0
      • W wesley has marked this topic as solved on 31 Dec 2024, 20:17
      1 out of 2
      • First post
        1/2
        Last post