Saving notes in different folders

I need suggestions on how to make this happen…I usually work on many small tasks, and like to keep related files in their dedicated “task folder”. Ideally the folder would also include my notes on that task. To any Joplin note, I’d like to be able to add an optional location for such a “task folder”, and have Joplin export a md or html version to that folder periodically. Maybe at every synchronization or something. Any thoughts?