Bring current GPS location into monday

There was recently a thread about bringing GSP location data into monday. It was intriguing to me. So, I took a stab at it. I was able to get it to work. For anyone interested in pursuing this, here is what I did. (I am NOT a web coder!)

  1. Created an Integromat webhook
  2. Cobbled this together:
<html>
<body>
<script>
window.onload = function() {getLocation();};

function getLocation() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition);} 
}

function showPosition(position) {
const Http = new XMLHttpRequest();
const url='https://hook.integromat.com/987435498374598734rgkjhdffgkjdfoie4';
Http.open("POST", url);
Http.send("Lat:" + position.coords.latitude + "+Lon:" + position.coords.longitude);
Http.onreadystatechange = (e) => {console.log(Http.responseText)}}
</script>
</body>
</html>

To further the idea I would put a link to this ā€œwebsiteā€ in the URL of a monday board column (passing needed parameters to identify the user,item, etc.)
Those parameters would also need to be passed to the webhook.
From there, itā€™s pretty simple. All the user would have to do is click the link in the monday board on their phone.

Jim - The Monday Man

8 Likes

Hey @JCorrell :wave:

Thatā€™s pretty awesome! Thanks so much for sharing a solution users could apply to their workflow right away. I appreciate the ā€œopen-sourceā€ spirit here :slight_smile:

Thanks for taking a stab at this workflow and sharing the results with us, Iā€™m sure other community members will find it helpful!

-Alex

1 Like

Hey JCorrell,
I am new to Monday and everything. I am somewhat lost and would appreciate some assistance on how to setup the webhook on integromat, so that I can add a location a column based on the gps position from the phone.

I already struggle setting up the webhook.

And then I was wondering, could I use that to enter the location in monday through a form where people click a button or something to trigger that script?

Thanks for any help.

@Johannes

The critical piece is the web portionā€¦ And, the main reason I didnā€™t create an app to do this.

If you have that part, I can definitely help with the webhook. As far as using a form, thatā€™s a good question. There are many form tools out there. Doing a quick search with the google, it looks like 123formbuilder might be able to do that.

Jim - The Monday Man (YouTube Channel)
Watch Our Latest Video: Column Total in monday.com Formulas? YES!!!
Check out our monday apps, now in beta: The Monday Man Apps

Hi @JCorrell how are you.
Actually there is no app or method to do this with no-coding?

@hlopezvc

I have not heard of an app that does this yet.

The most ā€œcomplicatedā€ part of this is the HTML I posted. Technically, it could be modified to call the monday API directly. But I would not recommend that for security reasons. I do like the idea of incorporating it into a form if that fits your workflow.

The actual connection to monday is very simple. Depending on what you call no-code, if you use Integromat/Make there would be no coding.

Jim

1 Like

I didnā€™t clearly understand your solution. How do you use ā€˜integromatā€™? Also it seems like ā€˜integromatā€™ became ā€˜makeā€™.

I want to get the current location of the current monday.com user. The code is pretty simple as given below. There is a function and Iā€™m calling the function

 getLocation() {
    console.log("get geo-location data");
    if (navigator.geolocation) {
      navigator.geolocation.getCurrentPosition((p) => {
        const lat = p.coords.latitude;
        const lon = p.coords.longitude;
        console.log(lat, ",", lon);
      }, (e) => {
        console.log("error in getting location data: ", e);
      });
    } else {
      console.warn("Geolocation is not supported by this browser!");
    }
  }

Here it says

error in getting location data: GeolocationPositionError {code: 1, message: ā€˜Geolocation has been disabled in this document by permissions policy.ā€™}

So it seems like monday.com itself did not give permission.

I also think using a third party thing (another server like integromat) wonā€™t help because the code must be executed in the client-side to get the location of client-side.

I kind a lost my hope about getting geo-location data from monday.com app