Initiate simple text (SMS) message conversation

#1

Hello, I’m quite new to the platform but am encouraged at the potential I see.

However I feel like I’m misunderstanding how the different pieces relate and hopefully can get some help to setup my first interaction.

This outline of what I want is:

  1. A new phone number is added to a Google spreadsheet
  2. The flow starts and Twilio sends a text asking “did you have a good experience, (yes, no)”
  3. The user responds with either of those answers and depending on the answer the flow responds with separate messages.

This seems like it should be very simple to create if I’m understanding the platform’s capabilities correctly, but I can’t quite string it together. I don’t understand why I create a bot separate from the flow. It has very few options to customize. Then, within the flow I can’t find that bot I just created to put into the flow. I can use the supplied Twilio message service, but it doesn’t seem to have logic control or the ability to take input from an sms. After the flow is started it immediately sends all the texts in the flow.

Sorry for the noob question, but I feel like there are simple steps I’m missing, and after scouring your help/community documents I thought I’d reach out on here. I had gone through this tutorial: https://support.flowxo.com/article/152-creating-a-twilio-sms-bot but it ends right where I need the instruction.

As a side note, many of the flow services ask for a “Response Path”. I don’t understand what that is, or what it’s expecting to go there.

Thank you,

Twilio response path and subscriber phone number
(John Jackson) #2

This can be done, it’s not difficult, but I can definitely see how you got stuck here!

The key is in the response path. This allows us to route a message. Here’s how it’s made up:

[bot connection id]/c/[user id]

The bot connection ID is the same every time for any message sent or received through a particular bot. In the case of Twilio, the user ID is the user’s phone number.

So for a message received through a Twilio bot, it looks something like this:

0f50ab751379b6d7193b3500/c/+447900123456

You can get the bot connection ID by sending yourself a message to your Twilio bot, you’ll see the ID in the logs. Now you have that, you can construct a response path for any phone number to allow you to send a message.

So your flow would look like this:

  • New Google Sheets row trigger
  • Ask a question (see the screenshot below for how to set up the response path, you need to construct it)
  • Followed by more questions/messages/actions…

As for constructing the response path (click the pencil icon on the response path field to edit it), you’ll need to combine plain text (the bot connection ID that you discovered yourself), and select the phone number as an output from the Google Sheets trigger. You should end up with something like this:

So why is all this so difficult? Well Twilio is different to other channels in that you can send a message to any phone number you want. Normally, you’d be receiving a response path in the trigger, and then simply responding back to it. If you do this, you’ll see that everything is done for you, you almost don’t notice the RP.

I hope this helps you, good luck with it :slight_smile:

#3

Wonderful, that’s exactly what I’m looking for. I’ll give your suggestions a shot and see how it works for me. Thanks for the thorough response!

#4

This works generally speaking, but we found an error scenario when the use case is to trigger another flow from the flow that is initiating the conversation: If the bot user has never engaged with the bot, apparently flow xo doesn’t have a piece of data in their database for that client (perhaps user_id?) and in consequence, if the scenario is say for instance:
trigger: web hook
bot ask a question: We are going to ask you this an that…
Trigger flow -> (and insert the response path in the trigger)
We saw that the trigger flow was generating this error in the logs (and not triggering the other flow):
Cannot read property ‘connection_data’ of null

To work around this, we first asked a question in the initiating flow, so the user immediately answers in that flow with something like “YES” and then we proceed to trigger the other flow… then it worked.

But in summary I think if any one reads this post, they should know that this only works for triggering another flow if BEFORE a user has actually interacted with the bot…

(JT) #5

I’m having issues obtaining the [user id] portion with a campaign monitor integration.

(Karen Barker) #6

Hi JT,

Sorry to hear you’ve been having issues getting the integration set up. If you can email in to support@flowxo.com with further information of exactly what you’re trying to do, where you’ve got to and if you can share a screen shot of your interaction logs and also share your flow with us then we’ll be able to help further here. Thanks :slight_smile:

(Jose Tavares) #7

Good morning Karen,

Thank you for the quick reply. Here are the screenshots. Saw your most recent reply. Not sure where I can define the phone number variable…It’s a custom field in campaign monitor and when I hard-code my phone number it works.

Thanks,

Jose Tavares

(Daniel Beckett) #8

If you check your interaction logs does it show any particular error? Also, can you see what format the number is being sent in?

(Jose Tavares) #9

Hi Dan,

The error is: “The ‘To’ number {{ MISSING OUTPUT }} is not a valid phone number.”

Thanks,

Jose Tavares

(Jose Tavares) #10

Also here’s the flow I’m working on Dan: (Link removed by moderator)

(Daniel Beckett) #11

To share your flow please click the ‘private’ button near the top right corner when editing it. This will give you a sharing link that can be given to someone to install a copy of your flow.

I think it’s best if you email this rather than post to community - please email support@flowxo.com and I’ll help out from there :slight_smile:

(Jose Tavares) #12

Hi Dan,

Is there anyway to delete my personal details on the community forum? Here’s the link, made it public: (Link removed by moderator)

(Daniel Beckett) #13

You should be able to delete any posts you’ve made but if not just let me know what needs removing and I’ll take care of it :slight_smile:

I’ve just tested a new list of subscribers for Campaign Monitor and it looks like we’ve got trouble handling custom fields which have a space in the name. For example:

Phone Number
Would show up as:
{{new_subscriber.Phone Number}}

Which when saved defaults back to {{ MISSING OUTPUT }}

If you change the name of the field in Campaign Monitor to:

Phone_Number
It would show as:
{{new_subscriber.Phone_Number}}

And should save in the action.

Could you try that and let me know if it works?

Thanks,
Dan