ml-connector
FreshBooksSlack

FreshBooks and Slack integration

FreshBooks handles accounting and invoicing for small businesses. Slack is where your team works. Connecting them brings real-time visibility into cash flow and financial activity without leaving Slack. Invoice creation, payment arrival, bill posting, and expense submission trigger instant channel messages so the business team stays aligned without polling dashboards or checking email.

How FreshBooks works

FreshBooks exposes invoices, payments, bills, expenses, clients, chart of accounts, and items through a REST API at https://api.freshbooks.com, organized into Accounting and Time-Tracking namespaces using account IDs and business UUIDs. It uses user-delegated OAuth 2.0 Authorization Code flow, not Client Credentials, so each credential set is tied to a specific FreshBooks user account. FreshBooks delivers real-time webhook events (invoice.create, invoice.update, payment.create, bill.create, expense.create, and many others) as POST payloads to a customer-supplied endpoint, signed with HMAC-SHA256. Webhooks are reliable but not guaranteed real-time, with occasional delays of seconds to minutes, and failed deliveries trigger retries until persistent failure disables the callback.

How Slack works

Slack exposes users, conversations (channels and direct messages), messages, files, and team metadata through the Slack Web API at https://slack.com/api/{method}, using OAuth 2.0 tokens (bot token with xoxb- prefix, optionally paired with a user token xoxp- prefix). All requests use HTTPS with tokens passed via Bearer header. Slack also offers the Events API for inbound webhook delivery of workspace activity (user joins, message posts, reactions), with HMAC-SHA256 signature verification on every payload and a 3-second response window. Tokens are non-expiring unless revoked, making session management simple. Rate limits apply per endpoint (chat.postMessage allows 1 per second per channel), and Slack enforces timestamp verification (payloads more than 5 minutes old are rejected).

What moves between them

Financial events from FreshBooks flow into Slack one direction. Invoice creation, update, payment receipt, bill posting, and expense submission trigger Slack messages posted to designated channels, such as accounting or finance-audit. Message content includes the key financial details (amount, client or vendor name, invoice number, status) extracted from the FreshBooks webhook payload. The mapping rule is defined per customer (e.g., invoices over 5000 go to exec-alerts, all bills go to accounting-team), and ml-connector enforces it on every webhook received.

How ml-connector handles it

ml-connector subscribes to FreshBooks webhooks (invoice, payment, bill, expense events) on your behalf and translates each event to a Slack message. FreshBooks sends the webhook with an HMAC-SHA256 signature; ml-connector verifies it before processing. The Slack OAuth token is stored encrypted and used with the chat.postMessage method to post messages to the target channel, respecting Slack's 1-per-second rate limit with backoff. Amount thresholds and event type filters are configured per customer (e.g., only post invoices above a certain threshold, skip internal expenses), and every message posted is logged in the audit trail with the original FreshBooks payload and the Slack message timestamp. If a Slack call fails transiently, ml-connector retries with exponential backoff; if it fails persistently, the record is queued for replay so no notification is lost.

A real-world example

A small services firm uses FreshBooks for accounting and Slack for team coordination. Before the integration, the accounting manager sent manual Slack alerts to the team when invoices were sent or payments arrived, or team members had to ask about cash flow status. With FreshBooks and Slack connected, each invoice send, payment receipt, and bill posting appears instantly in the accounting channel with key details (client name, amount, invoice number), and high-value invoices also trigger an alert in the exec-alerts channel. The team stays informed without manual notification, and the audit log shows when each financial event was posted.

What you can do

  • Post FreshBooks invoices, payments, bills, and expenses to Slack channels with configurable routing by event type and amount threshold.
  • Verify FreshBooks webhook signatures and Slack message delivery, storing both audit records encrypted.
  • Map financial events to channel names per customer so invoices, payments, and bills land on the right team.
  • Handle Slack rate limits and FreshBooks webhook retries so notifications arrive reliably without message loss.
  • Search and replay failed Slack posts from the audit trail if a channel or token change requires redelivery.

Questions

Which financial events from FreshBooks can be posted to Slack?
ml-connector supports invoice creation and updates, payment receipts, bill posting, bill updates, expense creation, and expense updates. Each event type can be filtered by amount threshold and routing rule, so you can post high-value invoices to exec alerts and all bills to accounting-team.
Does ml-connector verify FreshBooks webhook signatures?
Yes. FreshBooks signs every webhook with HMAC-SHA256 via the X-FreshBooks-Hmac-SHA256 header. ml-connector verifies the signature before processing any event, ensuring the webhook came from FreshBooks and has not been altered.
What happens if a Slack message fails to post?
ml-connector retries the Slack call with exponential backoff. If the call fails persistently, the record is stored in the audit trail and can be replayed manually or retried automatically when the channel or token is fixed, so no notification is permanently lost.

Related integrations

Connect FreshBooks and Slack

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started