Get started with Docaflex in minutes. This guide will walk you through the basic steps to create your first document automation workflow.
Start by creating a new document template. You can either:
// Example using our API
const template = await docaflex.createTemplate({
name: "Invoice Template",
type: "document",
source: "natural-language",
description: "Create an invoice with company logo, itemized list, and total calculation"
});
Connect your data source to populate the template automatically:
// Example database connection
const connection = await docaflex.connectDatabase({
type: "postgresql",
host: "your-database-host",
name: "your-database-name",
auth: {
username: "your-username",
password: "your-password"
}
});
Create an automated workflow for your document:
// Example workflow configuration
const workflow = await docaflex.createWorkflow({
name: "Invoice Approval",
steps: [
{
type: "generate",
templateId: "invoice-template",
trigger: "on-form-submit"
},
{
type: "approve",
assignee: "finance-manager",
timeout: "24h"
},
{
type: "sign",
provider: "docusign",
signers: ["customer-email"]
}
]
});
Test your workflow and deploy it to production:
// Example deployment
const deployment = await docaflex.deployWorkflow({
workflowId: "invoice-approval",
environment: "production",
version: "1.0.0",
rollback: true
});
Now that you've created your first workflow, explore our detailed guides to learn more about: