To execute a php script directly in Workflows/API

Have you had a look at using

Its use is explained here: