Skip to main content

AI-Process Contract using n8n action

PDF4me AI-Process Contract extracts structured data from contracts using AI-powered machine learning through n8n automation workflows. Process contract PDFs or images via n8n triggers, binary data, base64 strings, or public URLs to automatically extract parties, legal terms, execution dates, jurisdiction details, contractual obligations, clauses, and key contract information with high accuracy and intelligent field recognition. This solution is ideal for contract management, legal document automation, compliance monitoring, contract analysis, due diligence, and automated contract processing workflows that require AI-powered extraction with structured output and seamless integration.

Setup

Add the PDF4me "AI-Process Contract" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "AI-Process Contract" action
  3. Configure input parameters (see below)
AI-Process Contract

Parameters

Complete list of parameters for the AI-Process Contract action. Configure these parameters to control contract processing.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Data Type***StringContract Input Format Selection
• Choose the format of your contract data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary Field***BinaryBinary Contract File Input (Required if Binary Data)
• Reference contract file (.pdf, .png, .jpg, .jpeg) from previous n8n node or file upload
• PDF4me processes binary contract files with automatic format detection and AI-powered data extraction
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Contract Content***StringBase64 Encoded Contract Input (Required if Base64 String)
• Provide contract content (.pdf, .png, .jpg, .jpeg) as base64 encoded string for secure transmission
• PDF4me automatically decodes and processes the contract content using AI technology
• Required when Input Data Type is "Base64 String"
JVBERi0xLjQKJ...
Contract URL***StringPublic Contract URL Input (Required if URL)
• Provide a public/open permission URL to the contract file (.pdf, .png, .jpg, .jpeg) to be processed
• PDF4me downloads and processes the contract file from the provided URL using AI technology
• Required when Input Data Type is "URL"
https://abc.com/contract.pdf
Contract Name***StringContract Input Filename
• Specify the name of the input contract file with proper extension (.pdf, .png, .jpg, .jpeg)
• PDF4me uses this for format detection and AI processing optimization
contract.pdf

Output

Output Parameters

ParameterTypeDescriptionExample
partiesArrayPDF4me extracted contract parties - Array of contract parties with their details including names, addresses, reference names, and full descriptions extracted by AI technology[{"legalParty": "Santa Cruz County Regional Transportation Commission", "name": "Santa Cruz County Regional Transportation Commission", "address": "1523 Pacific Ave, Santa Cruz, CA 95060", "referenceName": "COMMISSION", "fullDescription": "SANTA CRUZ COUNTY REGIONAL TRANSPORTATION COMMISSION, a public agency, referred to as COMMISSION, with principal office at 1523 Pacific Ave, Santa Cruz, CA 95060."}]
executionDateStrStringPDF4me extracted execution date - The date when the contract was executed or signed, extracted and formatted by AI technology2024-01-15
effectiveDateStrStringPDF4me extracted effective date - The date when the contract becomes effective, extracted by AI-powered date recognition2024-02-01
expirationDateStrStringPDF4me extracted expiration date - The date when the contract expires or terminates, extracted by AI technology2025-01-31
contractDurationStringPDF4me extracted contract duration - The duration or term of the contract extracted by AI-powered text analysis12 months
jurisdictionObjectPDF4me extracted jurisdiction details - Object containing jurisdiction information including applicable laws, court location, and region extracted by AI technology{"jurisdictions": ["State of California"], "courtLocation": "Santa Cruz County Superior Court", "fullDescription": "This Agreement shall be construed under the laws of the State of California.", "region": "California"}
jobIdStringPDF4me processing job identifier - Unique identifier for the AI processing job, used for tracking and debugging purposes00000000-0000-0000-0000-000000000000
jobIdExtStringPDF4me external job identifier - External job identifier for integration with third-party systems, if applicablenull
successBooleanPDF4me AI extraction status indicator - Boolean flag indicating the success or failure of the AI-powered contract data extraction process. PDF4me returns true for successful extractions and false for any errorstrue
messageStringPDF4me AI extraction status message - Descriptive message indicating the result of the AI-powered contract data extraction process. PDF4me provides clear status messages for successful extractions and detailed error informationContract data extracted successfully using AI technology

N8N Action Response

The PDF4me AI-Process Contract API returns a JSON response with the following structure:

{
"parties": [
{
"legalParty": "ABC Technology Solutions Inc.",
"name": "ABC Technology Solutions Inc.",
"address": "123 Innovation Drive, San Francisco, CA 94105",
"referenceName": "COMPANY",
"fullDescription": "ABC TECHNOLOGY SOLUTIONS INC., a Delaware corporation, referred to as COMPANY, with principal office at 123 Innovation Drive, San Francisco, CA 94105."
},
{
"legalParty": "XYZ Consulting Services LLC",
"name": "XYZ Consulting Services LLC",
"address": "456 Business Park, Austin, TX 78701",
"referenceName": "CONSULTANT",
"fullDescription": "XYZ CONSULTING SERVICES LLC, a Texas limited liability company, referred to as CONSULTANT, with principal office at 456 Business Park, Austin, TX 78701."
}
],
"executionDateStr": "2024-01-15",
"effectiveDateStr": "2024-02-01",
"expirationDateStr": "2025-01-31",
"contractDuration": "12 months",
"jurisdiction": {
"jurisdictions": [
"State of California",
"United States"
],
"courtLocation": "San Francisco County Superior Court",
"fullDescription": "This Agreement shall be construed under the laws of the State of California and the United States.",
"region": "California"
},
"jobId": "87654321-4321-4321-4321-210987654321",
"jobIdExt": "CONTRACT-2024-001",
"success": true,
"message": "Contract data extracted successfully using AI technology"
}

Use Cases

  • Contract Management: Automate contract data entry and validation
  • Legal Document Processing: Streamline contract review and analysis
  • Compliance Monitoring: Track contract terms and obligations

AI-Powered Document Processing

  • Multi-Format Support: Process PDF, PNG, JPG, and JPEG contract formats
  • Multi-Language Processing: Extract data from contracts in various languages
  • Intelligent Field Recognition: Automatically identify and extract relevant legal fields

Business Intelligence and Analytics

  • Contract Analytics: Analyze contract terms and patterns
  • Risk Assessment: Identify potential legal risks and obligations
  • Performance Metrics: Track contract processing accuracy and efficiency

Get Help