Dan....good to see you doing some tutorial videos. This industry needs more input from those experienced with their craft as there's a ton of bad information floating around.
On another note, to write really good actions, most likely you'll need to implement conditional logic through JavaScript. These are written using a tool named ExtendScript Toolkit which is available at no cost from Adobe. You'll also want to download the SDK (Software Development Kit) for the version of Illustrator or Photoshop being used. The SDK contains extensive information on using ExtendScript Toolkit, Scripting and writing JavaScript that runs within the environment of the intended application.
The Action can then call the JavaScript when needed to perform a task not possible through the static Action. It's not easy however and unfortunately there's little to no basic how-to documentation to get started aside what's offered from Adobe, most of which assumes the process is somewhat understood.
Good Luck!