1

Zapier question - Connecting Send Grid and Firebase together for triggering a welcome email.

I've managed to get sendgrid and firebase working together in zapier.

Problem I have is I need to get the email to trigger when a new user object is added to the Firebase users table.

Here is a screen shot of my current triggers:

enter image description here

AngularM
  • 15,982
  • 28
  • 94
  • 169
  • Quick question, are you using the Firebase trigger `Add Child Record`? I'm trying to use it and it has been deprecated. Do you happen to know if it is ok to use, or a better solution? – Script Kitty Jun 25 '16 at 21:39

2 Answers2

3

You won't have direct access to the Firebase users table (node) so that won't serve as a trigger.

However, traditionally, Firebase apps have a /users/ node where other data about a user would be stored; first and last name, address, love of pizza etc. And that node would have a key that matches their uid.

That's the node you want to use to trigger Zapier; when you create a new firebase user, you also add their data to your /users/ node to then trigger the email.

One thing to note is that Zapier will/can automatically remove a trigger node in Firebase so you may just want to dump the email in a /need_to_send_email/ node with the email address and let Zapier trigger and then remove that data as it would no longer be needed.

typical Zapier structure within firebase

app_name
  zapier_queue
    out
     email: "somedude@cooldudes.com"
Jay
  • 34,438
  • 18
  • 52
  • 81
  • Hi Jay, thanks for your reply. what would the zapier "path to record be" ? – AngularM Jan 06 '16 at 17:42
  • added a bit more to the answer. Hope that helps. – Jay Jan 06 '16 at 17:54
  • Basically I want to send emails when things happen so I need to watch nodes changes dynamically – AngularM Jan 06 '16 at 18:23
  • So for example: when a new user node is added I need zapier to grab that new user node and email them – AngularM Jan 06 '16 at 18:26
  • Also I have a list of user nodes in my firebase table called /users – AngularM Jan 06 '16 at 18:27
  • 1
    We do something similar in our app. Our app watches Firebase for changes; say a new user signs up. Once the event happens our app takes whatever data Zapier needs to know about and stores it in a node that Zapier is watching - the zapier_queue in the above example and we dump the email address to that node. This process allows you to selectivity send data to Zapier. – Jay Jan 06 '16 at 18:46
  • I see that's clever. Could you show me some zapier and firebase examples of this working? – AngularM Jan 06 '16 at 19:33
  • I would suggest starting with a simple firebase app - maybe even the one presented on the Firebase Getting Started Guide except change the target node to zapier_queue/out/email: and then get yourself familiar with Zapier. It took a little time to get used to their web interface but once we figured it out, it was a snap to react to Firebase triggers. I believe Zapier has some canned examples and maybe even a walk through? If nothing else, shoot them an email. – Jay Jan 06 '16 at 20:46
  • 1
    oh oh. See my answer and example here [Zapier Firebase](http://stackoverflow.com/questions/31663720/how-to-send-email-with-all-information-associated-with-user-id-in-firebase/31684652#31684652) – Jay Jan 06 '16 at 20:48
  • @Jay Hi, thank you for your helpful answer. Are you using the Firebase trigger `Add Child Record`? It's been deprecated and I am desperately looking for an alternative (my app is done, SendGrid provisioned, etc.) – Script Kitty Jun 25 '16 at 21:42
  • @ScriptKittyIt appears that Zapier and Firebase are not 'on the same page' any longer so that's not a good solution. Firebase v3 has a lot of new features so you should investigate those - however, I don't know what you mean by Add Child Record has been depreciated. Are you referring to Zapier? – Jay Jun 25 '16 at 23:06
  • @Jay One of firebase's triggers in Zapier is 'Add Child Record', and that trigger doesn't show up anymore on the main page but it is reachable from the documentation where it says deprecated. Is there any other way to use firebase hosting and set up automatic emails? I do not have any server-side code set up. Thanks – Script Kitty Jun 28 '16 at 00:39
0

This should be much easier now that Google Cloud Function for Firebase have been announced, example code here.

ostergaard
  • 3,377
  • 2
  • 30
  • 40