EDITED: I solved this by creating a variable and using $datasource to figure out which data source the request came from. It was showing live on staging due to previous deployment settings. I re-deployed with the updated xano auth settings and it worked.
I want to be able to distinguish between live and test data when sending data to Xano from a Zapier hook, so that I can properly route the data to the appropriate data source/environment.
Currently, I have set up separate live and test environments in Xano and in my WeWeb project. However, I’m unsure how to communicate to Zapier whether the data it sends to Xano should be treated as live or test data. I know I can add a header with X-Data-Source: test, but I’m not yet clear on how to accurately determine the source environment (editor, staging, or production) from which the file originates. I’d like to tag the data in a way that allows it to pass through the system, so that when it returns to Xano after language translation is complete, it lands in the correct test or live environment.
I’m wondering if I could check the request headers to see if there’s a way to identify the environment (e.g., “editor” or “staging” in the header) as it comes from weweb into xano, and then using that information to tag the data accordingly before returning the response back to weweb where the workflow continues to add the file to google drive for the next step in the flow. Is there a way in weweb or xano in the function stack to check the incoming request headers? I think that would allow me to tag incoming data that comes from weweb editor or staging as test data. And then I can use the tag later in the workflow to trigger a path in zapier to either send with the X-Data-Source: test or a path that sends without it.
UPDATE: I figured out that I could use $datasource to check which source it was coming from. However, I find that it labels the staging domain as live. The editor shows up as test. Is it possible to also make it so the datasource shows as “test” on staging?