Using existing javascript variable in flow?

Geez I feel ridiculous asking this question but here goes:

I have a client-side file config.js that has some variables that change between development and production deployments. Here’s an example:

var myConfig = { stripePublicKey: "abc123" };

I include config.js very early on in my page like so:

<script src="scripts/config.js"></script>

Now I’d like to use the variable myConfig.stripePublicKey in a flow. How do I do that? I’ve tried {{myConfig.stripePublicKey}}, myConfig.stripePublicKey, and even using eval.

Example flow:

runJS: {
      function: "doStuff",
      args: ["{{myConfig.stripePublicKey}}"],
      name: "doStuff",
      output: true
}

Any advice would be appreciated

Community Page
Last updated: