Custom Craft Values
While it is possible to modify material costs, there are a number of crafts in legion where the output is not a specific number of items, specifically mass milling and prospecting. The item result for milling, for example, is a single pigment, and so the profit for TSM is nowhere near accurate. I know this is a problem on Blizzard's end, but rather than waiting for them to fix it, would it be possible to set our own custom craft values for use in the craft window?
This could work in a number of ways, but how I see it being easiest is a new tab in the TSM crafting options which lists every craft, not just the crafting items. Each of these crafts could then be given a custom value. In the case of dreamleaf milling, a string could be used that gives the average value of milling 20 dreamleaf and opening the nightmare pods. There is a whole lot of data collection on the woweconomy subreddit, but no way to incorporate that data into tsm crafting.
Once the custom value is entered, the crafting menu would replace the default item value with the custom one, possibly with colored text to indicate the change. The menu could then use this value instead to calculate profit, both for easy viewing in the crafting menu, and also for interfacing with crafting operations, which could now only mass mill legion herbs when it is profitable to do so.
I'm also sure that this community would be able to find a whole number of uses for this functionality that I would never even be able to think of, and would add a whole lot of utility to TSM for all professions.
You can do this by creating a Crafting operation and providing a custom price for crafting in the operation.
For example, the "Bag of Anchors" is created through a BFA alchemy recipe but is soulbound so TSM doesn't surface any pricing data. However, it's known that the item creates 10 Anchor Weed as well as a few additional vendor-level items, and as such we can easily value it as about the price of those items.
It would be useful in this case and in similar recipes to be able to set a custom price for that soulbound item (much like how you're able to set custom material prices for soulbound items like Bloods of Sargeras and Expulsom), letting the player easily see how profitable the recipe actually is at a glance.
You can do exactly this using a rather complicated custom price source, your idea would definitely make it easier.
If you do want the price formula let me know