How to get / save a copy of the invite_token {{ .Token }} to be used on follow-up emails

Use Case:

  • We invite an email to sign up. There are database changes happening in the background (insert of records, etc) whenever we invite someone. This is done outside of Netlify (Retool) but the invite is using the /invite endpoint of Netlify Identity.
  • If the person did not accept the invite after x number of days, we want to send a “nudge” or follow-up email containing the original “invite link” sent from the original invite. (See: the link on “Accept Invite” link text on the original email)

Routes we tried which don’t fit on our use case:

  • Netlify webhooks
  • Event-triggered functions

We have set-up SendGrid as our Outgoing Email Address. We can see the emails sent there but unfortunately, we can only see the subject and not the body of the email containing the invite_link / token. We thought of “saving” the body of the email from there but it’s not possible with what’s given.

Only think I can think of now is if we can BCC an email where I can set-up a mailhook and from there, parse the email body and get the invite_link / token. But even here, I’m not sure where to set it up now.

Any other insights from support or developers are welcome. Thank you in advanced!
We’re blocked and desperate for some new ideas!

Hi @cpbacon,

Sorry for the delay on this one - this ticket got lost in our internal issue tracking system.

To answer the question, unfortunately, it’s not possible to capture or send the invite token for security reasons - at least no built-in feature allow this.

However, I am not sure why you need to save that exact token. Could you not send another invite email after x days?