How can I set a timeout to this job that after X seconds the hold will be expired?
After this timeout, the workflow will not wait for approval anymore and the workflow will be canceled.
Currently there is no way to set a timeout for approval jobs. There is a limit of 90 days for jobs to be approved, and in the case that workspaces are used the limit is 15 days.
One workaround would be to utilize our api to occasionally check the duration of approval jobs, and then cancel them if they exceeded a specific time. This would require you to create a custom script however.
You can find more information about our API endpoints on the following page: