Trivia game using Twilio Serverless + Studio and Airtable.
The airtable base can be found here: https://www.airtable.com/universe/expoG211sJu9ZcMbz/twilio-trivia-game
- Set up the Twilio Serverless Toolkit
- Clone this repository into a new folder
- Copy example.env, rename it
.env
and add your AIRTABLE_BASE_ID & AIRTABLE_API_KEY. - cd into the this directory and run
twilio serverless:deploy
- This will deploy your code to your active twilio profile
- Create a new studio flow using JSON import
- Copy the studio_flow json into the new flow & save
- Update all the functions to point to your recently deployed Serverless Function
- Update all webhooks to point to the correct Airtable webhook
- Update the questions table, including all text fields and correct answer.
- (optional) To update images...
- clear out and replace any images you want to use in the images folder
- Run
twilio serverless:deploy
after you add the images (or any time you later add images) - Navigate to this function in your twilio console and take note of the asset/image urls.
- Add the image url to the image url field for the question
- (optional) To update images...
- Run the twilio locally
twilio serverless:run
- Use an API tool (like Postman) to hit the
/q_to_json
endpoint - Copy the output JSON into the questions file, removing the old json
- Run
twilio serverless:deploy
to update to the new questions.
ToDo:
- Instructions for setting up the webhook in airtable.
- Adding sample data to the airtable template.