Slack node - delete operation

I would like to delete all message in the channel. however, i have to enter the timestamp of message to be delete.

may i know if i am able to list out the message using slack node and use the expression to link listed timestamp to timestamp of delete node.

Hey @Benjamin123,

Have you already tried the Channel resource with the History operation to see if that returns all the messages? It seems to suggest it may do the first part of what you are after, I don’t have a Slack instance running at the moment to test on but I will get one set up for science today.

Hello @jon , i tried to list the history, but it is not showing the channel.

I have changed to access token, it is not showing as well.

If i change the mode to upload file, i am able to list the channel using access token authorization.

If you click on the cogs on the side do you have the refresh list option?

@jon may i know where should i click? cogs?

@Benjamin123 In the Channel History image where it has found no channels there is a little triangle next to it, To the right of that there are 3 cogs. if you click on that there should be a refresh list option.

Hey @Benjamin123,

Just set up a Slack instance and gave it a test, What I had to do was make sure that my Slack Application had the correct scopes so for channel history with OAuth I needed Channels:Read to get the list of channels and Channels:History to get the list of channels.

Once that was done it kind of worked as expected so I set up my first node to get the history.

Then in my second node I used the Message Delete with the timestamp value from the previous node which is {{$json["ts"]}}

If you want it the workflow I used is below.

Example Workflow

Hopefully this helps :+1: