Monday.com & make - how to sort

How to sort Monday.com by date column with Integromat (make) and send HTML table with GMAIL

I am able to get board’s items(monday.com) with integromat.
Then iam also able to create an HTML table and send them with gmail.

BUT
Iam looking for a solutino how to sort the data based on dates.

Attached:

  • make cenario picture
  • Unsorted table (the email)


There is a sort() array function you could use first to sort the array that holds your data before it goes into a table.

3 Likes

All right, this should absolutely be part of the core documentation related to “raw” and “dot notation”. The sort() function takes 3 arguments, the first being mandatory

sort(array;<asc|desc>;)

You must pass an array to sort so usually you will pass the output of an array or an array aggegator to perform the sort.

Ascending is the default sort order so if you leave off key 2 you will get ascending.

It is the third argument that is crucial. You cannot just cram a color pill from the result of a previous output into this key. You have to either identify the simple key name or array path (in dot notation).

This video shows you how to derive this from looking at the output bundle in JSON, which is the easiest way to identify this raw path.

6 Likes

The sort() function mentioned by @alex.newpath is the way to go. See below how I set this up to sort by descending order for the created_at field

4 Likes

Well…
Thanks for @alex.newpath i was able to solve it…BUT
make sure you don’t have any leading spaces :rage:

3 Likes

Nice. Yeah leading spaces in the text could mess up the sort but you can trim those first before assembling the array. Do you want to share your final solution here?

2 Likes

well done Alex - that is very interesting.

1 Like