I can’t help with the first one, besides telling you to look up how to make a trigger that sends local commands on the server. For the second issue, SNMP isn’t a strictly defined standard. Whatever template you’re using assumes that a certain location (defined by a long string of numbers, with each “.” defining a new level in a tree) is the serial number. That assumption might be true for HP switches, Cisco switches, even certain TP-Link models, but clearly isn’t true for your switch. The exact locations can even vary between firmware versions. Try to find the MIB for your switch, usually available in the same place as the firmware updates and/or release notes for the switch. You can open the MIB in a text editor and see which location, if any, holds the serial number for that particular switch and firmware version.
A MIB (Management Information Base) is used to describe all of the SNMP locations that a particular system uses. Some are commonly supported by almost anything, these are what the basic fields like Hostname come from. Oftentimes manufacturers will define their own way of presenting information, particularly if they are the first to offer a certain thing via SNMP. Thus there are MIBs specific to certain brands, models, and firmware versions. Some network monitoring systems rely on MIBs completely, they can’t do anything without being fed the file. Zabbix doesn’t require or even have a way to load MIBs - this is better in general because sometimes you have a device where the MIb isn’t available. The downside is that for anything that doesn’t follow the general standards, the SNMP location has to be manually input.
It is possible that your switch just doesn’t present its serial number via SNMP. Another possibility is that you can’t find a MIB, or can’t figure out how to read it and find the serial. In that case the final option is to “walk” the SNMP tree, which will read every value from every location. Then you can search this for a known string (perhaps the serial number of one switch) and then once you find the location you can feed that into Zabbix and from there you can pull the serial number of other switches of the same model.