Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Locker

macrumors 6502
Original poster
I'm trying to create a workflow in Automator which will basically:

- Fetch new email messages
- Filter the messages so only ones with a certain sender come through
- Take the attachment from these and save it in a folder

The following workflow works perfectly for it:

- "Get New Mail"
- "Find Accounts in Mail"
- "Get Attachments from Mail Messages"

However, I have one problem! All of the attachments will have the same name (photo.jpg because they'll be sent from an iPhone). So, once it's copied the first attachment over to a folder, it errors... due to the fact that a file of that name already exists. How can I get it to save the attachments as 1.jpg, 2.jpg, 3.jpg etc. - or is there another method to achieve what I want to do?
 
I'm not sure, but there should be an Automator action for renaming. You could try to get it set up so that it appends the date or time to each attachment being saved.
 
You could try to get it set up so that it appends the date or time to each attachment being saved.
That was my first thought, though the "Get Attachments from Mail Messages" action saves the images to your defined destination all in one go - there's no in-between space to add a renaming action.
 
That was my first thought, though the "Get Attachments from Mail Messages" action saves the images to your defined destination all in one go - there's no in-between space to add a renaming action.

what if you would create a folder action that renamed every item added to that folder?

You would though either have to move the pictures to another folder or have automator somehow filter through the already saved pictures so they arent renamed endlessly
 
did you ever figure this out!?

This same thing is driving me nuts!! You'd think there'd be a more elegant way to use this get attachments action, if even two of the items have the same name it won't save to any folder, it just fails, so there's no way to rename them. Grr! Frustrating.

I'm literally trying to do the same thing you are, photos from an iphone labelled 1.jpg, 2.jpg, 3.jpg.

Anyhow, let me know if you cracked this or if you have an applescript that does the trick!
 
Any answer yet?

Has anyone come up with anything yet? I have the same problem, and I'd love to add the date and time the mail was sent to the photo name as they're saved. I can't find an answer anywhere, so I'd really appreciate some guidance. Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.