Issue with create item with dropdown values

Hey all, I’m using the API connector to call multiple items to a board on my Monday account. The text values are loading but not the dropdown items, telephone number, nor the file uploader. Here’s my POST call:

{
“query”: “mutation { create_item ( board_id: 5805558084, item_name: “<Current_User's_first_name> <Current_User's_last_name(s)>”, column_values: “{ "texto7":"<Current_User's_address>", "ciudad":"<Current_User's_city's_Display>", "dropdown2":"In the afternoon", "tipo_de_problema52":"Community", "long_text":"<DescribeIncidences's_value>", "Documentos":"<LinkUploadFiles's_value>", "texto8": null, "tel_fono": null}”) { id, name, column_values { id, value } } }”
}

In bold is the dropdown item that I’ve been playing around with for hours and no luck. I’ve tried dozens of different ways, like putting in the status/label IDs (1: Madrid, 2: Barcelona, 5: Not listed, 19: Valencia), overriding them and more.

As for the other dropdown options, I temporarily chose an option just so it would run (like “in the afternoon”). I’m also unsure how to add the telephone number (the format in both Bubble and Monday is country flag, country calling code then phone number). The file uploader column doesn’t work either.

Anyone able to help?

What programming language are you working in?

There is a field on create_item called create_labels_if_missing which you need to set to true if the label doesn’t yet exist in the column. See the documentation.

Trying to build a full query as just a string is painful and fraught with pitfalls. If you’re working with a language like Javascript its much better to use GraphQL variables, build values with code, and then stringify the request at the end. The graphql query is actually a string, not a data structure - this throws people for a loop when they come from REST APIs. You put variable placeholders in the string, then the request is an object where the query is a string value, along with a variables object containing all of the values you use within the query.

2 Likes

Thanks for the reply! I am using GraphQL. I ended up finding a workaround by changing the column and telephone fields to text instead of dropdown and the telephone format. The only thing I’m still struggling with is the file uploader column. Anyone able to help with uploading files?

Hello there @mpdx,

You can find the documentation for it here, and a Postman example here :grin:

You will need to upload the file in a different HTTP request.

I hope that helps!!!

Cheers,
Matias

1 Like

Thank you so much! I finally got it work in Postman following the example. Unfortunately, I can’t say the same for the API connector in bubble. The item ID and image values need to be replaced with dynamic data and my expressions aren’t working. Anyone with experience in this?

1 Like

Hello there @mpdx,

I am glad that worked for you in Postman!

I do not have experience with bubble. Let’s hope someone here has done this before and can help :crossed_fingers:

Cheers,
Matias

1 Like