SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Studio Flow Sending SMS or Webhooks Without User Input

Issue

Twilio Studio is a powerful tool for building automated phone systems, IVRs, and messaging workflows. However, sometimes you may encounter a situation where your Studio Flow sends an SMS or triggers a webhook (such as to Zapier) even when the caller hasn’t pressed any keys. This article will help you understand why this happens and how to fix it.

 

Product

Twilio Studio

 

Environment

legacy Twilio Console

 

Cause

Common Scenario

  • A caller dials your Twilio number and is greeted by your IVR.
  • The caller is prompted to press a key (e.g., “Press 1 for Sales”).
  • Instead of waiting for input, the call disconnects after one ring, and an SMS or webhook is triggered automatically even if no key was pressed.

Why Does This Happen?

This issue usually occurs due to one or more of the following reasons:

  1. Incorrect Variable Mapping in HTTP Request Widget
  • The HTTP Request widget in your Studio Flow is not sending the correct parameters (such as the caller’s phone number) to your webhook or Zapier.
  • For example, using {{contact.channel.address}} instead of {{trigger.call.From}} may result in missing or empty data.
  1. Default or Timeout Transitions
  • If the Gather widget (which collects keypresses) times out or does not receive input, the flow may follow a default transition that triggers the webhook or SMS step.
  1. Stuck or Active Executions
  • Old or “stuck” executions in your Studio Flow can cause unexpected behavior, including repeated or premature triggering of actions.

 

Resolution

1. Pass the Correct Variables in the HTTP Request Widget

  • In your HTTP Request widget, ensure you are sending the caller’s phone number using the correct variable:
    • Key: From
    • Value: {{trigger.call.From}}
    • If you want to send additional information (like digits pressed), your request body should look like this:
From={{trigger.call.From}}&Digits={{widgets.gather_1.Digits}}&CallSid={{trigger.call.Sid}}
  • Content Type:
    • For Twilio API endpoints, use application/x-www-form-urlencoded.
    • For third-party services like Zapier, you can use application/json if your Zap is set up to receive JSON.

2. Check Your Gather Widget Transitions

  • Make sure the “No Input” or “Timeout” transitions in your Gather widget do not immediately trigger the webhook or SMS step.
  • Instead, you may want to prompt the user again or end the call gracefully.

3. Clear Stuck or Active Executions

Example: Sending Data to Zapier

If you are using Zapier to process incoming calls, your HTTP Request widget should be configured as follows:

  • Content Type: application/x-www-form-urlencoded (unless your Zap expects JSON)
  • Request Body:
From={{trigger.call.From}}&Digits={{widgets.gather_1.Digits}}

In Zapier, make sure your trigger is set up to receive these fields.

 

Summary Checklist

  •  Use {{trigger.call.From}} to send the caller’s number.
  •  Set the correct Content Type for your endpoint.
  •  Review Gather widget transitions for proper flow.
  •  Clear any stuck or active executions in your Studio Flow.

 

Additional Information 

If you’ve followed these steps and are still experiencing issues, review your Studio Flow’s logs for errors or unexpected transitions. For new or unrelated issues, open a new support ticket so each concern can be addressed efficiently. 

Below you will find references to useful documents:

Have more questions? Submit a request
Powered by Zendesk