{
    "name": "Invoice Data Extraction to ERP",
    "flow": [
        {
            "id": 1,
            "module": "webhooks:Custom",
            "version": 1,
            "parameters": {},
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "name": "Incoming Email Attachment"
            }
        },
        {
            "id": 2,
            "module": "openai:actionChatCompletion",
            "version": 1,
            "parameters": {},
            "mapper": {
                "model": "gpt-4o",
                "messages": [
                    {
                        "role": "system",
                        "content": "You are a highly precise accounting data extraction assistant. Read the invoice and extract to valid JSON. Required: vendor_name, invoice_number, date_issued, total_amount, line_items."
                    },
                    {
                        "role": "user",
                        "content": "Extract data from this file: {{1.data}}"
                    }
                ]
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "name": "GPT-4o Vision Extraction"
            }
        },
        {
            "id": 3,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {},
            "mapper": {
                "json": "{{2.choices[1].message.content}}"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "name": "Validate & Parse JSON"
            }
        },
        {
            "id": 4,
            "module": "quickbooks:ActionCreateAnInvoice",
            "version": 1,
            "parameters": {},
            "mapper": {
                "Vendor": "{{3.vendor_name}}",
                "TotalAmt": "{{3.total_amount}}",
                "LineItems": "{{3.line_items}}"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "name": "Push to QuickBooks ERP"
            }
        }
    ],
    "metadata": {
        "version": 1,
        "description": "Blueprint generated by PremiumAIGuide.com"
    }
}