I found
this (The Ultimate Gold Guide REVISITED. How To Sell Your Drops For Insane Prices).
And it is somehow what I was thinking when I posted this. For example you focus on an item and see how many of them are sold. There are several ones sold at: 75g, 100g, 125g. To earn money you can buy 75g and 100g and sell it for 125g for 50g and 25g of profit.
It would be even more efficient if the bot first "learned" (saving the values in a text file) for several hours/days. Maybe running the bot an entire week to make sure of the consistency of the prices, then start to buy/sell. Maybe using all of this info to calculate the average price of every item and then buying all of them that are below the average price and resell them for +25% of the average price for profit.
It seems that there are another method involving garrisons though I dont know since I dont know garrisons. Last time I played wow was on BC and I returned recently... Anyway, the method consists in the same idea. It seems that every day a vendor with random prices visits your garrison. Then the idea is waiting for buying cheap and selling expensive.
I want to know a devs opinion about these methods.