# PAI Webhooks Setup Guide Webhooks in PAI allow you to automatically send data to external systems when specific events occur in your projects. This enables powerful integrations with tools like Zapier, accounting software, project management systems, and custom applications. ## Available Webhook Triggers PAI offers the following webhook triggers: ### Project Events - **Project Approved**: Fires when a project estimate reaches "Approved" status - **Estimate Stage Updated**: Triggers when an estimate's status changes (Draft, Internal Review, Sent, etc.) ### Invoice Events - **Invoice Submitted**: Fires when a vendor submits an invoice through the vendor portal - **Invoice Approved**: Triggers when you approve a vendor invoice - **Invoice Changes Requested**: Fires when you reject an invoice and request changes - **Invoice Payment Date Set**: Triggers when you schedule a payment date for an invoice - **Invoice Paid**: Fires when an invoice is marked as paid ## Setting Up Webhooks ### Step 1: Access Webhook Settings 1. Navigate to [[Organization Settings]] in PAI 2. Look for the **Webhooks** section 3. Click to add a new webhook ### Step 2: Configure Your Webhook 1. **Select Trigger**: Choose from the dropdown menu which event should trigger the webhook 2. **Enter Webhook URL**: Paste your destination URL (see recommendations below) 3. **Click "Add"** to save the webhook ## Recommended Integration: Zapier We highly recommend using **Zapier webhooks** as your webhook URL destination. Zapier provides: - **Easy Setup**: No coding required - **Multiple Integrations**: Claimed up to 5,000+ apps - **Data Transformation**: Modify webhook data before sending to other systems - **Error Handling**: Built-in retry logic and error notifications ### Setting Up a Zapier Webhook 1. **Create a Zapier Account** at zapier.com 2. **Create a New Zap**: - Trigger: Choose "Webhooks by Zapier" - Event: Select "Catch Hook" 3. **Copy the Webhook URL** that Zapier provides 4. **Paste this URL** into PAI's webhook configuration 5. **Test the Connection** by triggering an event in PAI 6. **Add Action Steps** in Zapier to process the webhook data ## Common Use Cases ### Accounting Integration - **Trigger**: Invoice Approved - **Action**: Create invoice in QuickBooks/Xero - **Benefit**: Automatic accounting entries ### Project Management - **Trigger**: Project Approved - **Action**: Create project in Monday.com/Asana - **Benefit**: Seamless project kickoff ### Client Communications - **Trigger**: Estimate Stage Updated - **Action**: Send email notification via Gmail/Outlook - **Benefit**: Keep clients informed automatically ### Financial Tracking - **Trigger**: Invoice Paid - **Action**: Update spreadsheet in Google Sheets - **Benefit**: Real-time financial reporting ## Troubleshooting #### Webhook Not Firing - Verify the trigger event is correctly selected - Check that the webhook URL is accessible and returns 200 status - Ensure the event actually occurred in PAI (check project/invoice status) #### Data Missing - Review the webhook payload structure - Check if additional data mapping is needed in Zapier #### Connection Issues - Test the webhook URL independently (using tools like Postman) - Check for SSL/TLS certificate issues - Verify firewall settings aren't blocking the connection ### Support For additional webhook support: - Contact PAI support at [email protected] or view our [[Help & Support]] page. © 2025 PAI Tech, Inc. [paihq.com](https://www.paihq.com/)