Send only recent activity notifications to telegram

Describe the problem/error/question

Hello friends, I want to try to make a telegram notification bot by taking activity data from the CKAN platform using the API. from the data I get only consists of
“id”: “5144cf5c-9544-4”,
“timestamp”: “2024-06-05T06:52:50.230786”,
“user_id”: “6051a071-d074-49e”,
“object_id”: “0af643ea-e8d7-4fe0-afe9”,
“changed package”,
“data”: {
“package”: { “title”:
“Economy Actors” }
How do I only want to send notifications of the latest activity and do not send any more notifications with the same activity based on date time?

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: Version 1.39.1
  • Database (default: SQLite): Postgress
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

Hi @Jackon_Spray,

What you could do here is get the request, split the data into separet items so you can manipulate them independently, then you can sort them by timestamp in descendent order so that the first item willl always be the most recent - you can set the sort node to run only once so it only outputs the latest. Then you can send yoursef just that one item, additionally adjusting the data format, depending on what you want. :sunflower: