Status update in column

Hi Team,

I’m new to monday.com so need your help on the below,

I’m trying to find the server status through node.js and update the status in monday.com , could see result column updated but when i checked on monday.com board no changes.


image

could someone help me on this please,

Thanks,
Duken.

Hello there @duken1 and welcome to the community!

I hope you like it here :muscle:

Why are you passing the value for your text column for IP addresses like that?

You can send a simple string:

\"text\" : \"Your IP address here\"

What response are you getting from our server when you send that mutation?

Also, what happens if you use your Playground to do this? To do this:

  1. Click on your profile picture or initials
  2. Click on “Developers”
  3. Click on “Developer”
  4. Click on “API Playground”

Looking forward to hearing from you!

Cheers,
Matias

Hi @Matias.Monday ,

I appreciate your time and helping me, but Now my code didn’t worked out please if you got some time help me on the script correction,

error snip;-
image

script

script link -serverstatus.js - Google Drive

Thanks,
Duken.

Hello again @duken1,

In this case “text” would be the ID of the column, so you don’t need ipColumnId and text. You can just use a query like this one:

mutation {
  change_multiple_column_values(item_id: 1234567890, board_id: 1122334455, column_values: "{\"text\":\"My IP address\", \"status\": {\"label\" : \"Done\"}}") {
    id
  }
}

Here is this mutation being used in my Playground:

For me to further help, Please try using a query like that one. And after you do, if it does not work, I would need to know:

  1. What exact response you are getting from our server when you send that mutation

  2. What happens if you use your Playground to do this? Can you please send a screenshot of the query and the response in your Playground? To do this:
    a. Click on your profile picture or initials
    b. Click on “Developers”
    c. Click on “Developer”
    d. Click on “API Playground”
    e. Write your query and click on the “Run” button that looks like a “Play” button.

With that information I will better understand the context here.

Cheers,
Matias

Hi @Matias.Monday ,

Thanks again for your help and prompt, I agree to you to update the status this query but in my case i need to get the output from the script whether server online or offline how to edit query in that way. Much appreciated if you could help me on it.

script link -serverstatus.js - Google Drive

Thanks,
Duken.

Hi @Matias.Monday and team,

Any update would be helpful , here is the error which Im receiving now. It would be great if you have a look at my script and correct me please.

SCRIPT- test 1.js - Google Drive

image

Thanks,
Duken.

Hello again,

I am not experienced with Ping, but it looks like your problem lies there (it is not related to monday).

Looking into the documentation, they use this like this:

  ping.sys.probe(host, function(isAlive){
        var msg = isAlive ? 'host ' + host + ' is alive' : 'host ' + host + ' is dead';
        console.log(msg);
    });

The differences I see between your script and the example given is that they use “function” instead of your “async”, and they use “var” instead of “const” for the message.

I don’t know if that could help solve the issue but I would give it a shot.

You can find more examples here, here and here.

I hope that helps!

Cheers,
Matias

Hi @Matias.Monday ,

I appreciate your time and helping me, but still im not sure whats wrong i tried the way you suggested this time i got result but not updated in column .

Thanks,
Duken.


Hello again,

I need you to please answer the following questions so I can help you with this:

  1. What exact response you are getting from our server when you send that mutation?

  2. What happens if you use your Playground to do this? Can you please send a screenshot of the query and the response in your Playground?

To do this:
a. Click on your profile picture or initials
b. Click on “Developers”
c. Click on “Developer”
d. Click on “API Playground”
e. Write your query and click on the “Run” button that looks like a “Play” button.

Hi @Matias.Monday ,

I appreciate your prompt response but have some rest and take time to respond i can wait for a day also.

Mutation 1: manual status value,

Mutation 2: get status output online or offline :-
o/p


script

Thanks,
Duken.

Hello again,

I see the first one is working well.

It looks like in the second one you are passing ${status} as if that was a string of a status you have and you probably do not have a status label called ${status}.

That is why you are getting an error. You are passing a string as if it was a variable and it is not because you are not defining that variable anywhere in the Playground.

But, as I can see from the first one, the mutation works well in monday. The status column was updated successfully.

Why are you using return monda.api(query)?

You can just use something like this:
monday.api(query).then(res => console.log(res)) and you should see the response from our server.