Quick overview
This workflow receives an RFx completion webhook, scores suppliers against cost, risk, lead time, and rating constraints, generates award scenarios, and uses Groq (LangChain agent) to produce a structured procurement recommendation, then stores results in Notion and posts success or failure alerts to Slack.
How it works
- Receives an HTTP POST webhook with an RFx ID, a suppliers array, and optional evaluation constraints.
- Validates that at least one supplier is provided, and if not, posts an error to Slack and returns an “invalid input” webhook response.
- Filters and scores suppliers using weighted cost, risk, lead time, and rating factors, then selects three scenarios (best cost, lowest risk, and balanced) and returns a ranked supplier list.
- Sends the scenario data to a Groq-hosted LLM via a LangChain agent to generate a JSON-only executive summary, insights, trade-off analysis, and a final recommendation.
- Parses and validates the AI JSON output, and if it fails, posts an error to Slack and returns an “AI error” webhook response.
- Stores the recommendation and insights in a Notion database, posts a completion message to a Slack channel, and returns a success response to the original webhook request.
Setup
- Copy the webhook URL from the Webhook trigger and configure your RFx system to POST
rfx_id, suppliers[] (with cost, risk, lead_time, rating), and optional constraints to that endpoint.
- Add Groq API credentials for the LangChain Groq Chat Model used by the AI analysis step.
- Add Notion credentials and select the target database, ensuring it has properties for RFx ID, Best Supplier, Executive Summary, Cost Insight, Risk Insight, Trade-off, and Final Recommendation.
- Add Slack credentials and set the target channel for both success and failure notifications.
- Review and adjust the scoring weights and constraint defaults in the supplier scoring logic to match your award criteria.
Additional info
Customization
- Change scoring weights in code node
- Add new constraints (e.g., location, certifications)
- Modify AI prompt
- Customize Slack message format
- Extend Notion fields
Add-ons
- Email alerts
- ERP integration
- Approval workflows
- Historical supplier tracking
- Dashboard reporting
Use Cases
- RFQ supplier selection
- Vendor comparison automation
- Risk-based sourcing
- Procurement analytics
- AI-driven decision making
Troubleshooting Guide
| Issue |
Possible Cause |
Solution |
| No suppliers processed |
Empty suppliers array |
Ensure suppliers are passed correctly |
| Workflow stops early |
Validation failure |
Check webhook payload |
| Incorrect scoring |
Missing supplier fields |
Ensure cost, risk, lead_time, rating exist |
| AI output invalid |
Improper JSON response |
Adjust AI prompt formatting |
| Slack not sending messages |
Invalid credentials |
Reconnect Slack API |
| Notion not saving data |
Wrong database mapping |
Verify database fields |
| API returns error |
AI validation failed |
Check AI output node |
| Unexpected results |
Constraints too strict |
Relax constraints |
Need Help?
WeblineIndia can help you build advanced automation workflows, integrate AI, scale procurement systems and provide n8n workflows developers for hire.
Contact us to build smarter automation solutions.