Put common code in a single Script and Include it from others ...
Do not tick the 'Allow Extenal Access' checkbox unless it is necessary for the Script.
The set of services permitted using 'External Access' are:
Configure any firewalls protecting these services to accept connections from the Workbooks Service's IP address ranges:
In addition (but not required), the Workbooks service delivery team use separate infrastructure and occasionally access from their IP address ranges may be useful. These are 220.127.116.11/29 (i.e. the addresses 18.104.22.168 through 22.214.171.124) and 126.96.36.199/28 (i.e. the addresses 188.8.131.52 through 184.108.40.206).