On a schedule
Archive the pages in your sheet to S3 every month
On the 1st of each month, every page listed in your sheet is saved to S3 under that month's date, and the archive path is written back next to it.
- Runs
- On a schedule
- Apps
- AWS, Google Sheets
- AI
- Not needed
- Access
- Sheets read+write; s3:PutObject
Send this to your assistant
Create a ClickRuntime automation: on the 1st of each month, save a copy of every URL in my Legal Pages sheet to S3 under today's date, write the S3 path back to the sheet, and post a note to #legal.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A company's terms, privacy policy and pricing pages change over time, and when a customer disputes what the terms said last spring, nobody can prove it. Saving copies by hand is the kind of job that happens once and then never again.
A monthly archive of each listed page, stored with the date in S3, builds a reliable record of what your public pages said and when.
What you get out of it
Prove what a page said
Dated copies settle disputes about past terms, prices or claims.
Compliance records without effort
Regulated businesses can show a history of published policies.
The sheet is your register
Add a URL to the sheet and it's included from the next month on.
Your storage, your retention
Copies sit in your own bucket, where you control how long they're kept.
How it works
What happens, step by step
On the 1st of each month, ClickRuntime reads the list of URLs from your Legal Pages sheet.
It downloads each page.
It saves each copy to your S3 bucket in a folder named with today's date.
It writes the archive path next to each URL in the sheet and posts a short note to #legal in Slack.
Before it runs live
- Connect AWS
- Connect your Google Sheets account and pick the spreadsheets it may use
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
- Run it at a different time, more or less often, or only on weekdays
- 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 and Google Sheets steps into one automation
Under the hood
The code that runs this automation
import boto3
from datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, notify
SHEET_ID = "your-spreadsheet-id"
REGION, BUCKET = "us-east-1", "northwind-files"
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"))
@on_trigger
def run(event):
sheets, s3, today = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets(), aws("s3"), date.today().isoformat()
urls = [r[0] for r in sheets.values().get(spreadsheetId=SHEET_ID, range="Legal Pages!A2:A").execute().get("values", []) if r]
paths = []
for url in urls:
try:
r = http.get(url, timeout=30)
key = f"archive/{today}/{url.split('//', 1)[-1].replace('/', '_')}.html"
s3.put_object(Bucket=BUCKET, Key=key, Body=r.content, ContentType="text/html")
paths.append([f"s3://{BUCKET}/{key}"])
except Exception as e:
paths.append([f"failed: {e.__class__.__name__}"])
sheets.values().update(spreadsheetId=SHEET_ID, range=f"Legal Pages!B2:B{len(urls) + 1}", valueInputOption="RAW", body={"values": paths}).execute()
ok = sum(p[0].startswith("s3://") for p in paths)
notify.slack(f"Archived {ok} of {len(urls)} pages to s3://{BUCKET}/archive/{today}/", channel="#legal")
return {"archived": ok, "total": len(urls)}FAQ
Common questions
Does it capture how the page looked?
Can it archive pages from other sites?
Where in the sheet is the path written?
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
Transcribe audio uploaded to S3 into a Google Sheet
Every audio file you upload to your S3 bucket is transcribed, and the file name and transcript are added as a row in your sheet.
See how it worksSave supplier attachments to S3 and log their details in a sheet
Attachments from your suppliers' emails are saved to S3, and the invoice number, date and total from each one are added to your sheet with a link to the file.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksKeep exploring
Set up “Archive the pages in your sheet to S3 every month” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.