Integration

Integration

Connect with Webhooks

Integrating Statement Flow Webhooks with Zapier

Overview

What you'll need: A Statement Flow account with Webhook access (available on Professional plans and higher). A Zapier account.

How it works

Common Use Cases: Automated Data Entry: Send document details and CSV/JSON URLs to a Google Sheet, Airtable, or CRM. Notifications: Get Slack, email, or SMS notifications when a document is processed, including direct links to the converted files. Cloud Storage Integration: Automatically save the converted CSV or JSON file to Dropbox, Google Drive, or OneDrive. Triggering Custom Scripts: Use the webhook to kick off custom scripts on your own servers to further process the data. This integration empowers you to seamlessly weave bank statement processing into your existing automated workflows, saving time and reducing manual effort.

Features

Step 1: Set up a "Catch Hook" Trigger in Zapier

  1. Log in to Zapier and click "Create Zap" from your dashboard.

  2. Choose your Trigger App: Search for and select "Webhooks by Zapier".

  3. Choose Trigger Event: Select "Catch Hook" and click "Continue".

  4. Customize Webhook: You'll be given a Webhook URL. This is the unique URL Zapier generates for your Zap. Copy this URL – you'll need it for Statement Flow.

  5. Test Trigger (Optional but Recommended): Click "Continue" and then "Test Trigger". Zapier will now wait for a test payload. You won't send one yet, but this puts Zapier in listening mode.

Step 2: Configure the Webhook in Statement Flow

  1. Log in to Statement Flow and navigate to your "Settings" page.

  2. Go to the "Webhooks" tab.

  3. Click the "Add Webhook" button.

  4. Paste the Zapier Webhook URL: In the "URL" field, paste the Webhook URL you copied from Zapier.

  5. Generate a Secret (Recommended): Statement Flow will automatically generate a secret for your webhook. This secret is essential for verifying that incoming webhooks truly originate from Statement Flow, adding an extra layer of security. Copy this secret if you plan to implement signature verification in Zapier (advanced).

  6. Save the Webhook: Click "Add Webhook" (or "Save Changes" if editing).

Step 3: Trigger a Test Event in Statement Flow

Now that Zapier is listening and Statement Flow knows where to send webhooks, let's send a test:

  1. In Statement Flow, go to the "Upload" page and upload a small bank statement document (or process an existing one if available).

  2. Wait for the document to finish processing and its status to show as "Parsed".

  3. Statement Flow will automatically send a webhook payload to your Zapier URL.

Step 4: Confirm Payload in Zapier and Understand the Data Structure

  1. Back in Zapier, click "Test Trigger" again. Zapier should now successfully catch the hook and display the payload it received from Statement Flow.

  2. Review the Payload Structure: Statement Flow sends a JSON payload with the following structure:

    {
      "event_type": "document_parsed",
      "timestamp": "YYYY-MM-DDTHH:MM:SSZ",
      "document": {
        "id": "doc_unique_id",
        "created_date": "YYYY-MM-DDTHH:MM:SSZ",
        "created_by": "user@example.com",
        "original_filename": "example_statement.pdf",
        "source_file_url": "https://url-to-original-file",
        "csv_url": "https://url-to-converted-csv",
        "json_url": "https://url-to-converted-json",
        "file_type": "pdf",
        "page_count": 5,
        "credits_charged": 5,
        "status": "parsed",
        "completed_at": "YYYY-MM-DDTHH:MM:SSZ"
      },
      "summary": {
        "total_transactions": 100,
        "total_amount_in": 1234.56,
        "total_amount_out": -789.01,
        "transaction_ids": ["txn_1", "txn_2", "...", "txn_100"] // List of IDs of the transactions created
      }
    }
    • document: This is the most important part, containing all details about the converted bank statement, including URLs to the generated CSV and JSON files.

    • summary: Provides high-level statistics about the transactions within the document.

  3. Using Zapier's "Child Key" Feature:

    • If you want Zapier to treat the document object as the primary data for your Zap (which is common), you can specify "document" as the "Child Key" in your Webhooks by Zapier trigger settings (under "Customize Request"). This will make all fields within document directly accessible (e.g., original_filename, csv_url).

    • If you leave the "Child Key" blank, you'll need to reference fields as document__original_filename, document__csv_url, etc., in subsequent Zap steps.

Step 5: Set up your Action Steps in Zapier

  1. Choose your Action App: After successfully receiving the test payload, click "Continue" to set up your action step.

  2. Select Action Event: Choose the app and event you want (e.g., "Google Sheets: Create Spreadsheet Row").

  3. Customize Action: Map the data fields from the Statement Flow webhook to the fields in your action app.

    • For example, you could map document__original_filename to a "Document Name" column in Google Sheets, or document__csv_url to a "CSV Link" column.

  4. Test Action: Test your action to ensure it works as expected.

  5. Turn on your Zap!


Your scrollable content goes here