which should return the parameter ‘text’ containing the OCR’ed text.
I left the settings for Drafts to manage callback URLs.
When I invoke this, however, drafts just emits an error noise and slides down a red notice saying ‘Prizmo Go’, which I believe is from the name of the action.
You’re absolutely right, thank you @RosemaryOrchard - I can’t believe I missed that.
In a way, I can; I tried to copy-and-paste from PrizmoGo, where an example callback URL is provided; however, it’s not selectable, so I had to screenshot it, then feed it back into PrizmoGo, where I guess the space crept in. Some kind of lesson has been learnt here, I suppose!
So now this works as expected, how do I get the contents of a parameter in the callback and paste it at the cursor position? I guess that’s going to be some JavaScript, or is there a foolproof alternative?
I would suggest using the [[callback_result]] parameter as documented here, you need to make sure Wait for Response is enabled in your callback action, and then you can just use an Insert Text action step afterwards.
Thanks again, @RosemaryOrchard - so the parameter is available in the “Insert Text” action, and a swift [[callback_parametername]] inserts it. I updated the Prizmo invocation to set the parameter name for the returned text to ‘prizmotext’ so it can be "Insert Text"ed as [[callback_prizmotext]].
The action is uploaded now, but assumes ① you’re OCRing in English, and ② capturing directly from the camera.