Creating unique id for a page and sending it via URL link

Hey everyone,
I am building estimates page for clients in which I have designated page that is type estimate that will display the estimate of each client, the question is how can I get the URL that will be generated for that specific client and how can I send a link to that client to view it even when they are not registered?

Many Thanks!!!

Have a page set to the datatype you are creating when you create an Estimate. Now your URL would just be [yourURL]/pagename/uniqueID

For example: www.example.com/estimate/1717599697362x688448838926336000

So I need to change page ā€œview estimateā€ instead of type estimate to be type database - search for estimates? would the page still stay dynamic?

what I still dont understand is how do I know what would be the page ID (as per your example anything after the (ā€¦estimate/ ) and also how would that affect if this client has multiple estimates?

I am triggering an email sent after clicking ā€œsend estimateā€ so I need to know the ID before so it can be sent as a link for the client to view in the same email.

When youā€™re creating the ā€˜Estimateā€™ - I assume thatā€™s a datatype of type ā€˜Estimateā€™ or similar, correct?

Assuming the data youā€™re creating is called Estimate, when you create it in the workflow, you can reference it later in the same workflow. In the ā€˜Send emailā€™ function, the body of the email, you could include a link to ā€˜Result of Step 1ā€™ or whichever step creates the data.

On the page youā€™re directing them to, again, assuming the data type is set to Estimate, you build the page out with elements, like the header would be a text element, and itā€™s data source set to ā€˜This Pageā€™s ClientNameā€™. Now the URL linking to the newly created estimate is going to go to a page showing the data however you have built the page to show it - and itā€™ll know just based on the URL and automatically apply that to the page - no need to do a separate search.

Yes thats correct the type of data on that page is ā€˜estimateā€™.
I understand exactly what you mean with the page URL and this is also how i imagined it to look at the end but I am not understanding where can I extract those numbers and how to link it in the workflow on my email send.

I attached 2 pictures of the ā€œcreate estimateā€ button preferences as well the overall workflow hopefully you would be able to spot anything.


In your SendGrid email setup, you should be able to define what is sent in the body of the email. In that body, youā€™d include something like

ā€œTo view your estimate online click here:ā€
Write out the URL for your site up to that page, and then choose 'result of Step 1ā€™s Unique ID

image

I am using dynamic templates in SendGrid so I have the body in SendGrid with the {body} parameter which I reference later in the SendGrid Email just like your example - I realized that the source was wrong and now the link comes in the email the problem now that the data doesnt show when the estimate page opens (template is empty).

This is what comes in the email:
https://my-app/view_estimate/1717616418791x147612479603939070
which this is the user unique id: 1717616418791x147612479603939070

But no data is coming through

Are you intending on linking to the User ID, or the Estimate? If youā€™re wanting to link to the user, youā€™ll need the ā€˜view_estimateā€™ page set to type ā€˜Userā€™ instead.

And then on that page, build out what data should appear, like Client Name, List of Estimates, etc.

I see then probably the issue is like you said linking user id instead of estimate id, how can i generate id for the estimates? that would essentially be the URL right?

and thank you so much for taking your time to help, I can say thank you enough, had been on it for a while.

When you first generate an estimate here:
image

Thatā€™s when Bubble automatically assigns it the UniqueID. Anything else you do in that workflow can reference that newly created estimate. Iā€™d recommend getting away from the template in Sendgrid and start with just the basic Text in the body field, get that working like you need (example.com/view_estimate/23487384738x723487393) , and once you get that link going where you need it, then you can work on dressing it up with a template or HTML. I like going to the basics and getting them working before I focus too much on the look of it - that way thereā€™s fewer variables to deal with when troubleshooting.

Once you get an email sent with the format example.com/view_estimate/[estimate unique id] also check Privacy Rules because usually those will only allow the creator to view it but in your case you want it public.

1 Like

IF esitmates are based on user, there is no need for uid or anything in the url after the page. When the user lands on the page, set the container of the page to the current user, and thatā€™s allā€¦ makes the email much easier as it can be a static linkā€¦

Presumably its for not logged in users to just view an estimate (mostly public datatype)

1 Like

Correct, OP says:

Iā€™m encountering an issue with user profile sharing in my Bubble app. User profiles are saved as slugs, and while sharing works correctly on desktop, the slug isnā€™t included in the URL when sharing via mobile. This leads users to an incomplete URL on mobile devices. Additionally, text placed on the index page is visible on desktop but not on mobile. There are no conditional settings affecting this, and Iā€™m familiar with responsive settings, but nothing seems to explain these issues. Any help would be appreciated. Thanks.

@mediaclips12 I recommend starting a new topic just so it doesnā€™t side track this one :blush: