Why use this?

We noticed that many of you needed a fast, reliable way to trigger automations directly from SMS. Whether you’re coordinating teams or reaching customers, SMS triggers ensure that your automation starts instantly in response to an inbound SMS to your Twilio numbers without needing manual intervention.

Example Use Cases

  • Build AI Agent in SMS that would receive a question and take action using automation - perfect for creating responsive chatbots that can handle customer inquiries, process requests, and trigger appropriate workflows based on the message content.

  • Trigger an internal workflow when a delivery driver sends an update - streamline logistics operations by automatically updating systems, notifying stakeholders, or adjusting schedules based on real-time SMS updates from the field.

  • Initiate a marketing follow-up sequence based on customer text responses - automatically segment and engage customers based on their SMS interactions, ensuring timely and relevant communication flows.

Prerequisites

  • A published Automation
  • A Twilio account with SMS capabilities

Steps

1. Create an API Trigger

  1. Navigate to your published Automation
  2. Add a new API Trigger
  3. Copy your trigger URL and API key

2. Configure Twilio

  1. Go into the number you want to edit.
  2. Click “Configure”
  3. Scroll to “Messaging Configuration”
  4. For “A message comes in” “Webhook”, add your URL as follows:
https://pinkfish.app/smsrouter/?url=YOUR_TRIGGER_URL&apiKey=YOUR_API_KEY

Replace YOUR_TRIGGER_URL and YOUR_API_KEY with the values from step 1

Your Automation will now run whenever an SMS is received by your Twilio number. The contents of the SMS will be available in the inputs. To see your inputs, you can write a simple prompt like simple script to display the contents of inputs

3. Responding

If you want to respond back to the user, you would add a step in your automation that sends an SMS out via Twilio via that same number.