Skip to main content

API : get Items Owner

  • June 13, 2022
  • 8 replies
  • 1454 views

Hi.
I’m looking for a query that can return me among the other fields of an item also the owner, the person to whom the task was assigned. Can you help me?

8 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • June 14, 2022

Hello there @Antonio.Cirelli.ext and welcome to the community!

I hope you like it here 💪

You should get the ID of the people column, and then get the column value for that column, from a specific item.

That will get you the list of users that are assigned in the people column.

Cheers,
Matias


Hi,
too bad that that field is the display name of the assignee. It would have been perfect if I could have found his email. But it is already a good result. Thank you.


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • June 16, 2022

Hello again @Antonio.Cirelli.ext!

In the value of the people column you can get the user ID. You can then use that user ID to get the user’s email address:

{
  users(ids:1234567890){
    email
  }
}

Hope this helps!

Cheers,
Matias


ok,
but how can i get the id from people column?


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • June 19, 2022

Hello @Antonio.Cirelli.ext!

Like this:

{
  boards(ids: 1234567890) {
    items(ids: 0987654321) {
      column_values(ids: "people_1") {
        value
      }
    }
  }
}

You will have to use your own board ID, item ID and column ID 🙂


Unfortunately I can not get any value for the column ‘people_1’.


column_values":

I would just have to access the owner’s email, people I suppose


maybe I found a way to get the id of the user and secondly,
by another query i can get the email

{
boards(ids: …) {
items(ids: …) {
column_values(ids: “people”) {

additional_info
}
}
}
}
in additional_info i’ve found the id of the user (let 111). In a second query:

query {
users (ids: [111]) {

email

}
}

I was wondering if there was a more efficient way to get this info, avoiding the two queries


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • June 23, 2022

Hello again,

Matias here!

people_1 was the ID of my column, you have to use your own and I believe you realized that and used “people” which I am guessing is the ID of your people column 🙂

You should find the user ID in the “value” of that column value.

You can not retrieve the email address with one call. You have to use two calls.

Cheers,
Matias