Just a suggestion,
try to retrieve the mails for every 5 mins or for any particular time interval and check if you got the required mail. Then trigger the job using API.
here you have steps to authenticate and trigger API
You don’t really need to trigger API in this situation as you are checking for mail. You can just use IF condition and invoke the workflow you want to run in the studio itself