How to populate item column values from custom input trigger

Hi there :wave:,
I’m building an IoT App, and I’m using a custom input trigger. Each time that a device send data, we should create a new item (service requests).
My custom input trigger looks like this:


And works well (tested with postman, 200 received, :ok_hand:)
Subscribe / unsubscribe is OK.
I’m trying to create an new item based on the output fields of this custom trigger. And I failed…

First try: with the action "Create an Item"
I tried with a Item Column Values field, but I don’t know which format is required. I tried this:
image
I receive a 200, but nothing happens.
Action trigger looks like this:

Is there a doc somewhere to know the format of itemColumnValues?

Second try: with the action "Create an Item with mapping"
Looks really promising (at least the title), but then, I’m lost:

Same question: is there a doc somewhere or codes example?

Hi @jeromeskiply

Did you sign the request you send to the action part? It needs to be signed with your signing secret, something like this: (I store my signing secret in an envVars object)

//Build the post header and body
postHeader = { Authorization: envVars.signingSecret };
postBody = {
trigger: {
outputFields: {
boardId: event.boardId,
itemId: event.pulseId,
},
},
};

//Build the request
const actionRequest = {
url: subscriptionUrl,
headers: postHeader,
body: JSON.stringify(postBody),
};

//Post the request
request.post(actionRequest, function (error, response) {
if (error) throw new Error(error);
});

Hope that make sense.

Hi @basdebruin,
Yes I did, and I don’t have any auth trouble. I tested it with another action trigger (create item in group) and it works well.
What I need is the doc of the create item and create item with mapping action triggers.

Hi @jeromeskiply

Looks like I misunderstood your question. I did not had the need to create an item from the action part yet. I would guess itemValues needs to be formatted as a JSON and within it for each column a value as JSON?

Yes, probably, I will do some tests. But for the name (see my screenshot), it doesn’t work, and name is an important one.
It would be much easier with a doc :slight_smile:

To me documentation is the most important missing piece of all API, automations, triggers, apps etc. Certainly room for improvement here :slight_smile:

1 Like

@dipro @Ben @AlexSavchuk do you know if this documentation exists somewhere? How are you dealing with that internally?

I’m investigating the same thing and didn’t really succeed yet.
I stumbled upon this page, maybe it’ll lead you further than me :

1 Like

Thanks @lalondesteve, I think this is probably where the solution stands. I will let you know if I manage to succeed.

Solved! Thanks @lalondesteve I missed this page, and this was exactly what I needed.
If you need help for your implementation, please ask.
Cheers,

hi @jeromeskiply

I am curious how you used the dynamic field mapping. I intend to use it for two custom fields that are dependent (CF2 is depending on input form CF1) and have troubles configuring this. When I set CF2 to type “Dynamic mapping” it shows up up the recipe configuration with input field setting for “Source entity” and "Dependency. I got the Dependency dropdown filled, but still having trouble what I need to do to populate the Source Entity dropdown.

@basdebruin I’m using it exactly the way of “Part 2” in the doc.
I created a custom field with key smilioDevice. I’m using a server side definition for the mapping.
Each time that a device send a message, I’m including the custom field key, with the fields included in the mapping.
And this creates the new item with the mapped data.
If you want, I can show my screens, but basically this is very similar to the doc.
And it is very convenient, I love it.

1 Like

Hey @jeromeskiply, @basdebruin and @lalondesteve :wave:

Sorry I’m late to the help party here! I’m so excited to see our users help each other though, it’s literally breath-taking. :heart_eyes:

Thank you for creating the thread and fostering a healthy discussion I’m glad that @lalondesteve was able to point you in the right direction here. Moreover, I’m glad to hear you’re enjoying the way we’ve set this up so far @jeromeskiply :slight_smile:

To be transparent with you, I’ve discussed our docs in more detail with Dipro and we both came to the conclusion that it is crucial to make some improvements there. If it wouldn’t be asking for too much, we would really appreciate your input into the specifics of how things are laid out right now, and any adjustments and improvements you would suggest from your point of view as a user. If you could shoot me a PM on the forums here, I’d love to continue the discussion from there to make our documentation easier to digest and navigate.

-Alex

1 Like

Ok @AlexSavchuk let’s do this.

1 Like

hi @AlexSavchuk

In general the documentation can certainly use a good refresh. Over the last months I was able to use a lot of features after numerous efforts and in some case using browser dev tools to see what is going on.

For this specific one I do see example of inbound and outbound mapping, but no example how to create a dependency between two custom fields in an integration (monday <> monday) scenario.

Hi @basdebruin, can you please explain your question further? What do you mean by creating a dependency between fields in Monday<>Monday scenario?

Hi @edogr1

I my recipe I want to use 2 custom fields (list type / dropdown), let’s call them CF1 and CF2. CF1 got its list of possible values from a call to the configured endpoint (all good). Now for CF2 I created another endpoint and the list of options to provide depends on the selected option in CF1. This all is within the same monday account (no external apps involved). The documentation seems to be tailored on external apps.

When I set CF2 to type “Dynamic mapping” it shows up up the recipe configuration with input field setting for “Source entity” and "Dependency. I got the Dependency dropdown filled, but still having trouble what I need to do to populate the Source Entity dropdown.

@basdebruin

Edo mentioned a week or so ago to me that this feature is coming soon!

You would still need to have the custom field and process it as required, but it will allow remote dependencies as well

2 Likes

Hi there,
Seem the documentation is a little changed with regards to item mapping, custom entities and dependencies. Maybe I overlooked this important note earlier:

So, my next question is: are there any plans to support custom triggers to support mapping?

@basdebruin You can use Custom Triggers with Item Mapping using Part 3 from the documentation here - https://monday.com/developers/apps/dynamic-mapping