Custom functions can only be triggered at the workspace level, based on the schedule, cancellation, or reschedule of a Booking (therefore, if you only wanted to run an action for a certain service, then you need to bake that into your code).
Note that there is no place to create connections with other apps and so you can’t actually run API calls—integration tasks only!