API Boards Excel

Hello,

Im pulling monday.com board to excel with this but I am struggling to have the items grouped by a group name.

Can anyone help?

{“query”:"{ boards (ids: 00000000) { items { name column_values (ids: [“status”, “status_1”, “date”, “long_text”] ) { text } } }}"}

Hello @dominika!

Welcome to the community! I hope you like it here!

Just to be sure we are on the same page here, what you are saying is that you want to retrieve the data of a board using a query and then use that data to populate an Excel spreadsheet?

And when you say you want to have the “items grouped by a group name” do you mean you want to retrieve the items in batches where in each batch you retrieve all the items inside one specific group?

If you answer this, I will have a better understanding of the context so I can help you find the best solution possible.

Looking forward to hearing from you again!

Cheers,
-Matias

Thank you Matias!

Yes, I want them by grouped by group name or adjust the existing code to display one group only - both will work :slight_smile:

Hi @dominika !

For sure! Happy to help :smile:

You can retrieve the items in a specific group from a board using a query like this one:

{
  boards(ids: YOUR_BOARD_ID_HERE) {
    groups(ids: "topics") {
      items {
        name
        column_values(ids: ["status", "text"]) {
          text
        }
      }
    }
  }
}

You can check your groups’ IDs using a query like this one:

{
  boards(ids: YOUR_BOARD_ID_HERE) {
    groups {
      id
    }
  }
}

Please let me know if this works for you!

Cheers,
-Matias

Thank you so much but it didn’t work, I got body error. I am using API Connector and I used this:

{“query”:"
{
boards(ids: MYBOARDID) {
groups(ids: “Archive”) {
items {
name
column_values(ids: [“status”, “text”]) {
text
}
}
}
}
}

}

Hello again @dominika!

I just installed API Connect to try this out, and I found out that this configuration works:

My request body is:
{"query":"{boards(ids: MY_BOARD_ID_HERE) {groups {id}}}"}

And my spreadsheet is populated with the data
image

Please note that the method should be POST. In headers you should put “Authorization” in the key and your API Key in the value.

Please let me know if this works for you!

Cheers,
-Matias

Hi Matias,

Thanks for your patience. The above code only gives me account id and the same stuff you have in your screenshot but I want to pull all tasks from this specific group into the spreadsheet…

If you see the previous code had items, statuses etc…

Thank you so much for looking into this

Hello again!

No problem! I am here to help.

The code that I sent was just to retrieve your groups’ IDs.

You can replace that request body with this one and it should work:

{"query":"{boards(ids: YOUR_BOARD_ID_HERE) {groups(ids: \"YOUR_GROUP_ID_HERE\") {items {name column_values(ids: [\"YOUR_COLUMN_ID_HERE\", \"YOUR_OTHER_COLUMN_ID_HERE\"]) {text}}}}}"}

Of course you will have to change to your board ID, change the group ID to yours, and the columns’ IDs to yours as well.

Please note that we use the backlash symbol before each double quote when using strings, to escape the outer quotes.

Let me know how that works!

Cheers,
-Matias

1 Like

Hi again :slight_smile:

Unfortunately, this returns 1) mondaycom: Request failed: Invalid POST body data

Hello again!

That is quite odd. This works for me. I will contact you directly to arrange a Zoom call if that is OK.

Looking forward to talking to you!

-Matias

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.