A working solution based on anuraag post:
(requires root acces)
Flow1 (set flow options to "Skip execution when an instance is already executing")
Trigger: Command Output
- Command: logcat ClipboardService:E *:S -T 15
- contains text: ch.gridvision.ppam.androidautomagic
Action1: Set Default Imput Method
- Input Method: Automagic
Action2: Copy Text from Clipboard
- Variable: global_clip_data
Action3: Set Default Imput Method
- Input Method: Gboard
Trigger: Global Variable
- Global Variable: global_clip_data
You can set "Hide Automagic input method" in Automagic General settings
Post your questions and help other users.
These option not required as this process is so fast that you don't even notice input dialog or any parallel execution problem.
Root access isn't required in EAP.
You also need Clipboard Changed trigger. It is required when automagic is foreground.