I am trying to set up a system where people can send an email to a certain address to have their phone number added to a database. I was hoping to use Automator to accomplish a lot of this. So far, this is what I have as a workflow:
1. Get New Mail For: DEMO
2. Find Mail Messages where All of the following are true: Entire Message contains BEACH
3. Get Selected Mail Messages
4. Extract Phone Numbers From Text
5. New Text Edit Document
This works, except Extract Phone Numbers From Text “was not supplied with the required data.” Never mind the DB stuff yet – that’s for another question –, how can I extract a phone number from the subject AND sender of an email in Automator? I’m clearly doing something wrong somewhere.
You fail to extract data from the text of the mail messages because you are not actually passing text to the extract action – you are passing mail message objects. If you want to process the sender and subject of a message, you will have to insert a “Run AppleScript” action with the following content before the “Extract Data from Text” action:
– this will loop over all mail message objects and append their sender and subject properties to a list that is passed to the “Extract” action.
A few notes on your workflow