Exporting items

Hi!!!

Is there a way (using API for example) to export all the items from one board into a processable format (csv, excel, txt etc …)? Actually we have an integration process that use GraphQL queries to get all the items and generate the report but we have a lot of problems with the rate limitations.

Any suggestion, alternative approach is welcome!!!

Thanks in advance!!!

Hey @jsanchezcs :wave:

Thanks for getting in touch with us! Just to make sure we’re on the same page here, would you be able to clarify the exact queries you are using thus far? I’d love to see if we can re-adjust the API call itself to help with the complexity rate.

In general, you can also use a feature that would export your entire board as an .XLS file directly within the platform :slight_smile: You can find more info on this feature below:

Excel Import and Export

I hope this is helpful in the meantime :slight_smile:

-Alex

Hi @AlexSavchuk !!!

The process is as follows:

First, given a board, I retrieve it and collect the items with this query:

{
  boards(ids: ID_OF_BOARD) {
    id
    name
    groups {
      id
      title
    }
    columns {
      id
      title
    }
    items(limit: 50000) {
      id
      name
      column_values {
        id
        title
        value
        text
      }
    }
  }

}

As you can see, now we are limiting the query ( we have to give it a twist). Then, for each item, we retrieve the subitems ids and, for each subitem id, we recover the subitem with this query:

{
  items(ids: SUB_ITEM_ID) {
    id
    name
    column_values {
      id
      value
      text
    }
    board {
      id
    }
  }
}

Any suggestion to improve this process?

Thanks!!!

@jsanchezcs

Thank you for following up here!

I would definitely recommend considering the following adjustments:

  • Set the items limit to 10,000, if not lower. At the time, any monday.com board can not have above 10,000 items, so setting the limit to 50,000 doesn’t seem like the best practice;
  • Since you are getting the Item’s column values, you could probably avoid querying the columns separately, as you’d get the ID and Title of the column in the column values section either way;
  • You can also reduce complexity further by using specific Group IDs, instead of querying all of the groups within a board. Otherwise, this will cost a 1000 nested complexity by default, which can make the query quite expensive.

Does that make sense? I hope the above is helpful!

-Alex

Thanks for your suggestions @AlexSavchuk !!!