Twilio Inbound SMS

I’m using the “New Incoming SMS (Instant)” trigger, I’m inputting all my account information and get no errors, but when I send a text to the number, nothing happens. It’s stuck waiting for an event and I have no idea why… Any suggestions?

Hi @AndrewLearned

Have you looked into the Logs section of your Twilio source in Pipedream? That might help.

Additionally, in Twilio are you seeing logs of SMS messages being sent to that number?

Yeah, it’s really weird. Twilio is receiving and replying to texts and they are all showing up in the logs there. But in Pipedream, nothing is showing up. The logs are blank and it always just spins saying it’s waiting for the first event.

But I don’t get any errors when I set it up.

Hi @AndrewLearned ,

I was able to reproduce on my account, and I believe this might help you.

Under your Twilio Integration settings, make sure that your Incoming Messages are set to Defer to the senders webhook.

In my account, it looks like it was set to Drop the message instead.

OH, thank you!!!

Ok, issue though, for my SMS bot to work, I have to “send a webhook” to Dialogflow. So your fix would actually break the main functionality of the bot.

What I’m trying to do is create an integration between Twilio and Dialogflow so that my conversations with users can be logged.

The most basic thing I’m trying to do is pass the phone numbers along of anyone who messages the bot. In an ideal world, then I’d have Dialogflow pass any contexts recorded as well. I was trying to use Google Sheets as my back-end for all this and Pipedream as the intermediary.

Any ideas?

Hi @AndrewLearned

Awesome, glad that fixed it for you. I’ve added a bug report to find a better way of documenting this extra setup step.

Great idea though, Dialogflow is great for making SMS bots.

What you could do is just let Pipedream forward the SMS reply’s body to Dialogflow as a step in your workflow:

  1. Twilio SMS reply trigger
  2. Google Sheet - Insert new row
  3. HTTP request to your bot via the Dialogflow API, or use the Dialogflow Detect Intent action to forward your customer’s SMS content to the bot.

That way Pipedream acts as a “middleware” layer between Twilio & Dialogflow, and you can chain more steps between if you’d like to send to Slack or log to another area.