Skip to content

The moment it happens

Zip an S3 folder on request

One ZIP of everything under a folder, uploaded back to S3 with a download link in your inbox.

Runs
The moment it happens
Apps
AWS
AI
Not needed
Access
s3:ListBucket, s3:GetObject, s3:PutObject

Send this to your assistant

Create a ClickRuntime automation: when I call this link with a folder name, zip every file in that folder of my S3 bucket, upload the ZIP and email me a download link.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

At the end of a project, an agency needs to hand a client every deliverable: final designs, exports, reports and raw files, all stored in an S3 folder. S3 has no button to download a folder as one archive. The usual workarounds are installing the AWS CLI, syncing to a laptop, zipping by hand and uploading again somewhere else, which can take a couple of hours for a few gigabytes and fails halfway when the connection drops.

Send a request to your ClickRuntime link with the folder path. ClickRuntime lists the objects under that prefix, downloads them, packs them into one ZIP file and stores the ZIP in your bucket. You then receive an email with a presigned link to download the archive.

It suits anyone who must pass bundles of files to people outside their company without giving them bucket access. Agencies and consultants hand over projects this way.

What you get out of it

  • Client handovers take minutes

    A request that returns a single link replaces an afternoon of syncing, zipping and re-uploading. Projects close on time and invoices go out sooner. Projects close on schedule and the final invoice goes out the same day.

  • Clients never get bucket access

    A presigned link grants access to one archive only. You avoid creating AWS users or opening permissions just so a client can fetch their files. You avoid creating temporary AWS users for each client.

  • No CLI or local copy is needed

    Colleagues who are not comfortable with command-line tools can still package a folder. The files never pass through a laptop, which also avoids filling a local disk. Colleagues who dislike command lines can still deliver a full folder.

  • Archives are stored for later

    Because the ZIP is saved back to S3, you can generate a new link next month without repeating the work. There is a record of exactly what was delivered. That gives you a record of exactly what was delivered to the client.

  • Large folders do not break halfway

    The work runs on ClickRuntime's side rather than over your home internet. A dropped hotel Wi-Fi connection no longer ruins a long download. The job finishes even if your own connection drops.

How it works

What happens, step by step

  1. When you call your ClickRuntime link with a folder name, or on the monthly schedule if you set one, the automation starts.

  2. It downloads every file under that folder in your S3 bucket and packs them into one ZIP.

  3. It uploads the ZIP back to S3.

  4. You get an email with the number of files and a temporary download link.

Before it runs live

  • Connect AWS
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Zip an S3 folder on requestjust nowSucceeded
Email · ZIP readyZIP of clients/northwind/ ready (23 files) https://acme-files.s3.amazonaws.com/zips/clients-northwind.zip?X-Amz-…

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other AWS steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
zip_a_folder_and_send_me_a_download_link.pyexample
import io
import zipfile
import boto3
from clickruntime import on_event, credentials, notify

REGION = "us-east-1"

def aws(service):
    return boto3.client(service, region_name=REGION, aws_access_key_id=credentials.secret("AWS_ACCESS_KEY_ID"),
                        aws_secret_access_key=credentials.secret("AWS_SECRET_ACCESS_KEY"))

BUCKET = "acme-files"

@on_event
def handle(event):
    folder = (event.json or {})["folder"].strip("/") + "/"
    s3 = aws("s3")
    buf, count = io.BytesIO(), 0
    with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as zf:
        for page in s3.get_paginator("list_objects_v2").paginate(Bucket=BUCKET, Prefix=folder):
            for o in page.get("Contents", []):
                zf.writestr(o["Key"][len(folder):], s3.get_object(Bucket=BUCKET, Key=o["Key"])["Body"].read())
                count += 1
    key = f"zips/{folder.strip('/').replace('/', '-')}.zip"
    s3.put_object(Bucket=BUCKET, Key=key, Body=buf.getvalue())
    link = s3.generate_presigned_url("get_object", Params={"Bucket": BUCKET, "Key": key}, ExpiresIn=7 * 24 * 3600)
    notify.email_me(f"ZIP of {folder} ready ({count} files)", link)
    return {"files": count, "key": key}

FAQ

Common questions

Is there a limit on how much can be zipped?
Very large folders may exceed what can be handled in one run. For typical project folders of a few gigabytes it works, but if you expect to archive hundreds of gigabytes, ask your AI assistant to split the job into several ZIP files.
Will the folder structure be preserved?
Yes. The ZIP keeps the relative paths of the objects under the prefix, so subfolders appear when it is opened. Empty folders that exist only as zero-byte markers may not carry over, which rarely matters for deliverables.
How long is the download link valid?
The presigned link expires after the time you choose, often a day or a week. After expiry the ZIP is still in your bucket, and asking for the folder again produces a fresh link without rebuilding the archive.
What permissions does it need?
s3:ListBucket, s3:GetObject, s3:PutObject. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Zip an S3 folder on request” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.