Forum Academy Marketplace Showcase Pricing Features

Internal page URL in 'Insert dynamic data'?

Hey, i want users to receive a Twilio text message and have a link in there that takes them to a specific page of the web app and more specifically, a popup!
all bubble seems to let you do is “website home URL”. How do i make this work?

Cheers
Jesse

Anybody? I would think this would be a reasonably basic thing for bubble to have.

Use Website Home URL:append to create any dynamic expression. You can use :append multiple times and even write free text.

As for the popup, then you’ll just need to include a query parameter in the URL and trigger the popup based on that (unless you can just trigger it on the standard URL path).

Thanks you. I’m still not sure i understand though. take a look at where i’m at. I don’t see any option for specific pages but maybe that’s not yet.

How would i make it so a user follows the link and gets taken not only to the website, but logs in as that user and takes them straight to the popup on the particular page.

No, you’ll need to just type the page URL as free text. You won’t see a dropdown functionality for specific pages like you do when using a link element.

Okay cool so the main issue you’ll have is that while you can generate a magic link which automatically logs them in, it’s only valid for an hour so if they don’t click on it within an hour of you sending them the SMS, they’ll still need to login.

You can find out more about magic links here; [New Feature] Magic login link workflow action and will likely need to just create the link and not send the email so you can send your own custom SMS.

If this is fine for you, then you’ll be able to choose the page from the magic link workflow action. Then you’ll add your SMS action right after, include the magic link and append it with something like &popup=true to trigger the popup on that page.

1 Like

Ok, i have done what you have said and when it sends a text with the link and I follow the link it says “This link is expired or has been already been used. Please request another.”

Also, it’s sending me non-stop messages. I must be doing something wrong in the workflow. I just sent myself $5 worth of Twillio messages in an instant (~100 messages) before i deleted the phone number from the backend to stop it.

Looking at your workflow, I don’t understand why you have step 3 at all. You’re literally looping it, which is why you’re receiving so many text messages. Remove step 3 and you’ll find it only sends once and that will solve your other issue below.

The reason this is happening is because each time you generate a new token, it invalidates the previous one. Your looping workflow keeps invalidating the token that it just created.

Yeah i’m not too sure what i’m doing. I should mention that users are selecting what days of week and time of day they want the messages to run on (e.g. everyday at 3pm) so i’m trying to figure out how to make that work on the back end. I think i put that thing in there to try make it run on the chosen days/time.

Here is a workflow from a page where the users selects the days/time (step 3 and 4 are shown):

Screen Shot 2021-11-15 at 3.46.12 pm

Also here’s what the database for the user’s messaging schedule looks like.
Screen Shot 2021-11-15 at 3.37.55 pm
You should now see everything going on here.

p.s. thank for your help so far.

Shouldn’t the link on the most recent text message work still then? Because it doesn’t.

Ooooh, this is an interesting one. I’d probably need to have a proper think about the best way to set this up. I wonder if there’s someone else who’s posted on the forum that achieved similar functionality, even as an email reminder. The closest I’ve personally got to something like this is a workflow that’s triggered every two hours between 8am and 10pm. It might be that you have a workflow that runs daily and picks up all the reminders that need to be sent on that specific day and schedules them at the right time.

I understand the days of the week and the time of day, what is the indexList used for? Also do you need to take into account time zones or is everyone in the same timezone?

In theory, yes it should. However I’d imagine that because you stopped the messages by deleting your number from the database, the workflow that ran right after you did that, created a new token (invalidating the one in your last message) and then tried to send the SMS but failed because there was no number to send to.

If you stopped the workflow by going into Logs > Scheduler (which could have actually been quite difficult with a workflow that iterates as quickly as yours) then the link in the last SMS would work.

Not sure I can remember what indexList was (had another bubbler work on that for me).
Yeah users will be from different time zones.

If your could help me crack this problem that would be great because this is the last issue remaining before i can launch my app to users and i’ve been stuck on this for weeks. So cheers.

Jesse

Hey all,

This could be the problem: passing in a deleted value.

Okay you’re going to need to get across things like this, otherwise they’ll come back to bite you later when something is broken or you need to improve it. It seems that the indexList is really just a representation of the days of the week as their index from Mon-Sun. Not sure what it’s for but doesn’t seem necessary for the actual scheduling of reminders - might be used for something else on your front end though.

Okay so this is going to add some complexity then, you’ll need to pick a default timezone (I suggest UTC) for your dates and times that you store against this reminder record. You will then need to convert it to their timezone (which will need to be stored too) when rendering it within the app.


Basically a solution is to set up an API workflow that runs at midnight every day, the first action is ‘Schedule an API Workflow on a list’ and your list is a search for all reminders where the day of the week is today, the API workflow is your send_message one and schedule them for the time from your ‘time of day’.

You will need to use some :formatted as, :extract and :change functions (just like you are already) to get the desired effect but in theory it should work quite nicely.

What we’re basically doing is telling it to fetch all the reminders that it needs to send that day and schedule them for the right times.

I’m still so lost on this. I’m trying to start from scratch with OneSignal web push notifications but now i’m wondering if Firebase is better. Any thoughts on this?

I now just want the user to select days of the week, then a time of day and then press ‘done’ which will save those two things to the database and also setup a API workflow through OneSignal to send a notification according to the selected days / times.
How do i make it trigger the notification on certain days.
Screen Shot 2021-11-21 at 3.38.28 pm

Then there’s still the matter of figuring out how to append a link to take the user to a specific popup on a specific page.
Then theres the matter of figuring out how to get a time selector that doesn’t have a date selector on it.

I will send you money if you can help me solve this.

Hey @jessefarquhar48 take a look at the below and let me know how you get on. Funnily enough the indexes were actually super necessary for sending reminders.

First up we’re going to create an API workflow (backend workflow) that sends the reminder.

It will have one action which is to send the notification, whether this is via SMS or OneSignal (or could be both). In my instance here, I’ve just got it sending an email.
image

Next up we’re going to create another API workflow (backend workflow) that schedules this ‘send_reminder’ workflow for the right time of day.

It has one action which is to schedule that API workflow ‘send_reminder’. What we’re doing here is taking the current date/time and changing the hours and seconds so that they are the hours and seconds stored against the reminder in the database.
image
image

Next up we’re going to create a final ‘daily_reminder_check’ API workflow (backend workflow) which runs at midnight every day and picks up all the reminders that are due to be sent today.

It has two actions, one to tell the ‘schedule_reminder’ workflow which reminders it needs to schedule, and second action to run this daily_reminder_check at midnight the next day.

You can see that we’re using the “Indexes of the week” field here, and what we’re doing is looking for all reminders where the day is the current day. the :extract day modifier actually returns the index in the same way that you have them stored in the db, which is perfect.

image

The last piece of the puzzle is to kick this off in the first place, for that, we’ll just create a button on some random admin page (not the dashboard) you have and it will have one action. We will only ever click this once, never needs to be clicked again.

image
image

Finally, to show that this actually works, here’s my database.

And here’s the scheduled workflows, the first one to send the reminder for today and the second to run the daily_reminder_check at 12am tomorrow.

The only caveat to this is it doesn’t handle different timezones, but this foundational structure outlined above can be modified slightly to support it.


As for the redirecting to the specific page and showing popup, this is also straightforward. Back in our earlier send_reminder workflow, we’re going to add an extra action at the start, the magic link.
image

You can then include the link in your email/SMS/push notification. What we have here though is a specific ‘reminder_redirect’ page (you’ll need to create this) which has one workflow that fires on page load.

It redirects to whatever page you want to take the user to (in this case, the index) and adds a reminder=true parameter. Now you can add a workflow on the page that you’re trying to send the user to (in this case index) to show the popup like below.

1 Like

@jessefarquhar48

To get this started on the page or popup you use to show the days and times selector, you should institute a Recurring Event.

Recurring Events are perfect for things that need to happen on the same scheduled time/day because those things are recurring in nature.

Because they require you to schedule them when triggering them originally you can not worry about the users timezone as the default should be the current users timezone. You can setup a single recurring event in the backend workflow that is triggered from the page multiple times based on conditions being met related to the users choice of days of the week.

1 Like

Hey @boston85719 only caveat to this is that you need the Professional Plan if you want to schedule them daily right? Not actually sure what plan @jessefarquhar48 is on but agreed that this would be a simpler route to handle the recurring nature.

1 Like

I do have a professional plan : ).

I am just starting to read through all that you have sent so i’ll get back to you on how i go in an hour or two.

I’m already lost at your first step because you used email but i’m using one signal which will require different steps.

Another problem i’m having with your instructions is that i cannot tell which workflows you are doing on ‘backend workflows’ and which you are making on another page e.g. the page of the app where the days of week and time are selected.

Thanks for your help though. i’ll try get through it in the mean time.

Update: i have replicated everything you have made but It’s still not sending notifications.

Here i will show you everything:

Firstly, the main page users use is the ‘dashboard’ page. here is the workflow i have made for when the users presses the ‘done’ button on the time/ day of week selector popup.


Now here is the backend workflows:

here is the DB:

here is admin page:

oh and back on the dashboard page:

OneSignal plugin:

OneSignal website:


You should now have seen everything relevant to this issue. Is there something i’m doing wrong on the OneSignal end of of things? why does one signal, on its website (on my account), show/talk about notifications as ‘subscribe notifications’ this has nothing to do with subscription.

I suspect that everything we’ve made should work but that one signal is wrong.