How to easily type a template without copy paste?
You may find it easier to use text substitutions instead of using AppleScript or Automator.

Go to System Preferences > Keyboard > Text and, in the Replace and With columns, assigned the text you want to type and what it will be replaced with.

For example, type url1 to have it replaced with https://www.google.com as shown in the image below.

When you do type the Replace text, a small pop-up will show with the With text, press the Spacebar key to have the substitution take place, or the Esc key to cancel the action.