Marketo Webhook to Monday.com

Choice Number: 3896
Pay Load: { “query”: “mutation ($boardId: Int!, $companyName: String!, $columnVals: JSON! ) {create_item (board_id: $boardId, item_name: $companyName, column_values: $columnVals) {id}}”, “variables”: {“boardId”:2364371628, “companyName”:““test23LastOne””, “columnVals”: “{“phone”:”“7169084086"”,“text”:““test23LastOne””, “text4”:““test23LastOne””, “long_text”:““test23LastOne””, “status4”:“Website Form”,“email”:{“text":""test23LastOne@test.com” “,“email”:""test23LastOne@test.com” “}}”} }
Url: https://api.monday.com/v2
Webhook Id: 10
Webhook Name: MarketoToMonday
Request Type: http_post
Step ID: 3630
Source: Marketo Flow Action
Response: {“errors”:[{“message”:“No query string was present”}],“account_id”:6562763}
Person ID: 3238884
Response Code: 200

Here is my code:

{
    "query": "mutation ($boardId: Int!, $companyName: String!, $columnVals: JSON! ) {create_item (board_id: $boardId, item_name: $companyName, column_values: $columnVals) {id}}",
    "variables": {"boardId":2364371628, "companyName":"{{company.Company Name}}", "columnVals": "{\"phone\":\"{{lead.Phone Number}}\",\"text\":\"{{lead.First Name}}\", \"text4\":\"{{lead.Last Name}}\", \"long_text\":\"{{company.Company Notes}}\", \"status4\":\"Website Form\",\"email\":{\"text\":\"{{lead.Email Address}} \",\"email\":\"{{lead.Email Address}} \"}}"}
}

Here is the Marketo Configuration:

I’m getting this error from Marketo saying the query string is not present but you can see that it is. I’ve tried this raw query in Postman and it works perfectly fine. Can someone please help investigate this?

hi @bhattibytes

If the query works in Postman (and API playground?) it must be Marketo that is formatting differently, probably the escape characters. Does Marketo show the exact (raw) post to the endpoint?

I don’t think it is the escape characters since the error is saying the query is not present. So it never even gets to the match fields. I can’t see the raw post to the endpoint and all I can change is the Request Token Encoding: JSON or Form/URL or None. I will also try writing into Marketo support as it works fine on Postman and the API playground.

I have seen many occasions where “query string not present” was thrown because of formatting issues. I wouldn’t rely on this error that there is really not a query string.

Here is the payload template inserted in the webhook on Marketo:

{
    "query": "mutation ($boardId: Int!, $group_id: String!, $item_name: String!, $columnVals: JSON! ) {create_item (board_id: $boardId, group_id: $group_id, item_name: $item_name, column_values: $columnVals) {id}}",
    "variables": {"boardId":2364371628, "group_id": "New Leads", "item_name":\"{{company.Company Name}}\", "columnVals": "{\"phone\":{{lead.Phone Number}},\"text\":\"{{lead.First Name}}\", \"text4\":\"{{lead.Last Name}}\", \"long_text\":\"{{company.Company Notes}}\", \"status4\":\"Website Form\",\"email\":{\"text\":\"{{lead.Email Address}}\",\"email\":\"{{lead.Email Address}}\"}}"}
}

Here is the raw query sent to Monday’s endpoint:

{ "query": "mutation ($boardId: Int!, $group_id: String!, $item_name: String!, $columnVals: JSON! ) {create_item (board_id: $boardId, group_id: $group_id, item_name: $item_name, column_values: $columnVals) {id}}", "variables": {"boardId":2364371628, "group_id": "New Leads", "item_name":"testAddGroupID", "columnVals": "{"phone":7169084086,"text":"testAddGroupID", "text4":"testAddGroupID", "long_text":"testAddGroupID", "status4":"Website Form","email":{"text":"testAddGroupID@test.com","email":"testAddGroupID@test.com"}}"} }

I set the request token encoding to NONE but it can also be set to JSON or Form/URL. What else if any do I need to escape or not escape. I also tried not escaping the phone number since it is expecting an INT not a String but also tried it both ways adding the escape quotes and not adding them. I also added the group_id and changed companyName to item_name.