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!