1

I am working on an app and using firebase app invite so app user can invite their friends using the firebase app invite mechanism. Overall, it seems to work fine but I want to customize the email msg/subject of the invite that gets sent out and include name of the person to whom I am inviting in the message. So if I have John Smith and Foo Bar as friends, when I send emails out, I want the emails to start with Hi John! or Hi Foo!.

I couldn't find a way to pass the names selected to my email (like APPINVITE_LINK_PLACEHOLDER for app link). I tried %FIRST_NAME% but that doesn't work either. What special variables should I use for this? The best practices for firebase app invite recommends to customize the email message, so I suppose there is some way to do this but I can't seem to find it. Any help would be appreciated.

Thanks in advance, Abhijit

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Abhijit Vaidya
  • 121
  • 2
  • 8

2 Answers2

4

The short answer is you can't currently do this. (Somewhat by design, I believe.) I've requested that we remove that recommendation from our best practices for now.

That said, I do like the idea of having some a few mail-merge-like flags that you could insert into the invitation email so that you can add some nice personalization to your outbound messages. I've filed a feature request with the team, so we'll see what happens.

Todd Kerpelman
  • 16,875
  • 4
  • 42
  • 40
0

Firebase Invites does not send bulk messages, so it doesn't have a mail-merge like template system. Instead of that your app's code is involved with every message that is being sent, so you can customize it there.

For more information in how to do that and an example of how to use it, see the documentation for Android or iOS.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Thanks for your reply. However, I am still confused regarding how the data passed back to my app. When the user chooses "John Smith" from the contacts list, how is this name passed to my app code? The documentation seems to indicate that I get a callback only when the invitation is sent, so how I can customize the msg with the selected contact name before the invitation is sent out? – Abhijit Vaidya Jun 06 '16 at 23:33
  • 1
    Good questions. I've reached out to a few people to see if they can help. – Frank van Puffelen Jun 07 '16 at 02:10
  • I'm also looking for a way of personalizing the email/sms so am looking forward to any developments in this regards. By the way, i notice that if i use setEmailHtmlContent() to customise an email, i am forced to also use setMessage() else the email can't be sent unless the user then types in a message - kind of defeats the purpose of using the custom html, at least i think so. so would be nice if not forced to use setMessage() when using html. – Clive Sargeant Aug 15 '16 at 17:34