Search folder on onedrive can create if it's not created, creates a new one?

If I search a OneDrive folder (and exist) I want to have the ID. If doesn’t exist I want to create automatically.

Is a just one module that do that? or Have to make so much modules after f

or each path?