Sending an SMS to any phone number from tulip

Currently you can only send SMS to users in the tulip users table (as well as they have to be validated)

This is one method of sending SMS to anyone by putting a thin wrapper (api gateway & lambda) around the Amazon SNS service


Another usefull tutorial on getting started with serverless

So, change to the directory you cloned to, then issue a sam build.

Then do a SAM deploy –guided

I called the stack tulip-send-sms

After the stack completes, you can go to your API-Gateways and you should see


At this point you have a public API that can send Text messages. You should secure it! At the very least put an API key on it.

In our case we set this up using a private API Gateway

Ok, now that we have a SMS gateway let’s give it a test. Click in on the gateway, click in on Stages and then expand PROD.

You are interested in the Invoke URL, click it and it will launch (but fail) something like


It fails because we didn’t pass it any parameters. Let’s do that


The number should be E.164 format

Ok, let’s call this API from Tulip

Go to your connectors, create new connector

Then click the details of the Connector and fill in the connection details. Put in just the host portion of your API gateway

Next create a function.

You will copy your resource (/Prod/sendsms) and paste it in the top address.

Create two Query Parameters, phone_number and message. Use a variable $phone_number$ and $message$ as the value.

On your inputs create a phone_number and message.

Now to test! Put in a phone number and a message and hit test. You should receive a text message


One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s