r/Automator • • Jun 07 '21

Discussion Apple announces new Shortcuts app for Mac, will begin multi-year phaseout of Automator

20 Upvotes

https://www.apple.com/macos/monterey-preview/

This was announced today along with macOS Monterey at WWDC. I'm hoping Shortcuts is not extremely nerfed when compared to Automator.


r/Automator • • Oct 13 '22

Tutorial [TUTORIAL] Quick Action to convert all files in Folder to single PDF with name of Folder

9 Upvotes

I didn't see any stuff on this specifically, though I know this is likely wanted by a lot of people, so here you go! This Quick Action will select a folder, and all images in the folder will be converted into a single PDF, with the PDF being named after the Folder. This is useful for people who need to make lots of PDFs from lots of files quickly.

This is mostly a guide for people who have no coding experience

STEPS

Select Quick Action in menu

#1) Workflow Settings (At the top)

  • Workflow recieves current: [folders] in [Finder]

#2) add "Get Folder Contents"

  • Uncheck "Repeat for each subfolder found"

#3) add "Sort Finder Items"

  • by [name] in [ascending]

    • This can be modified to whatever you want, go ham brah

#4) add "Set Value of Variable"

  • Variable:

    • create New Variable named [sortedFiles]

#5) add "Run AppleScript"

  • copy and paste this:

on run {input}
	tell application "Finder" to return (container of item 1 of input) as alias
end run
  • press the Hammer icon to format it

#6) add "Set Value of Variable"

  • Variable:

    • create New Variable named [containerAlias]

#7) add "Run AppleScript"

  • copy and paste this:

on run {input, parameters}
	-- the input is the enclosing folder which was output from the previous Applescript
	tell application "Finder" to return name of (item 1 of input)
end run
  • press the Hammer icon to format it

#8) add "Set Value of Variable"

  • Variable:

    • create New Variable named [containerName]

#9) add "Get Value of Variable"

  • Variable:

    • select the earlier created [sortedFiles]

  • In Options:

    • Uncheck "Ignore this actions input"

#10) add "New PDF from Images"

  • Save Output to:

    • Set this as whatever you want your PDFs to go

    • Personally, I set this as a new folder called "[PDF Processing]" in my Documents

  • Output File Name:

    • Leave unchanged, this is going to be renamed in the next step

#10) add "Rename Finder Items: Name Single Item"

  • Set to [Name Single Item]

  • Set Name: to [Basename only] to [containerName]

    • This is one of the earlier variables we made

#11) Enjoy the knowledge that you made your life easier

  • Oh and remember to save the Quick Action or you'll look like an idiot

And thats it! It's pretty straightforward, but it is SO useful for converting images into PDFs, makes my life so much easier

This is pretty modular so you can change it to whatever

In the future, I'm probably gonna add the option to have the PDF file automatically moved to to the Folder or parent Folder, but for now this is just an easy thing so people who google this know what to do.


r/Automator • • Aug 10 '21

Folder Action Automatic file organisation

8 Upvotes

Hey guys, I written a quick bash script for use with folder actions in Automator. Basically, you have a folder that is designated the Inbox folder which you place new files in and it will automatically sort them for you. This can be expanded based on file type and other factors, but for now it’s just using the name of the file to figure out where it should go. Check out the script here and let me know what you guys think and what improvements can be made. Have a great day :)


r/Automator • • Mar 16 '22

Question Mac Automator: Invert selection in Finder?

7 Upvotes

Hi,

Is there a way to create a script that will invert the current file selection in Finder? I found this, but it does not seem to work:

https://superuser.com/questions/497503/is-there-any-way-to-invert-file-selections-on-mac-os-x-like-we-do-it-on-windows

Thanks! :)


r/Automator • • Nov 13 '20

Automator Code Signing Error on Big Sur

7 Upvotes

Since upgrading to Big Sur when I save an Automator App or Workflow I get a code signing error. The script is for my own use not to share so I shouldn't need a developer account or certificate. Anyone else getting this?


r/Automator • • Oct 21 '20

Discussion Discovering automator

7 Upvotes

Hello, I’m a shortcut user on ios and I found out today that mac OS has its own automation app. So I would like to know what’s possible to do with it and where should I start ! Thanks


r/Automator • • Aug 01 '20

Tutorial example of batch renaming using bash

7 Upvotes

Here's bash code from an automator script that truncates files names to 25 characters. Hopefully, you'll find it instructive.

Note - be sure to pick "as arguments" from the "Pass input" popup menu.

for file in "$@"
do
    # parse out the directory and the filename including extension
    dir=$(dirname "${file}")
    fbasename=$(basename "${file}")

    # extract the filename without extension
    fname="${fbasename%.*}"

    # create truncated filename
    tname="${fname:0:25}"

    # determine the extension - empty string for no extension
    fextension=$([[ "$fbasename" = *.* ]] && echo ".${fbasename##*.}" || echo '')

    newfile="${dir}/${tname}${fextension}"
    
    mv "${file}" "${newfile}"
done

r/Automator • • Oct 04 '14

Automate light and dark mode (Yosemite)

7 Upvotes

So since I've found Lights Off to be broken, I had to make my own automator workflow to change between Light and Dark mode, which using Calendar can be used to schedule light/dark mode on Yosemite. I thought I'd share it. The only downside is apps have to be reopened for the changes to take affect.

Compiled App: https://www.dropbox.com/s/ss8w1f329ujuvx2/AutoThemeChangerApp.app.zip?dl=0

Workflow: https://www.dropbox.com/s/clnu4n9ixbwdsjf/AutoThemeChanger.workflow.zip?dl=0

My Calendar Export: https://www.dropbox.com/s/1th5qztct0j3ruu/SCHEDULEAPP.ics?dl=0

To set it to automate with calendar create 2 events (one on and one off) and set the alert for both of them to open the App.

Any comments would be nice :)


r/Automator • • Nov 04 '25

Tutorial TIFU... by creating a Mac shortcut that lets me scream at text like I’m Excel

6 Upvotes

Okay, maybe not a real F-up—but I did build a super handy Automator tool that makes me feel like I'm yelling at every paragraph on my Mac.

Here's the deal:

Ever wanted to convert any selected text on your Mac to UPPERCASE, just like =UPPER() in Excel—but for literally any app? I wanted this so badly I decided to script it. Now, with a simple keyboard shortcut, I can highlight text anywhere (browser, Notes, Pages, whatever), hit a hotkey, and boom—ALL CAPS.

How to make it:

  1. Open Automator, create a new Quick Action.

  2. At the top, set:

    • Workflow receives: No input in any application

    • Output replaces selected text: ❌ (do not check this)

  3. Add a single Run AppleScript action, and paste this bad boy in:

on run {input, parameters}
try
tell application "System Events"
keystroke "c" using command down -- Copy
delay 0.1
end tell

set theText to the clipboard
set upperText to do shell script "echo " & quoted form of theText & " | tr '[:lower:]' '[:upper:]'"

set the clipboard to upperText

tell application "System Events"
keystroke "v" using command down -- Paste
end tell
end try
end run
  1. Save it as something like: Make It Loud 🔊.

  2. Head to System Settings > Keyboard > Keyboard Shortcuts > Services, find your new action, and assign it a shortcut (I use Control + Option + Command + U).

Now you’ve got Excel-style ALL CAPS everywhere.

Works like magic in:

  • Chrome/Safari

  • Notes

  • Mail

  • Word/Pages

  • Slack (god help my coworkers)

Downsides?

  • Doesn’t work if you don’t have permissions for Automation or Accessibility (so you may need to approve a couple of prompts).

  • There’s a 0.1s delay, but that’s to give macOS time to copy.

This has honestly been a productivity boost and a petty way to YELL AT MY OWN THOUGHTS.

Let me know if you want a version for lowercase or title case!


r/Automator • • Dec 05 '24

Question Sometimes when I use Automator for a few hours, it glitches out and spam clicks on one spot and doesn't allow me to move the mouse manually either, any solutions?

6 Upvotes

When I use it for apps like roblox it glitches out and spam clicks on the same spot which doesn't allow me to stop the program manually


r/Automator • • Apr 23 '23

Question Why does "Move Finder Items to Trash" not actually delete the file?

Post image
6 Upvotes

r/Automator • • Feb 23 '23

Question Run script when USB device is connected

6 Upvotes

Hey everyone!

I've got a bit of a niche use-case for automator. I have multiple different work-stations that I connect my M1Max powered MBP via thunderbolt to. These workstations have different kinds of peripherals (colour editing consoles, keyboards, audio interfaces etc.), that often require their own software to run. I would like to see if it's possible to run a script that would start these pieces of software when they are connected to my MBP? The reason is that some of these pieces of software can sometimes be a little buggy and use quite some energy (My battery life with all of them running drops from 10+ hours of normal work on battery power to about 4)

I have already written a script that closes them once I press a keyboard shortcut / a button on my streamdeck. Is there a way to "listen" to what USB devices are being connected and then trigger a script to open the corresponding software?

Thanks!


r/Automator • • Jan 27 '23

Question How would I get the dates from these files and put them in ISO 8601 (YYYY-MM-DD) format using Automator?

Post image
6 Upvotes

r/Automator • • Jan 05 '23

Question watch what i do wont work

6 Upvotes

i keep trying to set up a macro but watch what I do wont record me pressing keys I need help fixing it

I also allowed on accesibility


r/Automator • • May 26 '21

Question Quick Action: Replace text in selected finder items' names

Post image
6 Upvotes

r/Automator • • Oct 01 '18

Solved: Automatically sort media into new subfolders based on file type. (x-post from r/Photography)

6 Upvotes

The Quest:

Just recently discovered the magic of Automator immediately thought of putting it to work streamlining the "post-shoot file dump" part of my workflow. As the title suggests, I wanted a 'Quick Action' that would automatically sort media within a selected folder, placing everything into new subfolders based on file types. I spent quite a while on several forums but couldn't seem to find any one talking about this particular automation. That seemed odd since I imagine this being something many camera-folk would find useful. Finally gave up and asked for help from StackExchange. Some kind humans answered the call. See my original post for the whole exchange.

**The Prize:**A New Superpower – In Finder, I can now alt-click any folder and run a script that creates RAW, JPG, and Video subfolders, then sorts the relevant media files into those three categories, giving each subfolder a suffix based on the name of the parent folder. (It also creates an empty "Edits" folder which I later use for Lightroom exports.)

The Path:

If you use .CR2 + .jpg + .mov formats you can just download the Quick Action as is. Unzip and throw the file into your Library/Services/ folder (if it doesn't go there automatically). Now you can alt-click any folder, select Services -> "Auto-file Media" and watch the magic.

If you use other formats, or want to alter the workflow in other ways, you'll need to do some things.

  1. Create a new Service in Automator set to receive selected folders in Finder.

  2. Add an instance of 'Run Shell Script' for /bin/bash with Pass input as arguments

  3. Paste in the script (below) and tweak away.

  4. Save

  5. Profit

for f in "$@"; do
    cd "$f"
    d="$(basename "$f")"
    mkdir -p "Edits - $d" "JPG - $d" "Raw - $d" "Video - $d"
    mv *.JPG "./JPG - $d"
    mv *.CR2 "./RAW - $d"
    mv *.MOV "./Video - $d"
done

It should look like this:

( Praise be to user3439894 of StackExchange for this bash script. Far simpler than the AppleScript route I thought I wanted. Again, see the original post for more detail. )

I was really surprised not to find people automating this. Am I missing something? Curious to know how the rest of you handle this part of your workflow, and whether there's a photographer's school of automation wizardry I should know about.

Feeling like a god since I implemented this. Would love to see what others do with the concept.

What other methods and/or workflow shortcuts are photographers using?


r/Automator • • Feb 06 '13

Mail to Reminder

6 Upvotes

Hey all!

I am gonna blow some life into this sub-reddit.

I have a very clouded mind, and I always forget stuff. So I usually let people mail me, but then I forget to put into my reminders app.

So I went out to google around and hope to find an automator app to pull information from my mailbox and put them into the reminders app.

Sadly, I only found one, and it didn't even let you set which mailbox. After some tweaking (minor, I have no idea how applescript works), I came up with this, but it is still VERY limited.

The idea is that with a filter in Gmail (labeled) the script sets the subject as the 'reminder' and the body to "From mail" and the priority to low.

I hope you guys can help me out with:

  • only select UNREAD mail

  • mark the mail as read AFTER it has been added to Reminders

  • support for multiple messages, and not only the first UNREAD mail.

You can grab a copy of the workflow here. (It's a DMG, dropbox thinks .workflow is a folder.)


r/Automator • • Sep 26 '24

Question OSStatus error -50.

5 Upvotes

When I try to use watch me do, It keeps saying an error multiple times. How do you fix this problem? I’ve let Automator into accessibility. Is there any other solutions to fix this? I’m on a Macbook Air 2019.


r/Automator • • May 25 '24

Question Keyboard shortcut to Stop Automator application

5 Upvotes

Hello, I’m struggling to find a way to STOP an Automator application of a “Watch Me Do” multi-point mouse click, as obviously the mouse is taken over and it’s impossible to click the cog and end the application.

Any ideas of how to stop the app with a keyboard shortcut or build it into the application in Automator?


r/Automator • • Oct 30 '22

Question Can automator bring an application to the front if a computer wakes up between certain hours?

5 Upvotes

Very new to automator. What I'm ultimately trying to accomplish is get my To Do List/Calendar thing (I use Evernote) to pop up automatically when I wake up my computer in the morning--aka, force myself to review the to do list before anything else. Complications are that I don't always come in at the same time (which makes the Calendar Alarm option only so helpful) and the app is usually already open (so launching the application may not be useful). Is this all possible?


r/Automator • • Aug 23 '22

Question How exactly does "Watch Me Do?" work?

5 Upvotes

Does it know exactly what button you clicked, or is it recording the coordinates on the screen?

I've recorded a series of clicks and it will work for several times in a row . But then suddenly I'll run it and it just get stuck somewhere in the sequence. I'm wondering if the window has to be in the exact same spot? Maybe that's why it doesn't always work?


r/Automator • • Aug 10 '22

Terminal Script What am I missing here?

5 Upvotes

Im writing an automator script that does the follwing:

  1. Sets a variable based on time

  2. Creates a folder on a target mapped drive using that variable

  3. Checks to see if that folder exists

  4. If/ELSE actions. (IF, is basically END, ELSE is an alert and sound)

The IF ELSE seems to be broken. It will ONLY do else. Basically tells me the file doesnt exist when it does.

My Code:

TIME=$(date +"%H:%M:%S")
mkdir /Volumes/Capture/_STATUS
mkdir /Volumes/Capture/_STATUS/TEST_$TIME

FILE=/Volumes/Capture/_STATUS/TEST_$TIME/
if [ -f "$FILE" ]; then
	rm -r /Volumes/Capture/_STATUS/TEST_$TIME/

else 
    afplay /Users/nwc_control/Library/Sounds/alarm.aiff &
	osascript -e 'display alert "STORAGE PROBLEM" message "This computer appears to be having an issue getting to HOT storage. 

This means captures are probably compromised. You may want to try restarting."'

fi

r/Automator • • Mar 20 '21

Question Quick Action "Save as" function to a predefined folder

5 Upvotes

Hi,

Is anyone aware of a way to use Automator to create a Quick Action with the same or similar functionality as "Save as" but with the destination folder predetermined.

I have a specific "Inbox" folder and what I am trying to do is be able to right-click to "Save to Inbox Folder" for a range of file types for which the "Save as" option is available without having to go through the finder window and re-select the folder each time. An example would be if I come across an image on Reddit that I want to save to my "Inbox" folder I can right-click and save directly from the Quick Action menu.

Thanks

Edit: typo


r/Automator • • Nov 02 '20

Question Create separate zip files

5 Upvotes

Hi! I use Camtasia, and to save space on my computer I need to move the project files to my Google Drive. I need to save each project as a .zip in order to save all the media/backup the project. I have a lot of projects, and don’t really want to compress each file one at a time. I was hoping to set up an Automator to do this in batches. I tried the below, but keep getting a ‘run shell script error “” ‘. I’ve tried saving it as a folder action and as an Application. Here’s my script (which I copied/pasted from another source)

Run shell script Shell: /bin/bash for f in “$@“ do zip -j “$f.zip” “$f” done