Problem with Dynamic URLs and Page Load in WeWeb

Hi everyone,

I’m building an app in WeWeb where I use dynamic IDs (like chat_id or folder_id) to fetch data from my backend. These IDs are passed in the URL using dynamic route parameters (e.g., /chat/{{chat_id}}), and everything works smoothly as long as the user stays inside the app — because I handle the logic through workflows that update variables and fetch the correct collections.

The issue:
When someone shares a direct link (e.g., via email or social), and another user opens it, the app doesn’t fetch the correct data. The collection remains empty, and I believe it’s because the workflow doesn’t properly pick up the dynamic chat_id or folder_id from the URL when the page loads.

What I’d like to achieve:
If a user lands on a shared URL like /chat/123, I want the page to:

  1. Read the chat_id (or any other param) from the URL.
  2. Use that ID to fetch the corresponding record from the backend.
  3. Populate the page correctly — even if the user didn’t go through the internal app workflow.

Any advice on the correct way to structure this in WeWeb?
Should I use a specific expression format? Trigger data collection manually? Use a different method to extract the param?

Thanks in advance for any help

Hi TCC :waving_hand:

You’re almost there, you got the logic correct.

You first need to create a url parameter, which will become a variable that can be accessed later.

Then on the dynamic page you just need to link the collection items to that parameter variable you just created:

If you provide that url to someone: step/123, everything inside this page will be populated with the item 123. That way you can link your chat it do this dynamic page using only the url.

Makes sense?