I am trying to pull email from GMail (Business) and create an item on a board with the contents of each message. To begin on this I’m just trying to create a new item on a board with test data in multiple columns. I found a previous message (now closed) that started to address this but the ending solution was not posted to the thread: Creating an item with columns populated
What I have now is the following:
mutation {
create_item (
board_id: ,
group_id: “Incoming”,
item_name: “NEW API created item”,
column_values:
“{
"Description":"Hello world",
"email" :{"email":"test@test.com","text":"test@test.com"}
}”
) {
id
}
}
It completes and creates an item, but the Description column is not populated. The previous message indicates that one has to use the numeric ID of the column instead of the “friendly” name, but I don’t know how to get it.
What is the syntax for creating a new item and populating multiple fields, and how does one get the numeric ID for a column?
Good question! You’re right, you’ll need to use the column ID to assign “hello world” to the description column. Other than that, your syntax looks great so far.
We’re working on a way to make getting the column IDs easier, but for now I’d suggest using this query to get the title and ID of each column on a given board:
query {
boards(ids:xxxxx) {
columns {
id
title
}
}
}
“long_text” :{“text” :“This is where the message body was in the email. What happens to paragraphs?”},
“email” :{“email”:“What is this part?”,“text”:"sender@invitae.com"}
}"
) {
id
}
}