It seems necessary to purchase Flex Automation license Dev and Flex Unattended license, at least. If your task always use the Unattended License, whole the price will be cost of ROI of this task. However, if there are much time slot to vacant, it might be possible to share the cost with another tasks, as Unattended is concurrent runtime license.
Anyway, perhaps you should contact reseller to get estimate these license.
It should be deployable to a private cloud server
It should work with API calls and reading response to make the next decisions in the flow.
Probably no problem in general, but it depends on detailed requirement.