I am trying to set up a workflow in n8n that would create a private channel based on a certain name format (channelname-yymmdd) and the next part would be to archive the channel after 30 days.
The first part (creation of public channel on a predefined name format) has been done, however I am having a hard time finding the right option for the archiving part - it works but with immediate archiving, not after 30 days.
I used the Slack node, however it does not have any option in there. At the same time I was trying with the HTTP node, POST directly on the channel - however in here I would need a specific Java command to trigger the command after 30 days.
Do you have any other suggestions or way out?
Welcome to the community
What about using a schedule trigger that runs every day then use the Slack node to get a list of all channels and check if the name matches your pattern then extract the date to see if it is older than 30 days and if it is delete it.
Workflow below shows an example on how to do this and assumes your Slack app has permission to list all the channels.