Slack Archive module

Hi there, I need to archive like 14000 channels. I’ve already tested the archive module and it works! Cool… Well now I need to figure it out, how to do this in batches. (I can do several batches, ok, but 14000 times is madness).
Does anyone knows how to add several channels on the same time?

MANY THANKS GUYS!

@mdominguez Thanks for reaching out. I’ll show you how I’d build this in Pipedream.

We’re going to setup a workflow that archives one channel at a time. We’ll setup that workflow to be triggered by HTTP requests, so you’ll pass the channel you want to archive like so:

curl -d '{ "channel": "#test" }' https://endpoint.m.pipedream.net

This way, we’ll be able to apply throttling settings to the workflow’s execution, processing only one event per second. Slack imposes a rate limit on their API, so this throttling ensures we’ll stay within that limit.

Here’s how this works end-to-end:

  1. Create a new workflow
  2. Choose the HTTP / WebhookNew Requests trigger:

  1. Visit your workflow’s Settings tab and set the throttling to 1 event per second, and set the queue size to 10,000 (the max we support on the Pro plan. On the free tier, the max is 100):

  1. Back in your workflow, add the Archive step. Since you’ll be triggering this workflow via HTTP request, your channel will be in a variable like {{steps.trigger.event.body.channel}}, so you can enter that as the value of the Channel parameter in the action.
  2. Send an HTTP request to the endpoint URL of your HTTP trigger, passing the channel in the body of the HTTP request:
curl -d '{ "channel": "#test" }' https://endpoint.m.pipedream.net

I’d recommend sending less than 10 requests per second like this to stay within our QPS limits. If you want to send requests at a faster rate, we can do that for paid customers.

Let me know if that helps.

1 Like

THANKS MEN!!! This helps me a lot!