This workflow runs daily to compare procurement transactions in Google Sheets against an approved supplier list, flags unapproved (maverick) spend, uses Google Gemini to generate compliant alternatives, alerts reviewers via Slack and Gmail, logs violations back to Google Sheets, and escalates unresolved cases after two hours.
- Runs every day at 11:00 AM on a schedule.
- Loads the approved supplier list and the latest transactions from Google Sheets and normalizes supplier names for consistent matching.
- Compares each transaction’s supplier against the approved list and flags transactions from unapproved suppliers as maverick spend.
- For approved suppliers, marks the transaction as processed in Google Sheets and ends.
- For maverick spend, sends the transaction details and the approved supplier list to Google Gemini to generate corrective recommendations and alternative suppliers.
- Formats the AI output with a timestamp, posts a Slack alert, and sends a detailed violation email through Gmail.
- Appends the violation details to a Google Sheets log, marks the transaction as processed, waits two hours, and then posts an escalation message to Slack.
- Connect Google Sheets OAuth2 credentials and update the spreadsheet and sheet selections for the approved supplier list, transactions list, and violation log.
- Ensure your transactions sheet includes (at minimum)
transaction_id,supplier_name,amount,department, and aprocessedcolumn used to mark items as handled. - Add Google Gemini (PaLM) API credentials for the AI compliance suggestion step.
- Add Slack OAuth2 credentials and set the target channel for the initial alert and the escalation alert.
- Add a Gmail OAuth2 credential and configure the recipient(s) and sender settings used for the violation report email.
- Adjust the daily schedule time and the two-hour escalation delay to match your compliance review process.
- n8n account (Self-hosted or Cloud)
- Google Sheets OAuth2 credentials
- Google Gemini (PaLM) API credentials
- Slack OAuth2 credentials
- Gmail OAuth2 credentials
- Google Sheets with the following structure:
- Approved Suppliers Sheet: Approved supplier names
- Transactions Sheet:
transaction_id,supplier_name,amount,department,processed - Violation Log Sheet: Columns for storing detected maverick spend records
If you need help customizing this workflow, integrating it with your procurement and compliance systems, or extending it with AI-powered supplier recommendations, approval workflows, and advanced reporting, our WeblineIndia team is ready to assist. Explore our Process Automation Solutions or connect with our n8n workflow development experts to build, customize, and scale your business automation with confidence.