Forum Documentation Showcase Pricing Learn more

Trying to create a friending system with notifications, accepting,pending,and approving

Hi there! so im creating a social network prototype on bubble, and im trying to create a friending system, that involves pending, approving, and denying friend requests with a notification system, and a following system. if i get the friend part, i can transfer that and turn it into the following system.

In my data base, i have 2 types. one for users, and the other for posts. i have friends, and following, and followers as fields in posts, which now that i think about it, i should probably just create a new thing for this system.

here is the preview, as you will see you can friend users, but its one sided.

also on the main home feed, im trying to have it to were a user can only see their friends posts.

TLDR: does anyone have any tips or tricks for making this easier? thanks in advance!

hi devotic98,

how I would do this.

  1. As you correctly said, create a new datatype friend requests. In it have the field: Recipient (user) and accepted (yes/no) and withdrawn (yes/no).
  2. In the database underneath datatype users create a new field called list of friend requests (type list of friend requests) . this will allow every user to easily access their friends and friend requests at the same time.
  3. whenever you show a profile eg on user profile pages. Have a “follow” button that is not visible on page load and shown only if current user’s list of friend requests:filtered recipients (accepted= yes ) does not contain that groups user. Also make this button visible if the current user’s list of friend rquests: filtered recpiipients (accepted= no) contains that groups user. In this case change the text to: Request sent.
  4. If that button “follow” is clicked, create a new thing “friend request” with accepted being no, and recipient that group’s user. In the next action of that workflow: make changes to thing: that group’s user: add result of step 1 to that user’s list of friend requests. Also in step 3, add result of step 1 to current user’s list of friend requests. This ensures that both users can easily see which friend requests (and friends (those friend requests where accepted= yes) ) they have and change them as they wish.

    4b. For the unfollow button do exactly the opposite.
  5. Have a place where every user sees pending friend requests. This could be a repeating group: current user’s list of friend requests: filtered where accepted = no. In this repeating group have an accept button. If this is clicked, change that cell’s request to yes.

  6. Similarly you can create a repeating group where users can withdraw friend requests
  7. In the social network itself, to steer the posts, only show posts where the posts creator is in current users list of friend requests recipients where accepted = yes and withdrawn = no. This only shows the current user posts of those that befriended him.
  8. Whenever 4 and 5 are done, create a new datatype called notification and add it to the users list of notifications. This way users can be notified when a friend request is sent or accepted.

hope this helps, feel free to pm me if you want some more tips or steps explained.
happy bubbling,


For free tips & step by step lists on bubble & more check


Awsome! Ill try it out when i get to work. Ill keep you updated. If i need any further help ill for sure PM you. Ill probably need help with the liking system aswell

1 Like

so in the follow button condition, im having trouble setting it up. i currently have When: current user’s list of friend requests:filtered recipients
i cant seem to attach the rest of it to the condition. any thoughts?d

will current user’s list of friend requests:filtered recipients contains parents grop user work?

ah, yes, so the parent group of the follow button has to be type user for this to work and contain the user you want to friend.

1 Like

Create a new data type friend request. It has the following fields: recipient (user) and accepted (yes / no) and has been revoked (yes / no). Is this user or user list? Because I see that the picture in the tutorial in you shows that there is a user and a user list, which makes me wonder whether it is the innovative friend request (user) or friend request (user list) when the user requests

Hi grab.hau, sorry for whatever reason I only saw your comment now.

So I created a new data type friend request with the fields you mentioned.
This is a separate data type to “User”. “User” is a datatype that every bubble app starts with.
To connect the datatypes, after creating the new data type “friend request”. I then add a new field to “User” called “List of friend requests”, which I make type “friend request” and it is a “list of things.”
This is how in my conditions shown above I can use “Current User’s list of friend requests: filtereds’ recipient of request.” which in english means "Users friend requestsuser. This allows me to show only people who have accepted the friend request and reference their name in a cell.
Hope that clarifies it for you and other people people reading this thread.

Feel free to pm me, then I will be sent an email and should be able to respond.
best regards