Back to All

Filemaker Twilio Integration

February 7, 2020 |

Great article from the guys at DB Services on integrating Filemaker with the messaging platform…

https://medium.com/@dbservices/filemaker-twilio-integration-451b73ea2ce2

Filemaker Twilio Integration

DB ServicesFollowingFeb 2 · 3 min read

Twilio is used by many major corporations such as LyftTwitter, and AirBnB to send texts to communicate information to their customers. Integrating Twilio with FileMaker can give you the ability to easily send appointment reminders, sales discounts, and much more straight to your clients’ phones with just a few lines of code.

Account Set-Up

To integrate with Twilio, you’ll need to first sign up for an account. Twilio offers a free trial which gives you a $15 budget to play with. You are only charged 1.5 cents per text sent and can upgrade to a full account when your original $15 credit runs out.

Once your account is set up, you will need to buy a phone number to send the texts from. You can do that by navigating to the Phone Numbers section and selecting “Buy A Number”.

Once you’ve found a number you like, you can typically purchase it for one or two dollars per month.

The information you’ll need to successfully authenticate your account appears on the Twilio Console Dashboard. You’ll just need to know your Account ID and the Auth Token.

Authentication

Twilio uses HTTP Basic authentication to authenticate your account. All you need to do to ensure your account is usable is insert the Account ID and Auth Token in place of the {accountID} and {authToken} in the following url. In FileMaker, use an “Insert from URL” script step to make the call and save the result in a variable .

https://{accountID}:{authToken}@api.twilio.com/2010-04-01/Accounts/{accountID}

The call will return some XML that includes the attribute tag <Status> which will either display “404” if the account is not found, “401” if the account is found but the Auth Token is incorrect, or “active” if the account is able to be authenticated.

Sending A Text

To send a text in FileMaker, you need to use an “Insert from URL” script step to make the following call

https://{accountID}:{authToken}@api.twilio.com/2010-04-01/Accounts/{accountID}/Messages.json

as well as the appropriate cURL options. To set up the cURL options, you need the number you’re sending your text from, the number you’re sending the text to, and the body of the text.

With these three components, you should store the cURL information in a variable by replacing each part of the following cURL options with your relevant information. Use this variable as the “cURL Options” of your “Insert from URL” step.

curl -X POST {url}
--data-urlencode "Body={body}"
--data-urlencode "From={fromNumber}"
--data-urlencode \"To={toNumber}"

When the “Insert from URL” step is called, the text will immediately be sent to the recipient.

Conclusion

With Twilio, you can easily send texts to customers stored in your FileMaker database. With these texts, you can keep your customers informed, up-to-date, and in constant communication with your organization. Contact us if you would like help integrating Twilio and FileMaker.

Did you know we are an authorized reseller for FileMaker Licensing?
Contact us to discuss upgrading your FileMaker software.

Download FileMaker Twilio Integration Database

Please complete the form on the original FileMaker Twilio Integration to download your FREE FileMaker database file.


Originally published at DB Services FileMaker Twilio Integration.