Decode payload in protobuf format

Please, could you help me with some idea about how, through the Decoder function, the payload of a sensor that is in protobuf format could be decoded. I have the *.proto file but in Chirpstack I don’t know how to use it. Even in Javascript there is a library (protobuf.js) to work with protobuf formats, but I read in this forum that in chirpstack you can’t import libraries for decoder functions.
Thank you