Pica Logo

Pica Assistant

Your integration companion

Pica Logo

Welcome to Pica! ✨

I'm here to help you discover how Pica can transform your workflow with powerful integrations.

Popular questions

Hover to see more

+7 more questions

Bolt LogoƗTwilio
Twilio

Building a Meeting Room Booking App with Twilio SMS

Create a meeting room booking software that sends SMS confirmations via Twilio using Bolt and Pica

December 15, 2024
Pica Team
twiliosmsbookingbuildkitnotifications
Tutorial Showcase

In this guide, we'll build a meeting room booking software that sends SMS confirmation texts via Twilio. With Bolt and Pica, you can create a production-ready booking system with SMS notifications in minutes.

What You'll Build

By the end of this tutorial, you'll have:

  • A beautiful meeting room booking interface
  • A calendar view showing available time slots
  • A booking form collecting user name and phone number
  • Automatic SMS confirmations sent via Twilio

Let's get started! šŸš€

Step 1: Build the Meeting Room Booking UI

First, let's create the booking interface with Bolt.

Prompt Bolt:

"Build me the UI for a meeting room booking software. It should have an interface that shows the different meeting rooms that are available. When clicking into it, you should be able to see a list of available time slots for that day. Once a user clicks on a time slot, a popup will prompt for the user's name and phone number. Build me only the UI."

šŸ’” Pro tip: In Bolt, press the Enhance Prompt button and use Plan Mode to get a more detailed implementation plan before building.

Bolt will generate a complete booking interface with room selection, time slots, and a booking form modal.

Meeting Room Booking UI Meeting Room Booking Form

Step 2: Set Up Your Twilio Account

Before connecting to Pica, you need to set up your Twilio account with a messaging service.

Create a Twilio Account:

  1. Go to twilio.com and create an account
  2. Verify your phone number during signup

Create a Messaging Service:

  1. In your Twilio Console, navigate to Messaging > Services
  2. Click Create Messaging Service
  3. Give it a name (e.g., "Meeting Room Bookings")
  4. Add a phone number to the service (you can buy one or use the trial number)
Twilio Messaging Service

Add a Sender Phone Number:

Your messaging service needs a sender phone number in the Sender Pool. Add your Twilio phone number to the service:

Twilio Sender Pool

Copy Your Credentials:

You'll need these values later:

  • Account SID - Found on your Twilio Console dashboard
  • Messaging Service SID - Found in your Messaging Service settings (starts with MG)

Step 3: Create a Twilio Connection in Pica

Now connect your Twilio account to Pica so your booking app can send SMS messages.

Twilio Connection

How to Connect Twilio:

  1. Go to the Pica dashboard at: app.picaos.com/connections
  2. Click on + Add Connection
  3. Select Twilio from the list of integrations
  4. Enter your Twilio Account SID and Auth Token
  5. Grant the necessary permissions for messaging
  6. Save your connection key - you'll need this later!

Step 4: Generate Your Code with BuildKit

Now we'll use Pica BuildKit to generate the perfect prompt for sending SMS via Twilio.

Using BuildKit:

  1. Go to the BuildKit page at: app.picaos.com/buildkit
  2. Type: "Send a message via Twilio using a messaging service with the SID {{YOUR_MESSAGE_SERVICE_SID}}"
  3. BuildKit will generate an optimized prompt for you

Or copy the prompt here:

šŸš€ Next step: Copy the prompt above and paste it into Bolt.new to create your backend logic!

What BuildKit Does:

BuildKit automatically generates a prompt that includes:

  • āœ… Proper API authentication setup
  • āœ… Twilio Messaging Service integration
  • āœ… SMS sending with dynamic content
  • āœ… Error handling best practices
  • āœ… Environment variable configuration
  • āœ… Integration with your Pica Twilio connection

Step 5: Add Your Secrets to Bolt

Once Bolt generates your application, you'll need to add your API keys as environment variables.

Add Secrets

Required Environment Variables:

1. PICA_SECRET_KEY

2. PICA_TWILIO_CONNECTION_KEY

3. TWILIO_ACCOUNT_SID

  • Get it from: Your Twilio Console dashboard
  • This is your Twilio Account SID

4. TWILIO_MESSAGING_SERVICE_SID

  • Get it from: Your Twilio Messaging Service settings
  • This is the SID that starts with MG

How to Add Secrets in Bolt:

  1. Click on the Settings icon in Bolt
  2. Navigate to Secrets
  3. Add all four keys with their respective values
  4. Save and restart your application

Now your booking app is connected to Twilio and will send SMS confirmations automatically! šŸŽ‰


Step 6: Try It in Action!

Test your meeting room booking app by making a reservation. You should receive an SMS confirmation immediately!

Meeting Room Booking Demo

Test the Flow:

  1. Select a meeting room from the list
  2. Choose an available time slot
  3. Enter your name and phone number in the booking form
  4. Click Book to confirm your reservation
  5. Check your phone - you should receive an SMS confirmation! šŸ“±

Troubleshooting

SMS not being sent?

  1. Check your environment variables - Make sure all four keys are set correctly in your Bolt secret settings
  2. Verify your Twilio connection - Go to app.picaos.com/connections and ensure it's active
  3. Check phone number format - Make sure you're using E.164 format (e.g., +1234567890)
  4. Verify Twilio balance - Ensure your Twilio account has sufficient credits
  5. Check Pica logs - View execution logs in your Pica dashboard

SMS sent but not received?

  1. Check the "To" number - Verify the recipient number is correct
  2. Check Twilio logs - View message logs in your Twilio Console for delivery status
  3. Carrier filtering - Some carriers may filter messages; try a different number

Conclusion

Congratulations! šŸŽ‰ You've just built a production-ready meeting room booking system with SMS confirmations in minutes. Every time a user books a room, they'll automatically receive a text message confirmation!

What you can do next:

  • Add email confirmations alongside SMS
  • Implement calendar integration (Google Calendar, Outlook)
  • Add booking cancellation with SMS notifications
  • Create admin notifications for new bookings

Ready to add more integrations? Explore other Bolt use cases to supercharge your application with Pica.


Get Help

Questions or need support?

Happy building! šŸš€

Ready to build with Bolt?

Start creating AI-powered applications with seamless Twilio integration today