Mailhook and Knowledge: Contract PDF Archive Template
A template that turns signed contract PDFs emailed to a Mailhook address into a searchable Knowledge library the whole workspace can query later.
What It Builds
A Mailhook trigger gives this workflow its own inbox address. When a signed contract PDF lands there, an Attachment node fetches the file bytes and a Knowledge node in Embed mode adds the document to a persistent collection (OCR handles scanned signatures). Over time you get a growing, searchable archive of every contract, without anyone uploading files by hand.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow triggered by a Mailhook address. When an email arrives, fetch every PDF attachment, run OCR if needed, and embed each contract into a persistent Knowledge collection named "Contracts" so the team can search it later. Tag each document with the email sender and subject for reference.
Connectors Used
- Mailhook trigger - the dedicated
@mailhook.spojit.comaddress that starts a run on every inbound email. - Attachment node - fetches the PDF attachment bytes from the triggering email.
- Knowledge node (Embed mode) - adds each contract to a reusable, searchable collection.
Customize It
Rename the Contracts collection, change which file types you embed, or adjust the tags so contracts are filed by client, region, or contract type. You can also point the prompt at multiple attachments per email when vendors batch their documents.
Tips
- Use a persistent collection (not Transient) so the archive survives across runs and stays queryable.
- OCR lets scanned, signed PDFs become searchable text inside Spojit.
- Query the collection later with a Knowledge node in Query mode to pull clauses or dates on demand.