This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "AI contract example",
"nodes": [
{
"id": "trigger",
"name": "Trigger",
"type": "n8n-nodes-base.manualTrigger",
"parameters": {}
},
{
"id": "classify",
"name": "Classify request",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3,
"parameters": {
"promptType": "define",
"text": "=Classify this request: {{ $json.request }}",
"hasOutputParser": true,
"options": {
"systemMessage": "Return only the requested structured result."
}
}
},
{
"id": "model",
"name": "Chat model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"parameters": {
"modelId": {
"value": "gpt-example"
},
"options": {
"temperature": 0
}
}
},
{
"id": "parser",
"name": "Result schema",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.3,
"parameters": {
"schemaType": "fromJson",
"jsonSchemaExample": "{\"category\":\"support\",\"urgent\":true}"
}
}
],
"connections": {
"Trigger": {
"main": [
[
{
"node": "Classify request",
"type": "main",
"index": 0
}
]
]
},
"Chat model": {
"ai_languageModel": [
[
{
"node": "Classify request",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Result schema": {
"ai_outputParser": [
[
{
"node": "Classify request",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AI contract example. Uses agent, lmChatOpenAi, outputParserStructured. Event-driven trigger; 4 nodes.
Source: https://github.com/syucream/s8n/blob/main/examples/ai-contract.workflow.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Enrich Company Data from Google Sheet with OpenAI Agent and Scraper Tool. Uses outputParserStructured, lmChatOpenAi, googleSheets, toolWorkflow. Event-driven trigger; 13 nodes.
Sales Assistant Build. Uses manualTrigger, agent, lmChatOpenAi, toolHttpRequest. Event-driven trigger; 13 nodes.
A hands-on starter workflow that teaches beginners how to:
Bridge the gap between your development and project management workflows with this intelligent n8n template. This isn't just a simple sync; it uses an AI agent to analyze, classify, and intelligently
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.