Forum Academy Marketplace Showcase Pricing Features

How to remind user to accept Friend Request?

Hi bubble community,

I am doing a social network platform. I’d like to implement a feature in the email to accept or decline friend request if the action is left unattended for more than 3 days.

I know that this can be done with Recurring event.

How does it work if I want to send user an email to get them to accept or decline via email notifications if left unattended more than 3 days as an example?

This can be done by scheduling API workflows.
Create a custom backend workflow for sending a reminder email, and then when the user creates the Friend request, schedule that workflow for 3 days later.

If the user accepts or declines within those 3 days, have a workflow in the ‘accept’ and ‘decline’ functionalities to cancel that scheduled workflow.

More on scheduling backend/API workflows:
https://bubblegroup.gitbooks.io/bubble-manual/content/using-the-bubble-api/scheduled-workflows.html

Cheers,
Ranjit | Blur Apps

Thanks for the reply,

So you mean that the workflow should set recurring event even if a user accepts or declines within less than 3 days. However, this is not what I’d like to implement.

I’d like to have the workflow feature to be triggered only when a user doesn’t respond anything to the friend request.

It won’t be a recurring workflow but a scheduled workflow that works only once at a specified time. The same workflow will be scheduled individually for each friend request.

Essentially, we’d use the ‘Schedule API workflow’ action here. The API Workflow in question will be set up on the backend workflows and will send the reminder email.
image

The logic behind this is to create a schedule for sending the reminder email when the friend request is created and to cancel it when some action is taken on the request.

So effectively, the API workflow that we schedule only gets triggered when no action is taken on the request - because any action on the request will result in a cancellation of that scheduled reminder.

Setup backend workflow trigger when the friend request is sent. The backend workflow should be scheduled for 3 days from current date and time.

On the actual action to send an email in that backend workflow set a condition to detect if the friend request was accepted decline or if nothing done. This way the condition will determine if the email needs to be sent or not and you don’t need to worry about canceling a scheduled workflow or setting up other workflows when they accept or decline.