Forum Academy Marketplace Showcase Pricing Features

Notifications clicked will take you to location it was triggered from

I’ll try this again, but it seems like posting on the forum is like shouting into an empty room. How do I get attention? Do you hate me? haha.

I’ve watched several Bubble tutorial videos now on setting up notifications, and it is working well. The one major part of that is getting it so when someone clicks on a notification it takes you to the location of what triggered the notification. In the videos they all hint at it can be done, but none of them actually show how.

I have notifications coming from multiple sources. Sometimes it’s a comment on a social feed, and sometimes it’s a system notification where I want to direct them to their account page. I was thinking of adding a “Link” field to my Notification Data Type where I could add a link, but I’m not sure if that’s the best way, or even how I would get a link to a page, or a page+repeating group+actual post.

Can anyone offer any insight on what I need to do to get this to work?

Thank you in advance.

I would use conditional workflow actions to control where the user goes to when clicking on the notification, depending on the notification type.

For example, have an option set of notification types (e.g. comment, system notification, like, share, friend-request etc. depending on your app), with a field on the datatype Notifications of Notification Type. Then just run conditional actions in the workflow to navigate to specific pages depending on the notification’ type.

For example, if the Notification Type is ‘System’ run a Go To Page action to send them to their account page. It it’s ‘Comment’ send them to whatever page in your app they can view comments.

You can use URL parameters to specify particular items on the page or RG as needed.

Hello Adam, thank you for this reply and your past replies.

I already have an option set for Notification types, so the first part I should already be good.

I’ll have to look into how to run “conditional actions”, since I’ve not used those before.

So if I’m understanding, for the notification RG where it displays the notifications to the user I’ll add a workflow with a Conditional action. In that workflow it will somehow allow me to specify a page? I’ve not seen pages show up in workflows before. Would I need to figure out the URL for the page, and then add this somewhere in the conditional action? Would it make sense to create a attribute in the option set where I could put this URL?

I’m also not to sure on using URL parameters. Similiar question above where do you add these paramaters to the workflow?

Sorry, first time building an app in Bubble.

Your Workflow should look like this :
When current cells notification is clicked
Goto internal page _____ only when current cells notification type is _____
Goto internal page ____ only when current cells notification type is ____

I’ve done the exact thing last week. I think I can help you with this

Awesome! Thank you for the help. Let me take a stab at this, and let you know if I run unto any issues.

1 Like

Hello @maheshkasindi and @adamhholmes,
Again thank you for your help. I think I got the first part, but I’m still not sure how to go to a specific element. Below are some examples I’m trying to figure out.

NotificationType: Social Feed:
Go to page “Feed” > ? then I want it to scroll down the page to the RG, and then scroll to the actuall RG post.

Notification Type: Job Post:
Go to page “posted-positions-details” > how do you get it to load the correct page?
I’m having trouble figuring out how to get that info into the notification and pulling it out in the workflow when clicked. I imagine that information needs to be stored in in the Notification data.

Notification Type: Mentorship:
Go to page “mentorships” > then show popup >display data to show the correct mentorship. again, I’m not sure where I’m getting the information on the exact data. @adamhholmes you mentioned URL parameters, but what information are you adding to that?

  1. For the 1st one, you need to use “Scroll to”.
    This post has information about that
    Adding section anchors and links

  2. Yahh you need store Job post along with the notification and send it to the Job post page.

  3. You can do the same with Mentorship. If there are more than one Mentorships on that page and you want this exact mentorship to show up in popup, store mentors unique id with the notification. When notification mentorship is clicked, send that notifications mentorship unique id with “More parameters”. In the Mentorships page, do this Workflow

Page is loaded and Get data from URL MentorshipsUniqueID is not empty

… Show popup
… Display data in popup, do a search for popups unique id=get data from URL MentorshipsUniqueID: first item.

Thank you for your help. I’m working on the social feed, and it works unless the post is not loaded.

I only have the RG displaying the last 5 posts using a State load number. If the post is posted 6 it does not load, so the scroll to object(the post unique ID) does not work.

Looking at Facebook when you click a notification for a feed post it seems to just open up a page with 1 post. I wonder if that would make it easier.

Thoughts on how to make it work if I don’t create a whole new page?

This topic was automatically closed after 70 days. New replies are no longer allowed.