| Line 1: |
Line 1: |
| − | <pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;"> | + | <pre class="header-style">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.</pre> |
| − | 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 ''' |
| − | </pre>
| |
| − | <br>
| |
| − | '''Example Usage'''<br/> | |
| | | | |
| − | <pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
| + | * '''Select Contacts''' - Choose specific contacts from your contact list. You can select multiple contacts or exclude selected contacts. |
| − | Triggers
| + | * '''Select Number''' - Enter a specific phone number (supports wildcards and Magic Text) |
| | + | * '''Any Number''' - Trigger for SMS sent to any recipient |
| | | | |
| | + | ''' Content Matching Options ''' |
| | | | |
| − | </pre><br>
| + | * '''Any Content''' - Trigger for any SMS content |
| − | <pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
| + | * '''Matches''' - Only trigger when the SMS text exactly matches the specified text |
| − | Actions
| + | * '''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 ''' |
| | | | |
| − | </pre><br>
| + | * '''Enable Regex''' - Use regular expressions for advanced pattern matching on SMS content |
| − | <pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
| + | * '''Ignore Case''' - Case-insensitive matching (enabled by default, not available with regex) |
| − | Constraints
| + | * '''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 ''' |
| | | | |
| − | </pre><br>
| + | * READ_SMS permission |
| − | <pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
| + | * READ_CONTACTS permission |
| − | Local variables
| |
| | | | |
| | + | ''' Examples ''' |
| | | | |
| − | </pre><br> | + | '''Example 1: Log sent messages''' |
| | + | |
| | + | Keep a log of all sent SMS messages: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | SMS Sent: Any Number - Any Content</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Log to file: "SMS Sent to {sms_number}: {sms_message}"</pre> |
| | + | |
| | + | ''' 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 ''' |
| | + | |
| | + | * [[Trigger:_SMS_Received|SMS Received]] |
| | + | * [[Action:_Send_SMS|Send SMS]] |