Skip to main content

Trying to create integration with third-party api and update several columns on monday.com side


I create



  • custom type with all required fields

  • custom triger with sunscribe/unsubscribe

  • custom action


and receipt not working. Field with dropdown just disabled.

The main idea - subscribe to fields list when receipt added to boeard and update columns from time to time and mirror columns from external API


Custom-Triger-Action-not-Working


Can’t figure out what is wrong

Hi @vlad123


Welcome to the community. I can’t see it in the video but do you have an endpoint configured in your backend that supplies the values for the custom field type?



Yes it working for another receipt with “when column changes” Trigger

I’ll record another video to demonstrate this


Here is example with “when column changes”



I find small typo in original post and get “something” - empty mapping instead of disabled fields.



Hey @vlad123, my warmest welcome to the community!


It seems like the recipe might be looking to load context data like board ID, item ID and such that should be provided for the recipe to run successfully, but failing to do so. I think it might make sense to add the necessary data for the recurring recipe to run successfully. With the “When column changes” recipe, this is included as part of the trigger block for the action block to refer to later on. Does that make sense?


What do you think? Let me know.


-Alex


I already try recurring recipe and Recurring action do not produce ItemValues and can’t leverage Dynamic Mapping.


Attempt to create recorded below



Hey Vlad! I noticed your sentence says “every {minutes, minutes} Minutes”.


The second field in the {curly brackets} should correspond to one of the input fields in the trigger.


Try this instead: every {minutes, schedulerConfig} Minutes


I change it but custom trigger still not working with recurring Action. Empty dropdown for source entity


Strange. Can you confirm that the request is hitting your custom entity field URL? Or does your server not get any response at all?


If there is a request/response, can you share it?


Basically I’d like to understand where the problem is originating from – if the request to your server is failing, or if your server is not sending us back the right information, or if it’s something else entirely…


If you’re using ngrok, you can see every request and response going through your tunnel by going to localhost:4040/inspect.


My previous recording already have ngrok responses here:



It’s about custom trigger/action

I need Fields mapping and custom action with subscribe/unsubscribe looks like good solution to get this mapping when user set all required fields


@dipro I carefully recheck docs and looks like for this task we need:

Custom Trigger + missing Update Item Action


Docs here https://monday.com/developers/apps/dynamic-mapping

show good example Part 3: Using Inbound Mapping (your app to monday.com):

custom trigger + create item


I need the same but with update … Looks like it’s impossible to implement at the moment


Ah, I see. You want to be able to add Dynamic Mapping for the column values and the update field as well!


At the moment this specific functionality is not possible. However, that doesn’t mean this integration is impossible to implement… 🔮


Step 1:

You can start by mapping the text for the update to a text column in your integration. So, your custom action would create a new item and add the update text to some text column.


Step 2:

After that, you can set up one of our “Create an update” automations and map the data in the text column to the update text. I’d recommend “When an item is created in this group, create an update”, but we have other recipes as well:


Step 3:

When you set up the automation, you can send the data from the text column (which contains the update information from step 1) to the update:


Let me know if that works for you!


Per my understanding we need separate board to collect created records and than maybe delete them.

every 5 minutes update for 100 drivers can produce 28800 records for one day

and those records does not have proper identity only timestamp.

this can become unmanageable really soon


Another point .

We also need Create OR Update functionality or at least initial creation to sync real drivers with board


@vlad123


I think I might have a solution to your problem, I was working with one of the monday team a few months ago and I think you could edit it to suit your needs.



  1. Create your own custom action of “create update an item with mapping and add an update”, in this action you’ll use monday’s Item mapping field type and board field type as input fields.

  2. Create your own custom trigger of “when an entity is created/updated” like you’ve done so far

  3. Now while calling your action you’ll get as an object the new monday item after the mapping, with it you could create an item

  4. when first creating the item you’ll get the newly created item id (after running the mutation at your server), save this item id as you will need it to create the update

  5. Once you have created the item, you can run a mutation to create the update using the ID returned from the create_item mutation


In order for this to work, I think you could get the update value a few different ways. You could either store it in your DB and then retrieve it with an ID from the mapped fields, or you could include it as a value in the mapped fields as Dipro suggested.


When your action is called with the mapped fields, you would then remove the update value from the mapped fields (you might need a text column on the board to ensure that the update is mapped and passed to your action), create the item, and then use the mapped value for the update to create the update


Let me know if you need more information to get this to work for you.


Do you have a working example for this case?


We have a request similar to Vlad we would like to make a rule of the type:

When a column changes then modify the fields of our entity.


We haven’t been able to do it simply, without having another database.


It seems possible to create a new row of the table with an entity (as in the documentation) but it is not possible to directly modify the row of the table with our entity.


Thanks. Have a nice day!


Hi @yaacovza ,


This would actually be a relatively easy scenario, there is a column type called ‘Integration Column’, I am not 100% sure if this is available yet, but it allows you to create a column on the board and track the identifier that is stored in your entity table. I think this column should be automatically mapped reducing a step for the end user who is configuring the integration


If this isn’t available, you could simply create a text column and place the identifier you need in this value.


When your action is called, it will include the Integration Column, or Text column value that contains your entity id, you can then query this, and update the value accordingly. If the value is blank, you could create the new entity, and then add the new identifier to the column value.


You don’t need a complex workflow like Vlad does to suit your scenario


Little OT, but related to the integration column.


I was advised by support team not to use this yet as it is work in progress. The integration column can be written once and only through the API which makes it perfect for cases where you need to have WORM (Write Once Read Many) functionality. The mutation is:


mutation {change_column_value (board_id:boardId, item_id: itemId, column_id: "id", value: "{\\"entity_id\\":102}" ) {
id
}}

I did found one thing that is not very nice about this column type. When you duplicate an item the value of the integration column is also duplicated and can’t be overwritten anymore. Not by the UI nor through the API.


Thanks to all,


So what do you preconise for the final solution ?


My entiy is like this

{ id: ‘url’, title: ‘URL’, outboundType: ‘text’, inboundTypes: b‘text’] },

{ id: ‘viewCount’, title: ‘View count’, outboundType: ‘numeric’, inboundTypes: ‘numeric’] },

{ id: ‘likeCount’, title: ‘Like count’, outboundType: ‘numeric’, inboundTypes: ‘numeric’] },

{ id: ‘unlikeCount’, title: ‘Unlike count’, outboundType: ‘numeric’, inboundTypes: U‘numeric’] }


Can you provide an example / drawing of your solution ?


Thanks a lot !


@yaacovza


You are pretty close. Your ItemMapping would need to be this:

{ id: ‘url’, title: ‘URL’, outboundType: ‘text’, inboundTypes: b‘text’] },

{ id: ‘viewCount’, title: ‘View count’, outboundType: ‘numeric’, inboundTypes: ‘numeric’] },

{ id: ‘likeCount’, title: ‘Like count’, outboundType: ‘numeric’, inboundTypes: ‘numeric’] },

{ id: ‘unlikeCount’, title: ‘Unlike count’, outboundType: ‘numeric’, inboundTypes: U‘numeric’] },

{ id: ‘updateText’, title: ‘URL’, outboundType: ‘text’, inboundTypes: ‘text’] },

{ id: ‘entityId’, title: ‘URL’, outboundType: ‘text’, inboundTypes: ,‘text’] },


Your action would look something like this:

Screen Shot 2021-02-02 at 8.18.45 pm


Passing the item mapping values to your endpoint. The column values would be accessed by: $inbound = $request->payload 'inboundFieldValues'] 'itemMapping']; (PHP, but any language is fine)

You can then use the $inbound value as column_values when you create a new item via an API call. I believe it should also include an item_name value in the array that you would need to extract and move to a new variable for the API query. You should also remove the updateText value from the array as this is what you will need for the update.


Once you have the ID returned from the create_item mutation, you can use this to make another API call, create_update using the item_id and the update_text


Hello Mitchell,


Thanks a lot!


I don’t fully understand the solution, if possible could you explain to me how you will build your(s) recipe(s).

I try to make with custom trigger and action but didn’t succeed.

When sending the item mapping I only see the values and not the fields correspondence.


Can you provide me your complete flow?


Regards


If you have working example it’s good to have trigger/action screenshots. I’m just checked built in trigger ‘When an Item is Created’ and it looks bit different and maybe it can be used instead of custom trigger to check this flow.


I try to build simplified recipe and here is my findings:

“When an Item is Created” → “My Custom Action with Mapping”


Posting working example


Looks like When an Item is Created trigger designed to cover only one case when you jut type name for your new record and there is no other fields.


As you can see action can leverage mapping but filds list will be cutted if you forgot about default values for each field. You can check recording - first time integration added with defaults for all fields and second time - with defaults only for one field.

This looks unclear from user perspective WHY we need default values or can we leave them empty


I believe custom trigger can produce similar output with same input fields


@vlad123


Just to confirm, you are looking for this recipe:

When MyEntity is updated, update columns for my item in monday and add an update


Is this correct?


I’m talking about when an entity is created/updated” → “create update an item with mapping and add an update”