Prompt a popup when a webhook creates a new DB record?

Hey bubblers,

So, I’ve connected CallRail to my bubble app through Zapier (which was pretty awesome to figure out!!!)

When a CallRail number is called, a record is created in CallBoss (my bubble app) with the incoming caller number and Campaign Name.

When a new record is created, a need to be able to create a pop up on a specific screen (http://briggsmechanical.getcallboss.com/startcall) that asks the user if they want to “accept” this incoming call. If they do, that user would be assigned the call, and the regular workflow would start.

Is it possible to do this with a custom event by any chance?

If yes, any direction on where to start on this?

This was my first attempt, didn’t work.

My goal was to make a popup would come up every time

  1. A new record was created in the past 10 seconds
  2. That had a “Type of Call” equal to CallRail (the webhook is set up so this is created when a call is made)

Any thoughts on why this didn’t work?

It’d be a lot easier to help debug if we had access to at least view the other parts of the software. Without knowing how your data is structured, how the interactions look, or even if the Webhook is firing successfully, it’s going to be pretty dang hard to get to the bottom of it, unfortunately.

Any chance you can share the editor link so others can poke their heads in there?

@potentialthings Good point :slight_smile:

Here’s the specific page: http://briggsmechanical.getcallboss.com/startcall

Here’s the workflow page: https://bubble.io/page?type=page&name=startcall&id=callbossbriggs&tab=tabs-2

I changed the sharing settings, so you should be able to see it.

The webhook is working. I’ve tested it and records are being added to the DB when I made calls.

Thanks for the help!

Chris

You should include login details of a test user. Otherwise, it would be hard for someone to quickly start debugging.

Have you looked at “Trigger Custom Event When Data Changes” ?

So the page would watch for a change to the User, maybe an “Incoming Call” field that your webhook updates.

1 Like

@Scott thanks and good point for about this, I’m still a newbie.

I think you meant test user for someone to log into the app. I created this one that someone can use.

U: test@gmail.com
P: test

Here’s the URL for the page: http://briggsmechanical.getcallboss.com/startcall

Here’s the editor link: https://bubble.io/page?type=page&name=startcall&id=callbossbriggs&tab=tabs-2

@NigelG I haven’t tried this, I’ll work on it today. Thank you.

1 Like

@NigelG I tried the “trigger custom event when data changes” and have not got it to work.

Here’s what I did.

When an incoming call comes in, it creates a new call and one of the variables it set is to change “CallRail” to “yes”

Then I have a workflow that is looking for changes to calls every 5 seconds. Becuase a call could come in at any time, I need it to be constantly looking at the database. (There might be better way to do this?)

If the CallRail field has been changed on the most recent record, it will trigger the custom event.

The custom event is just showing a pop up on the screen.

Any ideas on what I missed? Or is there just a different way to do this?

@gf_wolfer any thoughts?

@Scott @potentialthings any ideas or recommendations? Thanks in advance for the help!

Hey guys,

Just an abstract idea for this spent some time fiddling.

So basically you would always have a repeating group somewhere (could be invisible), whenever there is data in it you would trigger something. This consumes less workflows IMO and should be quite performant. Some bugs when we stack up too many unread ones, this can be fixed with some fiddling.

Any feedback well appreciate.

Editor:

@gurun Thanks for this.

I just went into the workflows of the editor and couldn’t follow it very easily.

Could you describe to me how this works in plain language?

Also, would this work if records were being added to the db automatically by a zapier webhook?

I just verified that the zapier webhook is working.

It’s firing here

and you can see the data coming into the db

I tried a new configuration of the “trigger custom event when data changes”, but still no luck.

Hey, I made the scope a little larger to account for not only popups but a notification panel etc.

So basically I have a datatype which is the datatype that I want to listen for changes to (the one you are changing from zapier), the push-trigger repeating group is the trigger here, it listens to your datatype and only displays a single item at once, then a workflow listens for changes to that repeating group, on new item appearing it triggers the popup and thereafter marks it as read so it disappears from the repeatinggroup.

@gurun Thanks. It sounds like this could work, it will just require some studying on my part.

The kicker is that I need the user to be able to click on the pop-up and add that information to another data type.

So if I had two data types

  1. Incoming calls (this is the one I want to drive the popups)
  2. Accepted calls

The pop up would be for incoming calls. If I user clicks on “accept”, the details of that call (phone number, campaign name, etc) would be added to a call associated with that user.

Easy peasy :slight_smile: Just create a workflow that runs when you press the accept button, the action then creates a new Accepted call.

Easy once you know what you’re doing! I can barely understand (yet) your workflows on the pushwatcher! Just need to study it a little while longer. Thanks for the help. I’ll try to figure it out and let you know.

I think the way to do it would be to use the built in function to “watch” a field on a particular thing for changes, rather than poll for changes constantly.

Not sure it will work with new rows being added, but the function was originally intended to be for “notifications” such as this.

@NigelG Thanks. Do you know what the name of the “watch” function is so I can look up how to configure it?

Just use a do when.

The only thing I`m unsure of (and the reason to why I did not do this directly) is if it keeps polling or using resources when using “search for”, and due to wanting to maybe mark messages as read, being able to handle multiple queued messages etc.

Ok, I’ll work on this today and let you know if I can have any questions. Thanks for the help.

If I’m adjusting “calls” instead of users, I’m guessing that’s what I would use with the “when” function?