Mail app to OF shortcut doubles the task

Just added the “New-Task-for-Selected-Mail-Message” in my shortcuts…
The shortcut generate 2 tasks with the same title…I can’t find a way to avoid that.

My ideal shortcut would be to select an email (inside mail app) and have task that has:
Title: Name of sender - subject of email
Notes: text content of the mail
Is that achievable ?
Any help would be appreciated

You can just use mail drop to send it to OF, alternatively you could use Mailmate (MacOS only) which has a built in bundle to send to OF, GitHub, Things, 2Do etc etc etc.

Greetings! Hmmm. Never seen that happen. The shortcut runs as expected on my computer (macOS 12.3.1). How is the shortcut being triggered? Are you using the Shortcuts menu or are you launching the shortcut another way? Perhaps the shortcut is being run twice somehow.

As to the customization: the AppleScript script has access to all of the properties of the message, including subject and content. Adjust the script to return a dictionary that contains those properties.

However TheOldDesigner correctly points out that Omni has a Mail Drop mechanism for importing message content as new tasks. The shortcut was designed as a way to link-back to the message so that you didn’t have to overload the task with data. Cheers!

Thanks @TheOldDesigner and @Sal
The shortcut is triggered with keyboard shortcut. I just added it to the “Shortcuts app” and added a keyboard Shortcut.
Yes, Mail Drop can be a solution. I’ll try to create a keyboard shortcut to send currently selected email to OF.