Need help getting text from a shortcut and display that text in a widget

Afternoon, I have been trying to get this to work for a few days but have had no luck, I have zero knowledge when it comes to code/Javascript so have been searching the web and trying to put something together myself but with no joy.
My use case is I have a shortcut that gets the name of the connected Wi-Fi from the Wi-Fi network details action and save this name as a variable called “myNetwork”. I want to share this variable to a Scriptable widget so when I run the shortcut, it displays the network name as text in the widget. Is this possible and could someone help?

Thanks

  1. In Shortcuts, save the value in a text file in the Scriptable folder.
  2. In Scriptable, read the contents of the file and display in the widget.
1 Like