Passing XML for Flowcharting plugin by SQL query?

Hello, I am using the Flowcharting Plugin for Grafana. It works perfectly when I copy the XML of the floorplan that I’ve created in into the Source Content field, however, is it possible somehow to query the XML from a postgres database?

Let’s say we create a bunch of floorplans on, then save the XML in a database, then query it in Grafana. The reason why I need something like this is because we have a variable for buildings on this particular dashboard, and it would be very nice if the floorplans could change accordingly.

If this is not possible, can you suggest a workaround?

Thank you!