Build a custom sitemap with Xano?

My Bubble website uses Xano to populate all of it's product pages. So for example the URLs look like the following:

When the page is loaded on Bubble, it knows to make an API call to Xano looking for the ID in the URL (So /product/565 will search Xano for ID #565 and return the product data).

The issue is that Bubble does not know what product ID's exist and therefore cannot display them in my sitemap. It only can list So I'm losing out on a lot of low-hanging search traffic.

The solution (I think) is to build an API endpoint on Xano that essentially grabs all of the ID's on my product table and then formats it all into a custom sitemap-friendly format that then spits out a sitemap.xml file for me to download and upload to Google Search Console.

To avoid reinventing the wheel, has anybody done this before? Is there a better method for this?