SMS responder

Is it possible to script receipt of a keyword in sms from list of allowed numbers, eg. sms “AG” from “+61411123456” and respond with the currently active gateway in a message?
eg. response would be:
active gateway is “pppoe-Fibre reachable”
and it would be sent back to the sender of the original message.

All the posts I’ve read on this seem to suggest that you need to schedule a recurring script to check the inbox for a matching message, then delete it and process it accordingly.
Is that the only way?

With RouterOS alone, currently, sadly, yes.

If you have a separate device or a VM on the router, you can run an application that connects via the API. From the API connection, you can call “/tool/sms/inbox/print” with a “follow” argument. That way, the API application will get a reply upon every new message, and it can in turn call “/tool/sms/send”.