Two-way links while adding to OF

Hi all,
Does anyone have a script that creates a task in OF with the text content of the notes item AND creates a link to it in the note itself?
I mean a shortcut like the one already existing but with the option to copy the link of the OF task and pushing it back to the original note, so that you end up in the note itself and not inside OF, which kinda disrupts the flow.

I might have something that can help. iOS or macOS?

(This phrase is to reach the required number of characters to publish the post)

Ah. And what app do you want to link to OF this way?

Apple Notes but in principle any text that allows “send to omnifocus” (not emails as we cannot paste the link back into an email).

Hmmm. If I understand correctly, the workaround is kind of silly. My solution has been to put prompts in the Shortcut to return to the respective app, copy the link, and paste it alongside the text you were sharing. There’s no single action that will grab both text and a link in the apps that I’ve been working with.

So in pseudocode:
Select text
Share to Shortcut
Shortcut adds text to a variable
Shortcut prompts a return to source app
Copy link to note
Shortcut pastes link to variable
Shortcut adds variable to OmniFocus

The other direction works in the same way.