FreshBooks and Stampli integration
FreshBooks manages your accounting and bills. Stampli automates accounts payable approval workflows and vendor management. Connecting the two means your bills created in FreshBooks flow directly into Stampli's capture and approval pipeline without manual data entry. Vendors and bill details are passed through to keep your AP workflows aligned with your source accounting system, and reconciliation is audited at every step.
What moves between them
Bills and bill vendors created or updated in FreshBooks flow into Stampli through two paths. First, ml-connector receives FreshBooks webhook events (bill.create, bill.update, bill_vendor.create, bill_vendor.update) and immediately writes corresponding CSV records to Stampli's SFTP inbound directory. Second, ml-connector polls FreshBooks periodically to catch any bills that may not have triggered webhooks or had delays, and pushes them to Stampli. Bill payments flow from FreshBooks to Stampli as separate records to keep AP execution status synchronized. ml-connector polls Stampli's outbound directory to read exported invoice confirmations and payment status files, then stores these records in audit logs for downstream reconciliation with FreshBooks payments. The flow is unidirectional from FreshBooks to Stampli; Stampli does not write back to FreshBooks accounting.
How ml-connector handles it
ml-connector stores both FreshBooks OAuth 2.0 credentials and Stampli SFTP credentials encrypted in the database. On the FreshBooks side, it registers a webhook endpoint with your FreshBooks account and listens for bill and vendor events, extracting account_id and business_id from each payload to retrieve the correct account context. When a webhook event arrives or during a polling cycle, ml-connector fetches the full bill or vendor record via REST, formats it into a CSV file matching Stampli's required schema (Invoice, Vendor, or Payment rows), and transfers the file to Stampli's SFTP inbound directory with a unique filename to prevent collision. ml-connector implements deduplication by tracking the source FreshBooks bill_id and vendor_id, so re-transmitted webhooks or duplicate polling cycles do not create duplicate records in Stampli. On the reconciliation side, ml-connector polls Stampli's SFTP outbound directory on a configurable interval (default 15 minutes) to detect and download invoice capture confirmations and payment export files, parsing them to extract Stampli reference IDs and status, and storing these as linked audit records tied back to the original FreshBooks bill. If a file transfer to Stampli fails, ml-connector retries with exponential backoff and logs the failure so you can review and re-trigger manually. FreshBooks webhook timeout is 10 seconds, and persistent webhook failures disable the callback, so ml-connector also runs periodic polling as a safety net to catch any events that were lost.
A real-world example
A mid-sized professional services firm uses FreshBooks to manage client invoicing and expense reimbursements, and uses Stampli to automate AP approval workflows and vendor payment processing. Before the integration, the accounts payable team received bills in FreshBooks but had to manually export them, re-enter vendor details, and upload them into Stampli for approval workflows. The process was error-prone and introduced a two-day lag between bill receipt and workflow entry. With FreshBooks and Stampli connected, bills created in FreshBooks automatically appear in Stampli's approval queue within minutes, approval workflows execute immediately, and payment records flow back to FreshBooks for reconciliation. The manual re-entry step is eliminated, AP cycles are compressed, and bill data is never duplicated.
What you can do
- Automatically capture bills and vendors from FreshBooks and deliver them to Stampli via SFTP in the correct CSV format.
- Eliminate duplicate bill entries by deduplicating on FreshBooks bill ID and vendor ID, even if webhooks fire multiple times.
- Receive FreshBooks webhook events in real time and supplement with polling to catch missed bills from webhook delays or failures.
- Reconcile bill payments from FreshBooks with payment export files from Stampli and track status through a full audit trail.
- Poll Stampli's SFTP outbound directory on a configurable schedule to detect approval status updates and store them linked to the source bills for downstream reporting.
Questions
- How does ml-connector move bills from FreshBooks to Stampli when Stampli has no public API?
- ml-connector uses Stampli's file-based SFTP integration. When a bill event fires in FreshBooks, ml-connector fetches the full bill and vendor details via FreshBooks REST API, formats them into a CSV file matching Stampli's schema, and delivers the file to Stampli's SFTP inbound directory. ml-connector also polls both systems on a schedule to catch any events that webhooks may have missed, ensuring no bills are lost.
- Does the integration create duplicate bills in Stampli if a FreshBooks webhook fires twice?
- No. ml-connector deduplicates on the FreshBooks bill ID and vendor ID. If the same bill is seen multiple times via webhook retries or polling overlap, ml-connector recognizes the duplicate and skips it, so Stampli never receives the same bill twice. The deduplication state is stored in an audit log.
- How does ml-connector handle the lack of real-time Stampli webhooks?
- ml-connector polls Stampli's SFTP outbound directory on a configurable interval (default every 15 minutes) to detect approval status updates and payment export files. This polling-based approach ensures that approval confirmations and payment records are captured and reconciled with the source FreshBooks bills, providing a complete audit trail even without Stampli webhooks.
Related integrations
More FreshBooks integrations
Other systems that connect to Stampli
Connect FreshBooks and Stampli
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started