Writxt
SMS Static Website
Getting Started
In this step-by-step guide we will be covering the following:
- Setting up a custom Twilio phone number
- Connecting your Twilio / Github / Netlify accounts via Pipedream
- Creating a new Github issue whenever an SMS is sent to your custom number
- Building out a Github Action that generates a new blog post from new issues
- Setting up auto-deploys to Netlify when new posts are created
Prerequisites
- a cup of hot coffee (or tea)
- a Twilio account (free)
- a Pipedream account (free)
- a Github account (free)
- a Netlify account (free)
- some curiosity and patience
Ready? Good - let's get into it!
Twilio Setup
- Go create a new account on Twilio (this link will get you a $10 credit!)
- From your Dashboard, head over to Phone Numbers > Buy a Number
- Purchase a new number (with SMS & MMS active)
- Important! Keep this number secret. Only you should keep record of it.
That's all we need to do with Twilio for now.
Github & Netlify
- Fork the custom Jekyll theme: Writxt Jekyll Theme
- Login to Netlify and setup a new site pointing to this repo
- Need help? Check out this step-by-step blog on how to deploy on Netlify
That's it for this part!
Pipedream Setup
Twilio Trigger
- Create a new account on Pipedream
- Under Workflows select "New +" in the top menu
- Under Select a trigger search for (or click) Twilio > New Incoming SMS
- Click Connect to Twilio and follow the instructions to allow access
- Now select your Twilio number from the dropdown and add your Twilio Auth Token
- Give your trigger a name (ie "Incoming SMS") and then Create Source
Github Trigger
- Add a new trigger to the "Incoming SMS" Twilio action (click the "+" icon)
- Click or search for Github > Create Repo Issue
- Connect to your Github account and add the following to the fields provided:
- Title:
{{event.MessageSid}}
- Owner: your Github username
- Repo: your blog's repo
- Title:
- Under the "optional" tag, select Body and enter:
<img data-type="{{event.MediaContentType0}}" src="{{event.MediaUrl0}}">{{event.Body}}
Netlify Trigger
- Add a new trigger (click the "+" icon)
- Click or select Netlify > POST /sites/{site_id}/deploys
- Authorize / link Netlify and select your site for auto-deploying
How is that coffee (or tea!) treating you right now? Don't worry - we're done!
Congrats! Everything should be setup. It's time to do a test SMS!
📱 Testing our SMS blog
Simply fire over a text message to your custom Twilio number (remember: keep this secret!) and give everything a little bit of time to run. Pretty quickly (within 30 seconds or so) you should see the SMS post live on your website.
Not seeing the post?
Take a look at the Pipedream logs and try to figure out any problems you might see. They give pretty good error codes FYI.