Drafts > Clean Text > Drafts - URL Scheme advice appreciated

This is untested, but from a quick read of the docs you linked to, I believe the best setup would be an action with two steps as follows…

Step 1: Callback URL

Configure the callback url step with the following URL and “Wait for response” enabled (replacing “uppercase” with the action you want to run:

cleantext://x-callback-url/run?action=uppercase&text=[[draft]]

Step 2: URL

URL step configured with Drafts’ own create URL, and the result returned by Clean Text:

drafts5://create?text=[[callback_result]]

The callback URL step will create the [[callback_result]] tag to contain the result parameter returned by Clean Text.

This could be done other ways, but this seems the most straight forward.