Ingest S3 documents into a Notion knowledge base

Every hour, pull freshly uploaded PDFs and Word docs from an S3 inbox, summarize them, and file each one as a structured Notion page.

Agentic Task
Amazon S3NotionOperationsDocument ProcessingData SyncResearch & Monitoring
PromptCreate

Every hour, scan a designated Amazon S3 inbox bucket for newly arrived PDFs and Word documents, extract their contents, and file a structured summary as a new Notion page. Trigger on cron: run once an hour.

Let the user configure four things at setup: the S3 bucket name, the S3 key prefix that scopes the inbox (a folder path inside the bucket, empty string means the whole bucket), the destination Notion database ID where summaries land, and a maximum file size in megabytes so oversized uploads are skipped.

Also configure the Notion tracking database ID: a separate small database that records which files have already been processed. Each row is one processed file keyed by its S3 object key. This is how the workflow avoids re-summarizing anything.

On each run: call Amazon S3 List Objects (V2) with the configured bucket and prefix. Paginate through the continuation token until every candidate is enumerated. Filter the returned keys to those ending in .pdf, .docx, or .doc (case insensitive) and drop the rest.

For each candidate key: query the Notion tracking database, filtering by the file key property, to check whether it has already been processed. If a matching row exists, skip the file. Otherwise proceed.

Call Amazon S3 Head Object on the key to confirm size and content type without downloading. If the size exceeds the configured maximum, log a skip and move on. If the content type does not match a PDF or Word document, log a skip and move on.

Call Amazon S3 Get Object (Download) to pull the file bytes. Parse the document to plain text (PDF or Word). From the extracted text, identify the following: a title (fall back to the filename if none is clear), the author or client the document is about, the three to seven most important topics, any explicit dates mentioned (deadlines, meeting dates, effective dates), and any action items or next steps written in the document.

Then call Notion Create a Page in the destination database with these fields: Title (the extracted title), Source File (the S3 key), Uploaded At (the LastModified timestamp from List Objects), Topics (the extracted topics as a multi-select or comma-separated list depending on the property type), and Summary (a two to four paragraph write-up covering what the document is, who it involves, the important dates, and the action items). Include the raw extracted key points as bulleted blocks in the page body so the full detail is preserved.

Finally, create a row in the Notion tracking database recording the file key, the processed timestamp, and a link to the newly created summary page so the next run knows to skip it.

If any step fails for a specific file (parse error, oversized, wrong type, download failure), log the failure and continue with the next file. Do not abort the run because one document was bad.

Additional information

What does this prompt do?
  • Watches an S3 bucket (or a specific folder inside it) every hour for newly uploaded PDFs and Word documents.
  • Skips anything already handled by checking a Notion tracking database so nothing gets summarized twice.
  • Reads each new document and pulls out the title, author or client, key topics, important dates, and action items.
  • Files every document as a new page in your destination Notion database with fields for Title, Source File, Uploaded At, Topics, and Summary.
What do I need to use this?
  • An AWS account with the bucket you use as a document inbox and a set of credentials that can read from it
  • A Notion workspace with a destination database for the summaries and a small tracking database, both shared with your Notion connection
  • The bucket name, the folder path you want watched, and the two Notion database IDs handy when you set it up
How can I customize it?
  • Point it at a specific folder inside the bucket instead of the whole thing so it only watches one team's uploads.
  • Raise or lower the file size cap so oversized documents are skipped instead of parsed.
  • Rename or add fields on the Notion page (Owner, Client, Priority) to match how your team already tracks documents.

Frequently asked questions

What file types does it handle?
PDFs and Word documents (.docx) are the default. If you drop other file types into the inbox folder, the workflow ignores them so it doesn't try to parse things it can't read.
Will it re-summarize a file if I upload a new version with the same name?
No. The workflow keeps a tracking database in Notion of every file it has processed, so identical file paths are skipped. If you want re-processing on updates, rename the new version or clear its entry from the tracking database.
Can I point it at a folder inside a bucket instead of the whole bucket?
Yes. When you set it up, you give it a folder path (a key prefix) and it only looks inside that folder, so a single bucket can host multiple inboxes for different teams.
What happens if someone uploads a very large document?
You set a size cap during setup. Anything larger than the cap is skipped with a note in the logs, so a single 500MB PDF doesn't stall the hourly run.
Do I need to build the Notion database first?
Yes. Create the destination database in Notion with the fields you want (Title, Source File, Uploaded At, Topics, Summary is a good starting point), share it with your Notion connection, and paste its ID into the setup.

Turn your S3 uploads into a searchable Notion library.

Every PDF or Word doc you drop into the inbox becomes a structured Notion page your team can search, filter, and share.