Tuesday, November 25, 2014

Automated Email Form Part 2

Continuing our post from Automated Email Form Part 1.

Now you have a trigger setup in Zapier, lets setup the webpage to send an email to yourself.

This will be an AngularJS app, so add the appropriate pieces to make it work. (you can look at angularjs.org or many online tutorials for specifics).

First lets add an input field to your webpage like so:



If you notice I left name in there, but i'm not collecting names, I decided the less a user has to type the lower the barrier to contacting me in this case. Maybe one day I'll add a name if I feel its necessary, but just adding one more field with the NG model set to name would capture the users name for yourself.

Basically I setup an NG-Click to call a function in my angularjs code.

So while in some cases you could put your angularjs code in html, most of the time you put it in a .js file, (I'm putting in the .html so there are script tags surrounding, but generally don't do that, unless it's a REALLY simple app, which in this case it is).



If you notice I do a simple regex email validate check.

When it passes it pushes the email address to my firebase link, next Zapier picks up the change and sends you an email.

Pro Tip: In fact I almost forgot I had it setup and when I received an email with the submitted email, I got really confused. so DON'T forget to make the subject easily recognizable, otherwise you might run into the same case :)

Good luck and let me know how it works for you!

Tuesday, September 23, 2014

100 year glasses

My parents crack me up. Anytime there's an argument, or concern about something they like to use the phrase
Don't worry about it if it won't matter in 100 years

I always kinda brushed it off, and found it was useful to tell to others who were upset but not for yourself.

I was thinking about it just now and realized what if we started looking at things with 100 year glasses.

What would change, what things would matter?

I agree with Elon Musk (and I'm sure plenty of others) that becoming a multiplanetary race is a good thing.

I agree reducing our reliance on oil is a good thing (however I feel that reducing our need on energy in general is a good idea).

I agree finding a way to diagnose and resolve health issues without the need of doctors from your own home is necessary.

If resolving transportation issues is a need we as a people can and should solve it.

We should focus on furthering the human race more than helping a company making 100 billion dollars.

How can we still maintain a level of our fellow man while automating the unnecessary things? (some kind of robot to cook healthy meals for us in our own home)

If we can imagine it, and focus on it. We can build it.

Not everything should come at a cost.

What can you imagine we need built 100 years in the future with the will of our people?

Automated Email Form Part 1



I'm kinda going to do this backwards, so hang with me a bit. First I'll talk about what my problem was that Zapier solved, and then show off the code that was in use.

So I have this nifty thing on my website (onaclovtech.com) that asks people to put in their email address. It then stores to Firebase. This is great except for one slight problem. I have to go check periodically if anyone added their email address.

If you actually do this it works well, however I don't always remember to (I really wasn't actually expecting any emails added for a while). Sorry to the 3 people who I discovered in fact DID use my form.

Ok, so I rambled for a bit, but really what I wanted to tell you was a way to solve your problem. Introducing Zapier. Zapier takes tasks and connects them together (very similar to IFTTT if you've ever played with it). I setup a Zap (what it's called when you connect two things together) to check when new child is added to an object in Firebase.

When a new child is added it emails me with the contacts email, and "new email submitted" in the subject line. This helps me keep on top of "new" visitors that want to chat.

 Head on over to Zapier if you're interested in automating this kind of stuff.
I made a template if you use it you'll get some extra tasks I believe.
 Heres the link: http://zpr.io/G6ri


 NOTE: By signing up with Zapier through one of my links I'll get some bonus tasks (A. La. Dropbox style), if you do sign up and want to see whatever other ones are around check this link out: https://zapier.com/rewards/ You've been warned :)


Stay tuned for part two!

UPDATE: Part 2 is Live here --> Automated Email Form Part 2