I have a simple action with just a “Define Template Tag” step (Name: dummy, Template: [[dummy]]) and “After Success” set to Archive.
When I run the action manually on a draft in Drafts for Mac, it works perfectly - the draft moves to Archive.
However, when I call it via URL scheme from an external Python script:
drafts://open?uuid={uuid}&action=ProcessingToReflectComplete
I get this error in Drafts:
Script Error: SyntaxError: Return statements are only valid inside functions.
Line number: 3, Column undefined
The action has NO Script step - just the Define Template Tag step. There’s no code anywhere that should be executing.
Why would the URL scheme trigger a script error when manual execution works fine?
Running latest Drafts on macOS Sequoia.