Returning from Apple Mail

I am using a folder action in Automator to send an email from Apple Mail with an enclosure, which works fine. How do I return control to the app that sent the request to Apple Mail after the mail is sent. If I add the return to the folder script it quits Apple Mail immediately so the user can’t add their email address.Thanks, I’m new to Automator but have done a fair amount of programming. Thanks.

Have you considered capturing the email address in your Automator workflow and having the workflow populate the address and send the mail? Then using your existing solution to switch back on completion should not compromise your overall flow. Otherwise, you have a disconnect and would require some sort of dual workflow solution that are triggered by the user. One to go into Mail and one to come out when they decide they have finished.

Thanks for the information. Your solution seems to be the right direction. I am programming in Processing (Java underneath.) I can see that I’m going to need to become familiar with more of Automator. The folder actions really saved me when it came to printing since Processing offers no way to print. Do you have any favorite sources learning Automator.

No favourites for me. I rarely use Automator these days. Apple have been promoting Shortcuts over Automator and bringing it into parity, and Keyboard Maestro offers more power overall.

For Automator, like any software really, the manual is the first place to start.

Sal was the automation product manager at Apple for Automator, so his tutorial site is a good option to go beyond the manual.

Hope that helps.