Trigger: SMS Sent
This trigger will fire when an outgoing SMS has been successfully sent. You can restrict the trigger so it will only fire when an SMS is sent to a specific contact and/or contains specific text.
Options
- Select Contacts - Choose specific contacts from your contact list. You can select multiple contacts or exclude selected contacts.
- Select Number - Enter a specific phone number (supports wildcards and Magic Text)
- Any Number - Trigger for SMS sent to any recipient
Content Matching Options
- Any Content - Trigger for any SMS content
- Matches - Only trigger when the SMS text exactly matches the specified text
- Contains - Trigger when the SMS contains the specified text anywhere in the message
- Excludes - Trigger when the SMS does NOT contain the specified text
Advanced Options
- Enable Regex - Use regular expressions for advanced pattern matching on SMS content
- Ignore Case - Case-insensitive matching (enabled by default, not available with regex)
- Enable Regex for Phone Number - Use regular expressions for phone number matching
- Exclude Number - Exclude the specified number instead of matching it
- Exclude Contacts - Exclude the selected contacts instead of matching them
Requirements
- READ_SMS permission
- READ_CONTACTS permission
Examples
Example 1: Log sent messages
Keep a log of all sent SMS messages:
Triggers SMS Sent: Any Number - Any Content
Actions
Log to file: "SMS Sent to {sms_number}: {sms_message}"
Notes
- This trigger works by monitoring the SMS outbox/sent folder, not by intercepting the send action
- There may be a brief delay between sending the SMS and the trigger firing
- The trigger detects when an SMS has been successfully sent, not when it is being composed
- A background service is started to monitor the SMS database for changes
- On some devices or with certain SMS apps, detection may not work reliably
See Also