Introducing outgoing webhooks

Inside Flybase, code

Today we’re announcing outgoing webhooks - a long awaited feature that will notify your websites and apps whenever data changes occur.

This opens up a new range of possible integrations

Adding outgoing webhooks means you can get notified directly in slack or elsewhere when new records are added, when records are updated or deleted.

To create an outgoing webhook, just click webhooks in the dropdown:

Then edit the form:

Hit Save and when you save a new record with our API, we will send notifications to your webhook instantly.

We've got some options for how we send the data, you can have it sent using a standard form post, send as a json string using payload as the containing variable, or just send as a JSON request.

If you are sending to Slack, we automatically detect the slack url and format it accordingly so it shows up nice looking.

All outgoing webhook notifications also include two extra fields, one for event to say what happened (new record, updated record, deleted record) and a url to the record in your dashboard.

You can delete the webhook at anytime from your webhooks management page.


Jason Fried on One Door at a Time

Links, On Startups

Entrepreneurs are told to go big or go home. Stop obsessing over scale, and perfect the basics instead.

[..]

But now, entrepreneurship seems like a sport. And the score depends on scale. How big can you get? How fast can you get big? How much power can you amass in the shortest possible time?

We've prided ourselves on staying mostly small, it lets us focus on things that might fall through the cracks other wise.


Build a "Serverless" Live Blog System with Flybase, Twilio and StdLib

code, Twilio, StdLib

Flybase and Twilio work great together, we've posted several posts before about using these two services in one place, but what about if you want to go serverless?

StdLib.com is excellent for that. In their own words, StdLib is essentially a package manager for APIs that’s built upon new “serverless” architecture, meaning you never have to worry about managing servers or allocating resources for scale.

All you have to do is write a function or two (or three), deploy, and you’re done, and this is perfect for quickly building services with Flybase.

We've covered building a Live Blogging tool before, so I wanted to use that tool here and show how to make it work inside StdLib.

Setup

To start, you need an account with our three services:

  • Twilio to handle receiving text messages.
  • Flybase to store our data and output it to viewers in real-time.
  • Stdlib to handle the backend processing between Twilio and Flybase.

First install StdLib:

npm install lib.cli -g

Now, create a folder called stdlib and login:

$ mkdir stdlib
$ cd stdlib
$ lib init

Ok, time to create the liveblog service:

$ lib create liveblog
$ cd <username>/liveblog
$ lib function:create sms -n
$ mkdir pages
$ npm install --save async ejs flybase twilio

Where <username> is the username you are logged into StdLib with.

You will now have the following structure:

  • functions/__main__.js
  • functions/sms/__main__.js
  • pages/

Let's give this structure some code and make it work for us.

Open the file called env.json in the root of the project, it was created automatically for you, and copy the following:

Populate these variables with your Twilio and Flybase information.

Now, open functions/__main__.js and copy the following code:

This will set up our index, which will output your live blog posts.

Next, open functions/sms/__main__.js and copy the following:

This is our webhook to receive text messages. It will take the text message and any photos from Twilio and store it in your Flybase app, it will then send a reply to your phone to tell you the message was received.

Finally, we need to create our pages/index.ejs file:

This template file will be read by our index and used to display any useful information.

Get online

To put this app online, all we have to do is type:

lib up dev

This will upload your app and make it available at the following url:

https://<username>.lib.id/<service>@dev/
https://<username>.lib.id/<service>@dev/sms/

Where <username> is your StdLib username and <service> is the service you've created, in this case that would be liveblog.

Once you're done developing, you can also use

lib up -r

To publish your app in release (prod) mode. The URLs would then be:

https://<username>.lib.id/<service>/
https://<username>.lib.id/<service>/sms/

Let's stick to just dev mode for now.

Once this has been published, you can go to the https://<username>.lib.id/<service>@dev/ URL and see your live blog, there won't be any content right now, so let's create some using Twilio.

Go to your Twilio account and create a phone number, then in the settings for that number, add your /sms/ URL:

https://<username>.lib.id/<service>@dev/sms/

Remember to update <username> with your username and <service> with the name of the service.

And now you are ready to send SMS messages to your live blog and see them on the screen.

Finishing Up

You can see the full code here at the repo, download it, extend it, play with it, do whatever you wish.

This is a pretty basic example of using StdLib, Flybase and Twilio together, but it shows some of what you can do.

You can also just drop the index file into any webpage and have it output your live blog posts, since Flybase works great that way, so it's really up to you on how you want to use it.


On Deck for August

Inside Flybase

We've been extremely busy getting a few new features ready to roll out and I wanted to mention them here:

1. Config

This is something that was mostly internal until now, but we're about to push our configuration manager out to all users, this will give you a new API that you can use for setting variables and retrieving them. With a simple API call, you can retrieve settings for your apps based on environment.

Example:

FlybaseRef.config_get("prod").then(function(config) {
  var welcomeMessage = config.get("welcomeMessage");
  console.log(welcomeMessage);
}, function(error) {
  console.log(error);
});

This will work on all libraries, as well as via our REST API, and all configuration settings are stored under encryption, giving you a nice secure place to store configuration variables that you don't want to store in your code.

2. Uploads

In addition to storing data, users that have apps on paid accounts will soon be able to upload files directly to their Flybase apps and download or retrieve them at any time.

This can be used for storing images, js files, css files, html files, text files, you name it. You can even use it for hosting static websites. We're excited about this one, and have worked hard to make it ready to fit all your needs.

3. GraphQL API

Our GraphQL Api is finally ready for public consumption after making sure all was nice and beautiful so that will be out over the next couple weeks and will give you a whole new way to handle your data.

4. Scheduled Backups to S3

We're also going to be adding the ability to set scheduled backups of your data yourself to your own S3 buckets.

We're big on backups, we backup everything all day using our own custom system but since we know you want to watch your data yourself, we're going to be adding this feature so you can enter your S3 info and schedule when you want backups to happen, or even just push a button and do it yourself.

5. New Dashboard

Yes, it's that time again, we've got a new dashboard ready to go, and are just finishing up a few tweaks. This will integrate nicely with all the features coming the four mentioned above, as well as a few others we're keeping as a surprise.

At Flybase, we're always dedicated to providing a good experience, both in terms of what we build, and also in terms of support so if you have any questions at all in regards to what's above, feel free to reach out to us.


Building the Best Relationships We Can

Links, On Startups

Alison Groves:

Maslow had it wrong. To get it right, we have to move social needs to the bottom of his pyramid.

-Matthew Lieberman (Professor of Social Cognitive Neuroscience at UCLA and author of the book Social)

Babies would die without their caregivers at birth. Study after study show the pain and ill we go through when we are isolated from others like us. As humans, we are wired to connect to one another.

However, instead of connecting, we seem to be heading the opposite direction. On the streets and in restaurants people are looking at their phones instead of the person right next to them.

Businesses strive to make everything quicker, faster, and automated. Sending automated welcome emails with generic information to everyone who signs up. Introducing artificial intelligence to weed through support inquiries instead of having someone read and respond to your query.

I read this two days ago, and saved it to drafts to share and comment on.

Here at Flybase, we don't automate support, and we don't use artificial intelligence for support (we do for other things, just not for support) either. Everyone here does their time answering support questions and responding to emails.

Relationships are something we've always strived to build here at Flybase, we help our users with any questions they have, and even jump in and lend assistance on building their apps when they're stuck.

In fact, a good chunk of our business comes from dev work with clients, as they have an idea for an MVP using Flybase and come to us to build it, or to train their own dev team on utilizing Flybase to the best approach.


Last Page 2 of 49 Next