I ended up changing the starting point of the workflow.
Now, I'll invoke the workflow which will essentially populate the hyperlink on the clipboard.
Then I'll use <command>-v wherever I want to past the hyperlink.
Here's the relevant python code for these actions.
//pass in an anchor <a href="protocol://url/to/thing">Name</a>
def transformToRTF(html):
p = subprocess.Popen(['textutil','-format','html','-convert','rtf','-stdin','-stdout'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
p.stdin.write(html)
p.stdin.close()
retcode = p.wait()
data = p.stdout.read()
return data
//use various options with pbpaste to get different types of data
def getClipboardData():
p = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE)
retcode = p.wait()
data = p.stdout.read()
return data
//use various options with pbcopy to set the type of data on the clipboard
def setClipboardData(data):
p = subprocess.Popen(['pbcopy','Prefer','rtf'], stdin=subprocess.PIPE)
p.stdin.write(data)
p.stdin.close()
retcode = p.wait()