How to send sensor data from MKR NB as SMS ?

I would like to use MKR NB 1500 in a project. MKR NB get the sensor data and sent to as sms to a gsm number ? How can I organize the code ?

you use the example

https://docs.arduino.cc/tutorials/mkr-nb-1500/nb-send-sms/

and just build the message after reading the sensor.