Notify or do something when an appliance like a dishwasher or washing machine finishes

Sorry

But the configuration you gave me works for this program (1):

But if I use a longer program, I get several start and end messages (2):

Is there a compatible configuration for both programs?

Thanks a lot!!!