Change Variable Value not saving value?

Hello! Very new user here - I’m trying to save a value from an API response to a variable, but I can’t access the result in my formula. Basically, my xano api that validates my auth0 JWT also creates a xano token (xano_token), and I have a workflow setup that 1. Fetches info from my xano api using the auth0 token and 2. changes my weweb variable xanoAuthToken value to xano_token. However, the value is not changing. Here is my info and a screenshot of the workflow

Setup:

  • I have a Xano collection called “Validate User Token” (ID: 546e010…)

  • The API response returns: { user: {...}, xano_token: "eyJ..." }

  • I’ve verified the xano_token is present in the Network tab Response

  • I created a text variable xanoAuthToken with “Save in local storage: Yes”

Workflow (As Seen in Screenshot):

  1. Fetch collection: “JWT Token Authorization” (fetches Validate User Token)

  2. Change Variable: Set xanoAuthToken to the xano_token from step 1

  3. Check if user has role…

So far, I’ve attempted the following:

  • (formula field) Validate User Token.data.xano_token - didn’t work

  • (formula field) Validate User Token.result['xano_token'] - didn’t work

  • collections['546e010...']?.data?.xano_token - didn’t work

  • context.workflow['action-uuid'].result.xano_token - didn’t work

  • wwLib.wwCollection.getCollectionData('546e010...')?.xano_token - didn’t work

  • Hardcoded string "TEST_TOKEN_123" - this worked :slight_smile:

Question: What’s the correct syntax to access the result of a fetch collection action that runs earlier in the same workflow? Or is there another obstacle I’m not understanding?

Hey there Heystack, welcome to the community :waving_hand:

There are a couple missteps that could be ocurring in your workflow and we’ll need some screenshots to try and figure it out together.

My first guess is that your API is receiving correctly the information, and you are not looking in the right place to grab it (in the formula screen)

So I’ll need you to share a screenshot of your API formula
Then a screenshot of the formula from the “change variable value” step

Hi Agustin - of course, thank you for your help! Is this what you are looking for? I can only apply one image at a time so my apologies for the multiple replies

Formula from the “change variable value” step:

API formula

Try using the dynamic value picker in the formula field to grab the result from the previous ‘fetch’ step

Look for something like workflow.stepName.result.xano_token . If that doesn’t work, please share your workflow step names or screenshots, so we can pinpoint the reference path together