Send SMS Easily from FileMaker 13

I’m happy to welcome our first guest post! It’s from Jeff England, a FileMaker developer and owner of Neb’s Fun World, an indoor amusement park located in Oshawa, Ontario, Canada. This article is about how redesigning an existing process can both enhance the user’s experience and save money at the same time. Using the new httpspost function in FileMaker 13, combined with Twilio, he’s now sending information-rich text messages directly from FileMaker, and will show you how, too. It’s a good lesson that creatively examining your existing functions in light of new features can yield great results.

Send SMS from FileMaker

The Waiting List Conundrum

Neb's Fun World

We own a 2.5 acre indoor amusement park called Neb’s Fun World, which includes 52 lanes of bowling. On busy days, when we had a waiting list for bowling, the customers would receive a pager that would blink and vibrate to notify them that their lane was ready. This is your typical customer experience when dealing with larger-than-usual crowds, especially in the restaurant business.

Although the pager system has been an industry standard for years, there are some severe shortcomings.

  • Due to the large size of the facility, customers in the far corners of the building would not receive any notification on their pager.
  • The device can only light up and vibrate, leaving no opportunity to expand the user’s experience.
  • Purchasing and maintenance of each pager is very expensive.

Cool Blue Pager

The solution? FileMaker and SMS. Switching to an SMS-based system solved all of our issues. Coverage was no longer a problem as we have very good cellular reception at our location.

SMS also dramatically improved the user experience. Instead of relying on a pager lighting up and vibrating, I was able to compose a customized message for each customer. This message tells the customer that their lane is now ready and what lane they will be bowling on, eliminating another visit to the front counter.

Finally, because we have already invested in FileMaker, the cost was very minimal—just $1 a month for the phone number and $0.0075 per SMS.

At first we were worried that our customers would be apprehensive to give us their phone numbers. It turns out that very few people had issues with giving out their cell number because the value of doing so outweighs the negatives. We also delete the phone numbers at the end of the night and tell our customers that we do so.

Adding value to a solution by increasing the user’s experience is not something that should be ignored, but embraced. Users will build a relationship with the software you provide and your solution will become associated with their customer experience.  This will hopefully lead to repeat business opportunities down the road.

Under The Hood

Luckily, FileMaker is a great development environment and FileMaker 13 has made sending SMS pretty simple and can be done in two steps.

Step 1

Create an account on Twilio (or any other SMS gateway that supports sending a text through a URL). The Twilio service allows software developers to programmatically make and receive phone calls and send and receive text messages using its web service APIs.

You’ll need your “Account SID” and “Auth Token,” both available on the Twilio Dashboard.

Step 2

In a FileMaker script, set the following local variables:

$sms_accountID = Twilio AccountSID
$sms_token = Twilio Auth Token
$from = Your Twilio phone number
$phone_number = The destination phone number
$message = Whatever you want the message to say

Next, add a FileMaker Insert From URL script step. Specify the following URL:

httpspost which is a FileMaker 13 feature. The POST request communicates with Twilio’s API to send the message to the supplied phone number using the account information you defined in the URL.

Download the example file to try it yourself.

Conclusion

After using this system for three months, we couldn’t imagine going back to our old system. If you have any cool ideas about helping your users by implementing SMS please comment below. I’d be interested in seeing what uses the FileMaker community comes up with!

Thanks for reading!

Jeff England Profile PicJeff England is a Toronto-area FileMaker developer and owner of Neb’s Fun World. You can find Jeff on Twitter here.

 




This Post Has 24 Comments

  1. Hey Jeff,

    If one were to use a loop to message multiple phone numbers for a mass text message, can you foresee anything getting in the way? (such as Twilio measures to avoid spam, Twilio server speed, your ISP sending too much data, web viewer browser or Internet explorer etc.)

    Awesome post! Thanks much for it.

    1. Glad you like it Didier,

      I have developed an entire bowling solution using FileMaker, where FileMaker communicates to the bowling machine and all the scores, are saved in FileMaker. The waiting list is just an extension of this application.

  2. Hi Jeff-

    Other methods I’ve tried were clunky–this one appears very straightforward and easy to set up. And the ability to send up to one per second will come in handy for some clients. Thanks and congratulations on some out of the box thinking!

  3. This is very helpful Jeff. Thank you.

    Quick question – do you ever have customers that try and reply to the SMS message (even something like “be right there)? If so how are you handling that?

    Thanks again.

  4. I have a FileMaker 13 Pro developed app that I’m trying to implement your SMS solution. I’m getting an Error 3 message – Command is unavailable (for example, wrong operating system, wrong mode, etc.). I’m working on a Mac OS X 10.9.3. Can you give me a hand on what I need to do to get this to work?

    Thanks…

    1. Were you able to get the demo file to work with all of your credentials? You could be trying to use a perform script on server script step when the file is local… There are lots of reasons to this error message, its a little vague. After trying those things you could send me your file if you like and I could try to fix it up.

  5. Jeff,

    I downloaded you example file, create a new record, and populated the fields with my Twilio number, ID, token, receive number and message. SMS did not go through, and the following Result was generated. Any suggestions?

    {“sid”: “SM743f466ed8904e9f9f5ed28732965f06”, “date_created”: “Fri, 10 Oct 2014 13:08:42 +0000”, “date_updated”: “Fri, 10 Oct 2014 13:08:42 +0000”, “date_sent”: null, “account_sid”: “AC2cfa33599c68d8723677f441a76e6618”, “to”: “+17034080146”, “from”: “+12403481775”, “body”: “Test”, “status”: “queued”, “num_segments”: “1”, “num_media”: “0”, “direction”: “outbound-api”, “api_version”: “2010-04-01”, “price”: null, “price_unit”: “USD”, “error_code”: null, “error_message”: null, “uri”: “/2010-04-01/Accounts/AC2cfa33599c68d8723677f441a76e6618/Messages/SM743f466ed8904e9f9f5ed28732965f06.json”, “subresource_uris”: {“media”: “/2010-04-01/Accounts/AC2cfa33599c68d8723677f441a76e6618/Messages/SM743f466ed8904e9f9f5ed28732965f06/Media.json”}}

  6. Jeff,

    Got it to work by paying more careful attention to your instructions!

    We are using an iPad as a check-in kiosk in out unattended waiting room (we’re a bunch of psychotherapists). Staff members, using your solution, are now getting a text message when their next patient arrives and checks in on the iPad. I would like to send a MMS with a photo of the party checking in (which I believe can be done with the Get from Device script step). Do you have any suggestions about how to accomplish this?

    Thanks!

  7. I have been trying to integrate this into a database I already have, and I can’t seem to get it working. Using the test DB, everything works fine, but as soon as I try to integrate, I don’t see any API activity on Twilio and I also am not getting the messages. Hopefully it’s something relatively easy.

  8. Thanks for the great article and example file. Is there a way to send bulk messages through Twilio and Filemaker, or is it best done with a Loop script?

  9. Hi I have a client that’s using version 12, I know twilio works on version 12 but don’t know the command to use instead of httpspost – any idea? Thanks

    1. Hi Robert, I believe httpspost was introduced in version 13. So you won’t be able to do this technique natively. You would need to use the base elements plug in to achieve the same functionality.

  10. Jeff:
    I opened up a Twilio account, paid for the telephone number, and linked it to the Messaging Copilot. I think I did this right although I have no URLs to plug into their forms as, like you, I want a one-way communications from me to my employees.

    I have the AccountID but also a Messaging SID. And a token. No matter what combination of AccountID or MsgSID I put into your sample, I get this error:
    {“code”: 21606, “message”: “The From phone number +14406528400 is not a valid, SMS-capable inbound phone number or short code for your account.”, “more_info”: “https://www.twilio.com/docs/errors/21606”, “status”: 400} but the phone number I bought from them 4406528400 is SMS enabled.

    Any ideas? BTW, I run a small amusement park in Cleveland, OH. I’m using this app to send SMS to employees about shift changes, etc.

    1. Hi Russ,

      I opened up the sms file and noticed that the script automatically appends the +1 in front of the phone number. Try just using 4406528400 as the phone number.

      Very cool use of the messaging. We have been debating making this a feature here. It would be neat to have this run as a server side script to notify the employees 4 hours before a shift.

      I don’t see too many entertainment places using FileMaker, but I’m my experience its the perfect tool. Each facility is inherently unique and FileMaker is a great tool to fill all those gaps.

      Jeff England

    2. Having the same problem as you did except it is the “To phone Number” which is giving the same error. Did you ever get this figured out? Thanks.

  11. Very well done Jeff.

    I have designed database in filemaker 12,
    i am trying to follow the methods of Twilio.com website but the HTTP post through the insert url is not working .. what could be the reason…
    Can you guide me on this please.?

    THanks.

    Regards

  12. Thanks so much for this article. I am trying to send a Filemaker URL via twilio but it appears “&” with anything after it in the message is removed from the sent message. I can send my filename and script but what good are those without a param? Thanks for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *