Forum Academy Marketplace Showcase Pricing Features

Create a page with a workflow?

Is it possible to create a page using a workflow? I’m thinking of allowing users to create a profile page as they signup with their slug as the page URL. I am trying to do it this way so the URLs are as short as possible. Something like:

myappurl.com/user-slug

vs.

myappurl.com/profile/user-slug

Dont believe that’s possible the slugs feature is the best you’re going to get

In Bubble, a page can be set to a Data type. This is what you need to do. Create a profile page, set it to “user” for data type. When user will signup, redirect them to the profile page and it will ask you to enter data: use current user.
You can use slug if you want to display in the url. No problem. The process stay the same but on user signup, you will set the slug

1 Like

Thanks Jici, but my question is what will be the URL of each user’s profile page? I was hoping for myappurl.com/user-slug

If I understand what you’re suggesting, then the URL would be something like:
myappurl.com/profile?slug

In order for the URL to be:
myappurl.com/user-slug
I would need a page created for each user, or I would somehow have to overwrite the 404 handler which I don’t know if it’s possible to do or not.

Slugs are your best bet. If you create the user profile page to have a short name, it will make the URL shorter. So for example you could have something like myappurl.com/p/myusername. Think of those YouTube urls where it was youtube.com/c/channelname. Here’s a great video: How to Create Clean URLs for Your Bubble App's Pages - YouTube

Unfortunately within Bubble I don’t think its possible to have dynamic data be the first thing after the main url, I believe that’s reserved for pages. I took a quick look at the plugins list as well and there doesn’t appear to be anything there that can help either.

Hope this helps!
Cal

1 Like

Thank you Cal. That’s very helpful. I ended up using the 404 page to redirect correct user slugs to their profile page. So this way users can have a /slug as their URL but ultimately the short url redirects them to /p/slug.

That is a really awesome solution, I didn’t think that was possible! So do you have access to what page the user was trying to navigate to? And then send them to the user profile page if that page is a valid user slug?

Yes. You can use get from page url to grab the path and search to see if such a slug exists. If it does, redirect them to their profile page and if it doesn’t show the 404 message.

3 Likes

That’s awesome! Does it result in any noticeable delay when you access the 404 page before being redirected?

There is a short delay, but I think it’s unavoidable and I can display a loading screen before redirecting them to their profile.