Show popup via API

Is it possible to show popup (with board element data) using API?

Hello @Vlad723 and welcome to the community!

I hope you like it here :muscle:

Could you please elaborate on this?

Which kind of app would this be? Which what features?

What would be the trigger for this and were would you like to show the popup?

Hello @Matias.Monday

It should be integration with cloud PBX.

When receive incoming call and if in Monday exists element with caller’s phone number - I need to show popup in Monday with caller’s data.

One call can be routed to several users (or group of users) consecutively. For example we have user1, user2 and user3 in Monday and in the PBX. PBX receive call and need redirect call to user1, but if user1 does not pick up the phone in 20 seconds then PBX have to redirect the call to the user2 and user3.

  1. receive call and contact in Monday exists - show popup to user1
  2. user1 didn’t pick up the phone in 20 seconds, call redirect to user2 and user3 - hide popup to user1 and show popup to user2 and user3
  3. user3 picked up - hide popup to user2, but do nothing for user3

So I need 2 api methods - show popup for specific users and hide popup for specific users

Hello @Vlad723!

There is no way of doing that using the API.

You could try to build a workaround using a URL to show in a board view, dashboard widget or item view. In that URL you could embed anything you want.

But the users would only see it if they have that view open in that moment, so I am not sure it satisfies the needs you mention.

Hello @Vlad723! Welcome to the community!

The API may not be the way to best way to get a popup, but here are a number of other ways to achieve this:

From what you’ve mentioned, it could be helpful to consider creating a Board View (see Board View docs here: Introduction to monday apps)

Within this view, you could create an application that opens a new modal window as an iFrame when a call comes in, using the Monday SDK (see SDK here: GitHub - mondaycom/monday-sdk-js: Node.js and JavaScript SDK for developing over the platform)

The action would look like this:

monday.execute('openAppFeatureModal', { urlPath, urlParams, height, width }).then((res) => {
   {"close": true}
   // The above is a callback to see if a user closed the modal from the inside. This is useful should you want to run some logic within the app window. 

In order for this modal to open, the user would have to be in the board view at the time the call comes in. A way to ensure this would be for the user to make this view the “default view” on their board.

Alternatively, creating your own Chrome Extension (using the Chrome Extension notifications API) could meet your needs by sending users a browser notification when a call comes in.

Let us know if this makes sense with what you’re trying to achieve.


1 Like