Let's say I want to take a random plant , and get the chemical formulas of the compounds he's made of. Is there an automated method for doing so and how costly is it(roughly) ?
HPLC-MS (high performance liquid chromatography- mass spectrometry), the latter with a suitable database for known small molecule plant components (alkaloids, terpenes, THC, etc.) would do it. Cost would be three to low four figures/shot. Saccharides and proteins are different and more expensive problems.
Consider what you are asking. Mere pokeberry contains astragalin, canthomicrol, caryophyllene, esculentic acid, jaligonic acid, lectins, oleanolic acid, 3-oxo-30-carbomethoxy-23-norolean-12-en-28-oic acid, 6-palmityl-Δ7-stigmasterol-Δ-D-glucoside, 6-palmytityl-α-spinasteryl-6-D-glucoside, phytolaccagenic acid, phytolaccagenin, phytolaccatoxin, phytolaccosides A,B,C,D,E,F,G (esculentoside E), pokeweed mitogen, tannin, triterpene alcohols, α-spinasterol, and α-spinasteryl-β-D-glucoside and a whole bunch more. One injection is hardly a beginning. If you do not know how to cook it, it kills you.
In general, no it is not possible to catalog all of the compounds a plant is made of automatically. Uncle Al's answer is as close as you could get, but even that is far, far away from getting every single molecule (there would be tens of thousands, at least). HPLC-MS is good first step and would get you most of the small molecular weight substances.
For larger biomolecules, you would have to use gel electrophoresis, which is not very "automated."
We are a long way from cheap, automated separations of biological mixtures, but it is one of the major research goals of the pharmacology, molecular biology, and medical fields.
This link describes many of the currently available methods for protein purification, which is one of the most difficult problems in the field of separations.