Every 5 minutes
Hear about new files in an S3 folder
You get an email listing files newly added under a folder in your bucket.
- Runs
- Every 5 minutes
- Apps
- AWS
- AI
- Not needed
- Access
- s3:ListBucket
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check the uploads/ folder in my S3 bucket and email me the names and sizes of any new files.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Partners, customers and internal systems drop files into S3 all day: a vendor uploads an invoice batch, a customer sends a data export, a nightly job writes a report. Nobody on the receiving side is watching the bucket, so files sit unprocessed. The finance analyst finds out on Thursday that Monday's invoices arrived, and the customer who uploaded a data export wonders for three days why nothing happened.
Every five minutes, ClickRuntime lists objects under the bucket prefix you chose and compares their last-modified times with the latest it stored. Any object newer than that is reported in an email with its name, size and time, and the stored value moves forward so each file is reported once.
It is a lightweight alternative to setting up S3 event notifications, Lambda functions and SNS topics for a simple alert.
What you get out of it
Deliveries are handled the day they arrive
An email within minutes of an upload lets the receiver start processing immediately. Invoices get paid on time and customer files are acknowledged before anyone asks. Invoices get paid on time and customers hear back before they ask twice.
Missed uploads can be spotted by absence
If you expect a file every morning and no email arrives, you know the sender failed. Silence becomes a signal, which is hard to get from a bucket nobody opens.
No AWS plumbing to build
S3 event notifications need SNS topics, queues or Lambda functions with their own permissions. A polling check needs only read access, so non-engineers can have notifications without a project. Non-engineers can have notifications without waiting for a project.
Names and sizes catch obvious errors
An email that shows a file of zero bytes or an unexpected name reveals a bad upload instantly. You can ask the sender to try again before downstream steps fail.
Each prefix can have its own recipient
Different prefixes for different partners can notify different people. The right team hears about its own files without everyone getting every message. The right team hears about its own deliveries only, with no noise from others.
How it works
What happens, step by step
Every five minutes ClickRuntime looks at the files under the folder you chose in your S3 bucket.
It keeps only files added since its last check, so nothing is reported twice.
You get an email listing each new file and its size.
Before it runs live
- Connect AWS
What you get
Build your own
Need it to work differently?
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
import boto3
from clickruntime import on_trigger, credentials, notify, state, report_fetched
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-uploads"
@on_trigger
def run(event):
last = state.get("last_modified") or ""
objects = aws("s3").list_objects_v2(Bucket=BUCKET, Prefix="uploads/").get("Contents", [])
new = [o for o in objects if o["LastModified"].isoformat() > last and not o["Key"].endswith("/")]
report_fetched(len(new))
if not new:
return {"new": 0}
lines = [f"{o['Key']} ({o['Size'] / 1024:,.0f} KB)" for o in new]
notify.email_me(f"{len(new)} new files in {BUCKET}/uploads", "\n".join(lines))
state.set("last_modified", max(o["LastModified"].isoformat() for o in new))
return {"new": len(new)}FAQ
Common questions
Will it report files that were already there?
What if a file is overwritten with the same name?
Can it watch a folder inside a bucket?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Read totals from receipts dropped in S3
New receipts and PDFs in your bucket have their vendor, date and total pulled out and emailed to you.
See how it worksTranscribe new recordings in S3
Audio and video added to your bucket is transcribed, and each transcript reaches you by email when it's done.
See how it worksStore files sent to a link in S3
Files or file URLs posted to your link are saved in your bucket under the date, and you get a download link.
See how it worksKeep exploring
Set up “Hear about new files in an S3 folder” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.