I want to update the channel of a chat-app, with a message, that looks like that:
There are 5 open Issues: #4 - ‘Build thing’ - open since 2021-05-03 - link #7 - ‘Build another thing’ - open since 2021-06-03 - link #9 - ‘Make Part’ - open since 2021-08-03 - link
Can so. help me to get started with my first my first function for that? Is the function-node the best way to do it?
So I do something something similar with Zendesk to slack with open and unassigned tickets.
The best I found at the moment was to use the function node to group your items into the format you want (in the items loop) then just return the complete message that you want to send.
I just checked the output of the endpoint to list the issues and noticed the issues are wrapped in the property issues. So, the first function needs to unwrap the issues array, so the data is easy to work with - you can skip this step, but I would not recommend it. The second function creates the message (as @Jon suggested) you need to send.
Check the example workflow below. Just copy it and paste it into a new workflow.