Workflows vs Web App?

I have a working workflow that uses snowflake + javascript and the google maps API.

When I use the same code in the web app module, I get an error. Any ideas?

This works:

This does not:


const axios = require('axios');

// Array of addresses
const addresses = => address.ADDRESS);

async function getLatLong(addresses) {
const results = ;
for (const address of addresses) {
const url =${encodeURIComponent(address)}&key=ZYX;
try {
const response = await axios.get(url);
if ( === 'OK') {
const { lat, lng } =[0].geometry.location;
results.push({ address, lat, lng });
} else {
results.push({ address, lat: null, lng: null, error: });
} catch (error) {
console.error('Failed to fetch lat/long', error);
results.push({ address, lat: null, lng: null, error: 'Request failed' });
return results; // This will return the array of results

return getLatLong(addresses)

Hi @Ryan_Nicholas

You cannot use require in the webapp.

You have to include axios as external js library and then use just the global name axios to do your fetch.

Hope this help.

hmm could you please provide an example? thanks!

Hi @Ryan_Nicholas,

You can add a custom library to your app like this:


Click the gear, select libraries, put in the URL for the package you want - you can check the links to various version of Axios here, the most recent one is

Then in your query you can use the library as you usually would.