I am trying to take adventage of the code functionality to change the request URL of an action. However the documentation says that "Your script must finish execution within 5 seconds".
Does this time include the duration of the actual request? And would that mean, I can't use scripts, if my api takes longer than 5 seconds?
I am replying to this because I have added a feature request in the Microsoft Community portal to not take the actual response time into consideration in the 5 seconds maximum execution time of custom connector code.
Please vote if you feel this would be a useful addition.
Custom Connector Code allow call to take longer than 5 seconds · Community (powerautomate.com)
Can you clarify what you mean by "create a connector action instead"?
In all our cases, the custom code is being used to solve smaller problems. The custom code isn't causing any latency whatsoever. There is unpredictable latency in the backend application, which we would like the end user to be able to handle using native Power Automate timout controls just like they can with any other connector. The 5 second timeout should only apply to the custom code itself.
It's designed to solve smaller problems that could not be solved otherwise in a connector. For task heavy operations you should extend your service and just create a connector action instead.
Thanks for making this clear. This makes this feature in my point of view unusable, as small latencies (for example the startup time of the service when in idle) would result in errors.