Turn every signed contract into a searchable renewal register
Every contract you sign gets read, logged, and dated automatically, so you always know the last day to give notice before it renews.
I want every contract we sign to land in a searchable contract register automatically, so renewal dates stop sneaking up on us. Use a Docusign poll trigger on the envelope_completed event, so this runs once per contract as soon as it is fully executed.
When an envelope completes, call Get Envelope to capture the envelope id, the envelope name or subject, and the completion date. Then call List Envelope Documents to see what is attached and pick the executed agreement itself, which is normally the combined signed document rather than the Certificate of Completion or a summary page. Pull that file with Download Document to get the signed PDF.
Run Mistral AI OCR over the downloaded PDF to convert the whole agreement into markdown text. These are long multi-page documents, so make sure the full text is captured across every page, including schedules and appendices, before doing any extraction. Do not extract from just the first page or two.
Pass the OCR text to Mistral AI Chat Completion and extract the key commercial terms as structured fields: counterparty name, effective date, initial term, total contract value, currency, whether the contract auto-renews (yes or no), the renewal notice window in days, payment terms, and governing law.
Accuracy matters more than completeness here, and there are three rules I care about. First, if the model is not confident about a term, quote the exact contract language verbatim instead of paraphrasing it, so a human can check the real wording. Second, if a clause genuinely is not in the document, leave that field blank and add a short "not found" note. Third, never invent, infer, or estimate a value that is not actually written in the contract.
Calculate two dates from what was extracted. Work out the contract end date from the effective date plus the initial term, then work out the notice deadline by subtracting the renewal notice window from that end date. The notice deadline is the most important column in the register, because it is the last day we can give notice before the contract rolls over. If either the effective date, the initial term, or the notice window is missing, leave the derived date blank with a "not found" note rather than guessing at it.
Append one row per contract to the Google Sheets contract register using Append Values. Include the counterparty, effective date, initial term, calculated end date, calculated notice deadline, total contract value, currency, auto-renewal yes or no, renewal notice window in days, payment terms, governing law, the Docusign envelope id, and the envelope name. Keep the column order stable so the sheet stays sortable and filterable by notice deadline.
Finally, post a summary to the operations channel with Slack Send a Message. Lead with the counterparty and the headline terms: contract value, effective date, and end date. When the contract auto-renews, call that out prominently at the top of the message along with the notice deadline, because those are the ones that cost us money if the window is missed. Also flag any field that came back blank or uncertain, along with the quoted contract language where there was one, so someone can close the gap while the contract is still fresh.
Example output
What does this prompt do?
- Spots every contract the moment it is fully signed, so nobody has to remember to file it.
- Reads the signed PDF and pulls out the terms that matter: counterparty, value, start date, length, payment terms, governing law, and whether it renews on its own.
- Adds one row per contract to your register spreadsheet, including a calculated deadline for the last day you can give notice.
- Posts a summary to your operations channel and highlights the contracts that renew automatically.
What do I need to use this?
- A Docusign account where your signed contracts are completed
- A Mistral AI account, used to read the contract PDFs and pull out the terms
- A Google Sheet to act as your contract register
- A Slack workspace and a channel for the operations team
How can I customize it?
- Change which terms get extracted, for example adding liability caps, notice addresses, or renewal price increases.
- Point the register at a different spreadsheet, or split contracts by entity or region into separate tabs.
- Choose which channel gets the summary, and whether every contract is posted or only the ones that auto-renew.
FAQs
What happens if a contract does not mention a renewal notice period?
Will this work with scanned or image-based contracts?
Can I trust the extracted numbers?
How does it work out the notice deadline?
Does it cope with long agreements?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Stop letting renewal dates sneak up on you.
Every contract you sign lands in a searchable register with its notice deadline already worked out.