Skip to main content

Are there any API calls that we can use to trigger the sending of any of the email notifications?

 

It would be useful for certain operations we do such as changing a user's email and sending the email validation notification.

None that I’m aware of. 

You could probably get there in a “hacky” way using custom roles and automate email campaigns triggered off those roles. However, I don’t think that fits your specific use-case, which wants to use the system email functionality including generating a unique {activation_url}

(And by looking at the code of that system email, it’s interesting that the variable is focused on activation, rather than email validation. In your use case, the user is already active, so I’m not sure it would even work. My guess is that when these registration settings are in place, the activation URL triggers the primary role switch from Awaiting Email Validation to Registered User. The link doesn’t actually validate the email, it just triggers the role switch. What actually validates the email is that the user received it, opened it, and clicked this unique link.)


Though… if the activation url follows a predictable structure that involves the userId, the “hacky” approach could work. 

In theory you could trigger an automation on the email change that…

  1. Changes their primary role to awaiting email validation
  2. Adds a custom role

Then have the role trigger an automated email campaign that uses that predictable structure. (I think you’re blocked here, though… I don’t believe you’d have a way to add the {userId} variable to the URL you’d want to include in the email. So there’s not actually a way to pre-set the email campaign.)

Then test and confirm that the activation link logic will work again to switch their primary role to registered. 


Though… if the activation url follows a predictable structure that involves the userId, the “hacky” approach could work. 

In theory you could trigger an automation on the email change that…

  1. Changes their primary role to awaiting email validation
  2. Adds a custom role

Then have the role trigger an automated email campaign that uses that predictable structure. (I think you’re blocked here, though… I don’t believe you’d have a way to add the {userId} variable to the URL you’d want to include in the email. So there’s not actually a way to pre-set the email campaign.)

Then test and confirm that the activation link logic will work again to switch their primary role to registered. 

Thanks Danny, that's some good observations. I'll test something out!


Reply