# Assess contract risk from Google Drive with Groq: n8n workflow

> Started by an event in a connected app, and works across Google Drive, Salesforce and Slack. It hands the judgement calls to Groq.

Source: https://millionrounds.com/workflow/assess-contract-risk-from-google-drive-with-groq (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [CRM](https://millionrounds.com/workflows?category=CRM#library)

# Assess contract risk from Google Drive with Groq

Started by an event in a connected app, and works across Google Drive, Salesforce and Slack. It hands the judgement calls to Groq. 22 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Groq

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fassess-contract-risk-from-google-drive-with-groq)

**22 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 6 Logic 9 Service 6

The steps in the order they run, from what starts it.

- 1 **Trigger: New Contract in Drive** Google Drive trigger *Starts it*
- 2 **LLM: Clause Extraction Model** Lm Chat Groq *Model*
- 3 **LLM: Risk Analysis Model** Lm Chat Groq *Model*
- 4 **LLM: Final Report Model** Lm Chat Groq *Model*
- 5 **Validate File is PDF** If *Logic*
- 6 **Extract Contract Clauses** Agent *Model*
- 7 **Analyze Clause Risks** Agent *Model*
- 8 **Generate Final Risk Report** Agent *Model*
- 9 **Download Contract File** Google Drive *Service*
- 10 **Parse Clause Output** Code *Logic*
- 11 **Parse Risk Analysis Output** Code *Logic*
- 12 **Parse Final Report** Code *Logic*
- 13 **Extract Contract Name** Set *Logic*
- 14 **Extract Text from PDF** Extract From File *Service*
- 15 **Merge Contract Data** Merge *Logic*
- 16 **Find Contract in Salesforce** Salesforce *Service*
- 17 **Clean Contract Text** Set *Logic*
- 18 **Update Contract Record** Salesforce *Service*
- 19 **Check If Contract Exists** If *Logic*
- 20 **Split Contract into Chunks** Code *Logic*
- 21 **Send Slack Notification** Slack *Service*
- 22 **Create Contract Record** Salesforce *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 22, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Salesforce, Slack
- **Model:** Groq

## Questions

What does it need to run?

An n8n account, plus your own Google Drive, Salesforce and Slack accounts, and a key for Groq. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls Groq. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 22 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fassess-contract-risk-from-google-drive-with-groq)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Salesforce](https://millionrounds.com/workflows?service=Salesforce#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also crm, with the same services where possible, closest in size first.

- [**Track competitor risk from Gmail and webhooks with Groq** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/track-competitor-risk-from-gmail-and-webhooks-with-groq)
- [**AI-powered document workflow automation with OpenAI** 21 steps · calls a model · Email, Google Drive](https://millionrounds.com/workflow/ai-powered-document-workflow-automation-with-openai)
- [**Capture and follow up on Tally inquiries with Salesforce** 21 steps · calls a model · Salesforce](https://millionrounds.com/workflow/capture-and-follow-up-on-tally-inquiries-with-salesforce)
- [**GPT-4o: Twilio integration with OpenAI and Airtable** 20 steps · calls a model · Airtable, Email](https://millionrounds.com/workflow/gpt-4o-twilio-integration-with-openai-and-airtable)
- [**n8n cheatsheet for data pipeline with Gemini and OpenAI** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/n8n-cheatsheet-for-data-pipeline-with-gemini-and-openai)
- [**Reach out to companies that recently secured funding** 20 steps · HubSpot, Slack](https://millionrounds.com/workflow/reach-out-to-companies-that-recently-secured-funding)
