Getting item mapping info in a custom trigger

Hello,

I am trying to get some input from the user in a custom trigger using dynamic mapping.

In order to do that I have created a recipe consisting in:
Custom trigger:


Custom action:

This gives me the following recipe:

Once I click in external entity, then I get the necessary options from the field Definitions URL I defined in custom type field.

But once I have finished setting the mapping and attempt to add to board, I get an error and I am unable to complete the integration:

For reference, I have another analogue recipe with the only difference that instead of dynamic mapping is using a Custom field (type list)

In here, if I click in add board everything works fine and I get this request to my endpoint with the information about the selected option:

{
  "payload": {
    "webhookUrl": "https://automations-euc1.monday.com/apps-events/5732918",
    "subscriptionId": 5732918,
    "blockMetadata": {
      "shouldCalculateDynamicMapping": false
    },
    "inboundFieldValues": {
      "testList": {
        "title": "foo",
        "value": "bar",
        "invalid": false
      },
      "boardId": 1196005718
    },
    "inputFields": {
      "testList": {
        "title": "foo",
        "value": "bar",
        "invalid": false
      },
      "boardId": 1196005718
    },
    "recipeId": 30127110,
    "integrationId": 65625654
  }
}

Why can’t I achieve the same with the item mapping?

1 Like

Is your trigger’s Subscribe URL getting a request and returning a 200 status?

In custom triggers, when you click “Add to Board”, monday will send a POST request to your Subscribe URL endpoint. If it receives a malformed response or a status code other than 200, the user will see an error message in the UI.

Basically if monday can’t successfully subscribe to the trigger, it will not allow the user to add the recipe.

For what I see we are not even getting the request in our subscription URL endpoint.

We do get it when I am trying the recipe that doesn’t have a Custom field (dynamic mapping) but a Custom field (type list) instead.

From what I can see in the browser, there is a 500 in this request, that I assume prevents you from sending the request to the subscription URL:

PUT https://onoff-telecom.monday.com/automations-ms/automations/65635340

There must be something that is missing from our entity or some wrong formatting of the mapping or something, but I really can’t put my finger on it.

We would be very helpful of any help

1 Like

In the browser you’ll see a 500 error if there’s any issue with subscribing to the endpoint. The request to your side isn’t directly coming from the browser – it’s made from a monday server, and the result is passed to your browser.

You said that the request isn’t even hitting your endpoint. In that case, I recommend checking the following things:

  • Is the correct subscribe URL listed in your block’s config?
  • Are you adding the correct version of your app to the board?

The second question is important – often times people will add “My integration - v1.0.0” but be making changes to “My integration – v1.1.0”.

You can learn more about how we handle versioning here: Versioning

  • Is the correct subscribe URL listed in your block’s config?

Yes

  • Are you adding the correct version of your app to the board?

Yes

I am trying an entirely different approach now, so I may be able to do what I want in a different way. But still I am unable to get in my system information about the selected option by the user for an Item Mapping.

Understood! Do you need any further guidance?