Use Mesh Metadata as Input for Node Material

For GLTF there are some ways which are described here - How to Access extras Property of Loaded GLTF - #4 by sebavan
Or (for meshes created with Babylon) just use mesh.metadata - Mesh | Babylon.js Documentation