10
votes

I'm building an emergency response app for my company. I have a corporate email database, with everyone's mobile numbers, email addresses and hundreds of email groups defined. The goal is to build something that integrates with our maintained groups.

Proposed flow:

  1. Users sends an email to [goupname]@mydomain.com with subject '*text'.
  2. Mailbox Listener picks that up on the server, looks in the group for all members and retrieves their phone numbers.
  3. Server sends a Twilio SMS message to everyone in the group, using their phone number.
  4. Anyone in that group who replies vis SMS to that message, sends to the entire group.
  5. I want my listener out of the picture at this point. From here on, it's just a pure group text, phone to phone(s).

All of this is pretty easy for me, except the Twilio piece.

As you can see, the server/Twilio has a limited role. It's really just a gateway that allow us to use our vast list of groups for group SMS. Is this doable with Twilio? I see many examples of iterating through a list of numbers with a FOR loop, but those replies are going back to my SMS# I believe, and my Twilio number is still going to be involved in the replies. I want to start the group SMS, then have no further role.

Any thoughts/suggestions would be appreciated.

2
Were you ever able to implement this use case? I"m trying to do the same thing. - StephShelley

2 Answers

5
votes

I'm a Twilio developer evangelist. Would love to help out here.

That all sounds fine to me. It is certainly the case that in order to send your first group SMS in your example that you'd need to iterate over the list of numbers and send an SMS to each of them from your Twilio number. That text would appear to come from your Twilio number to the end user. If they were to respond to the SMS, you could then have your Twilio number receive it and send a webhook to your server that then sends messages on to everyone else on the list.

It would have to work that way because SMS messaging is inherently one to one. So, in order to blast messages to the entire group, you would need to send a message to a central (Twilio) number.

I hope this helps. Drop me an email at philnash [at] twilio.com if you want to talk through this more.

[edit]

Twilio now supports native group messaging. It has some caveats, because group messaging requires MMS, this only works in countries where Twilio supports MMS, which is the USA and Canada. But it works now! Read the blog post to find out more.

0
votes

If I'm not mistaken, we really don't need to wait for Twilio to implement this natively. We could parse the MMS payload ourselves, extract the group list and body, and put it back together for a response MMS.

We do need the specs on the MMS group text format... which I admit I haven't located yet.