| 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 incoming SMS is received. You can specify a particular contact that the incoming SMS should be from, or alternatively you can specify that the message should be from Any Contact, a Non Contact, or Any Number. You can also match against the incoming text content so the trigger will only fire when the SMS text matches or contains the required text.</pre> |
| − | This trigger will be fired when an incoming sms is received. | |
| | | | |
| − | You can specify a particular contact that the incoming sms should come from, or alternatively you can specify that the message should come from Any Contact, a Non-Contact or Any Number.
| + | ''' Options ''' |
| | | | |
| − | You can also compare the content of the incoming text so that the trigger is only activated when the text of the sms matches or contains the required text. | + | * '''Select Contacts''' - Choose specific contacts from your contact list. You can select multiple contacts or exclude selected contacts. |
| − | </pre>
| + | * '''Select Groups''' - Choose contact groups to match against |
| | + | * '''Select Number''' - Enter a specific phone number (supports wildcards and Magic Text) |
| | + | * '''Any Number''' - Trigger for SMS from any sender |
| | | | |
| − | '''Example Usage'''<br/> | + | ''' Content Matching Options ''' |
| − | Automatically read sms from my contact group called "my family".
| |
| − | <pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
| |
| − | Triggers
| |
| | | | |
| − | SMS received (ANY) from My family | + | * '''Any Content''' - Trigger for any SMS content |
| − | </pre><br>
| + | * '''Matches''' - Only trigger when the SMS text exactly matches the specified text |
| − | <pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
| + | * '''Contains''' - Trigger when the SMS contains the specified text anywhere in the message |
| − | Actions
| + | * '''Excludes''' - Trigger when the SMS does NOT contain the specified text |
| | | | |
| − | Speak text "[sms_number][sms_message]"
| + | ''' Advanced Options ''' |
| − | </pre><br>
| |
| − | <pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
| |
| − | Constrains
| |
| | | | |
| | + | * '''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 |
| | + | * '''Monitor Inbox''' - Alternative detection method that monitors the SMS inbox (useful if standard detection fails) |
| | + | * '''Subscription ID''' - On dual-SIM devices, optionally restrict to a specific SIM |
| | | | |
| − | </pre><br>
| + | ''' Requirements ''' |
| − | <pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
| |
| − | Local variables
| |
| | | | |
| | + | * RECEIVE_SMS permission |
| | + | * READ_CONTACTS permission (if using contact selection) |
| | | | |
| − | </pre><br> | + | ''' Magic Text Variables ''' |
| | + | |
| | + | When this trigger fires, the following Magic Text values are available: |
| | + | * {sms_number} - The sender's phone number |
| | + | * {sms_name} - The sender's name (if in contacts) |
| | + | * {sms_message} - The full SMS message content |
| | + | |
| | + | ''' Examples ''' |
| | + | |
| | + | '''Example 1: Auto-reply while driving''' |
| | + | |
| | + | Automatically reply to incoming SMS while driving: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | SMS Received: Any Number - Any Content</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Send SMS: "I'm currently driving and will respond later" to [sms_number]</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Bluetooth Connected to car</pre> |
| | + | |
| | + | '''Example 2: SMS command processing''' |
| | + | |
| | + | Process specific commands received via SMS: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | SMS Received: Any Number - Contains: "LOCATE"</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Get Location |
| | + | Send SMS: "Device location: [last_loc_link]" to [sms_number]</pre> |
| | + | |
| | + | '''Example 3: VIP notification''' |
| | + | |
| | + | Special notification for messages from important contacts: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | SMS Received: (Select VIP contacts)</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Edge Notification Light |
| | + | Speak Text: "Message from [sms_name]"</pre> |
| | + | |
| | + | '''Example 4: Two-factor authentication helper''' |
| | + | |
| | + | Extract and copy verification codes: |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | SMS Received: Any Number - Contains (Regex): "\b\d{6}\b"</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Copy to Clipboard: (extracted code) |
| | + | Display Notification: "Verification code copied"</pre> |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * This trigger only works with real SMS messages. It cannot detect RCS (Rich Communication Services) or "Chat" messages. If this trigger does not work, please try disabling RCS/Chat in your messaging app. |
| | + | * If standard SMS detection fails, try enabling "Monitor Inbox" in the trigger options |
| | + | * On dual-SIM devices, you can restrict the trigger to messages received on a specific SIM |
| | + | * You can combine contact selection with content matching for precise filtering |
| | + | * Using "Exclude" options allows you to create rules like "any contact except these" or "any content except this" |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Trigger:_SMS_Sent|SMS Sent Trigger]] |
| | + | * [[Trigger:_Notification|Notification Received Trigger]] |
| | + | * [[Action:_Send_SMS|Send SMS Action]] |