Skip to main content

I am using Powershell to generate a create a new item to a Existing sheet. The code I have generated that is being submittted, is generating the following error.


StatusCode : 200

StatusDescription : OK

Content : {“errors”:{“message”:“Variable brand of type String! was provided invalid

value”,“locations”:{“line”:1,“column”:10}],“value”:null,“problems”:{“path”:,“explanation”:“Expected value to not be null”…

RawContent : HTTP/1.1 200 OK


the code is as follows. (I have redacted some to protect the Innocent 😃 )

{

" variables": {

“cols”: {

“prelim_die_lines_actual”: {

“date”: “2019-11-27”

},

“person”: “J J L”,

“date5”: {

“date”: “2019-11-22”

},

“date60”: {

“date”: “2020-01-12”

},

“products_actual”: {

“date”: “2019-10-10”

},

“date2”: {

“date”: “2019-11-22”

},

“job__”: “63344”,

“pog_approva_actual”: {

“date”: “2019-11-07”

},

“date8”: {

“date”: “2019-12-30”

},

“date52”: {

“date”: “2019-12-19”

},

“pog_submission_actual”: {

“date”: “2019-11-05”

},

“date1”: {

“date”: “2019-11-22”

},

“set_date”: {

“date”: “2020-04-16”

},

“date35”: {

“date”: “2020-03-16”

},

“date67”: {

“date”: “2019-12-09”

},

“date51”: {

“date”: “2019-11-22”

},

“brief_actual”: {

“date”: “2019-10-10”

},

“date17”: {

“date”: “2020-01-31”

},

“cost_letter_actual”: {

“date”: “2019-11-28”

},

“pp_submittal_actual”: {

“date”: “2019-11-27”

},

“date6”: {

“date”: “2019-12-02”

},

“date4”: {

“date”: “2019-12-15”

},

“date42”: {

“date”: “2020-02-06”

}

},

“brand”: "U D "

},

“query”: “mutation($brand:String!,$cols:JSON!){create_item (board_id:298028165,item_name:$brand,column_values: $cols){id}}”

}

No one has any idea?


Hey Steve , Powershell is overriding your $brand variable. you need to cancel out the $dollar sign so that powershell doesnt interpret it as a variable and instead passes it to the Graph engine for evaluation . Try `$brand in your query