This workflow automates document conversion and management, processing PDFs, images, Office files, and text using AI for text extraction, OCR, and data organization. Key nodes include Webhook for document input, Condition for security and input validation, Set for data sanitization, Switch for document type routing, AI Agent for processing, Google Sheets for audit logging, Email Send for notifications, and Webhook Response for output. It ensures GDPR compliance and secure data handling. To set up, download n8n from n8n.io for self-hosting or sign up at cloud.n8n.io. Obtain an OpenAI API key from platform.openai.com under API Keys. Get Google Sheets API credentials from console.cloud.google.com under APIs & Services > Credentials (OAuth 2.0 Client ID). Configure SMTP credentials for email (e.g., Gmail SMTP: smtp.gmail.com, port 587) via your email provider’s settings. In n8n, add these under Credentials > Add Credential > OpenAI API, Google Sheets OAuth2 API, and SMTP. Import the workflow JSON via Workflows > Import. Configure the Webhook node (path: /document-conversion-management, method: POST) with CORS headers (Access-Control-Allow-Origin: *). Use ngrok for local webhook testing (e.g., ngrok http 5678). Ensure HTTPS in the Condition node for secure transmission. Test by sending a POST request to the webhook with JSON (e.g., {document: 'base64-encoded-data', documentName: 'invoice.pdf', documentId: 'DOC123'}). Include headers (x-api-key, x-document-authorization). Validate output in the Set node for devHubConnectDocumentResponse (e.g., success: true, documentInformation.documentId = 'DOC123'). Handle errors like invalid API keys (401 response with 'DOCUMENT_SECURITY_VALIDATION_FAILED') or missing document data (400 response with 'INVALID_DOCUMENT_INPUT'). For issues, verify HTTPS, OpenAI key, and Google Sheets ID. Deploy by saving and enabling the workflow. Test with a sample document to confirm processing, database storage, and email notifications. Check Webhook Response for processingResults (e.g., aiProcessingCompleted: true). If processing fails, verify node connections, AI model settings, and credentials in n8n’s editor.
$6.99
Workflow steps: 20
Integrated apps: webhook, manualTrigger, if