ml-connector
Microsoft Dynamics 365 F&OSlack

Microsoft Dynamics 365 F&O and Slack integration

Microsoft Dynamics 365 F&O runs the finance, procurement, and supply chain records, and Slack is where the people who need to act on them already work. This connection turns Dynamics business events, such as a vendor invoice awaiting approval or a confirmed purchase order, into clear Slack messages routed to the right channel or person. Approvers can act from an interactive Block Kit card, and the click is written straight back to the matching record in Dynamics. Slack holds no invoices, purchase orders, or ledger entries, so it stays the notification and approval surface while Dynamics remains the system of record.

How Microsoft Dynamics 365 F&O works

Microsoft Dynamics 365 F&O exposes vendors, purchase orders, vendor invoices, customers, main accounts, journal entries, payment journal lines, and financial dimensions as OData v4 entities at a tenant-specific host such as contoso.operations.dynamics.com/data. Calls authenticate with an OAuth 2.0 bearer token obtained through Microsoft Entra ID client credentials, scoped to that environment host. Outbound activity is delivered by the Business Events framework, which posts a lightweight JSON payload to an HTTPS endpoint when an action like an invoice posting or a workflow step completes. Those payloads carry identifiers and a ControlNumber, not full records, so the connector calls back to OData for detail.

How Slack works

Slack exposes its workspace through the Slack Web API at https://slack.com/api, where methods like chat.postMessage, conversations.list, and users.lookupByEmail use a bot token with the xoxb- prefix obtained via OAuth 2.0. Messages can be plain text or rich Block Kit blocks, including buttons. The Events API pushes workspace activity and interactive actions to your HTTPS endpoint as signed HTTP POST callbacks that must be answered within three seconds, with each request verified by an HMAC-SHA256 signature computed from the signing secret. Slack is a communication platform, so it has no native invoice, purchase order, vendor, or general ledger objects.

What moves between them

The primary flow runs from Microsoft Dynamics 365 F&O into Slack. When a Business Event fires for a posted or pending vendor invoice, a confirmed purchase order, a posted payment, or a completed workflow step, ml-connector reads the full record over OData and posts it to Slack as a message or an interactive Block Kit card in the channel or direct message that matches the document. The reverse flow is narrow because Slack stores no finance data: an approver tapping a button on a card sends a verified interaction to ml-connector, which writes the result back to the corresponding Dynamics workflow or journal record over OData. User identity flows as needed so a Dynamics worker resolves to the correct Slack person.

How ml-connector handles it

ml-connector stores both credential sets encrypted. For Dynamics it requests an Entra ID client credentials bearer token scoped to the environment host and refreshes it before the roughly one-hour expiry, and it treats the tenant host as a credential field because there is no shared base URL. It registers an HTTPS Business Events endpoint and deduplicates on the ControlNumber, since delivery order is not guaranteed and the same event can arrive more than once, then calls OData to fetch the full record the stub event only references. To reach a person it maps a Dynamics worker email to a Slack user with users.lookupByEmail and posts with chat.postMessage, always including a plain text fallback alongside Block Kit blocks. Inbound Slack interactions are verified with the HMAC-SHA256 signature and the five-minute timestamp check, acknowledged within Slack's three-second window by queuing the work, and deduplicated by event_id before the OData writeback runs. Writes respect Dynamics limits: a posted invoice is read-only, so approvals act through workflow or journal entities rather than editing posted documents, and the connector must specify full OData entity keys and the configured financial dimension format. It honors HTTP 429 with Retry-After on both sides, including Slack's one-message-per-second channel limit, with automatic retries, a full audit trail, and error replay.

A real-world example

A mid-sized distributor with about 600 employees runs Microsoft Dynamics 365 F&O for procurement and accounts payable, with department managers who rarely log into the ERP but live in Slack all day. Vendor invoices and purchase order confirmations used to sit in the Dynamics approval queue for days because approvers did not notice the workflow tasks, which delayed payments and held up receiving. With the integration, each pending invoice or confirmed PO posts as a Block Kit card in the relevant Slack channel the moment its business event fires, showing the vendor, amount, and dimensions, and the manager approves or rejects in place. The decision writes back to the Dynamics workflow over OData, so approvals happen in hours instead of days and the audit trail stays in the ERP.

What you can do

  • Post Microsoft Dynamics 365 F&O vendor invoice, purchase order, payment, and workflow business events into Slack as messages or Block Kit cards.
  • Route each notification to the right Slack channel or direct message by resolving a Dynamics worker email with users.lookupByEmail.
  • Write Slack approval and rejection button clicks back to the matching Dynamics workflow or journal record over OData.
  • Bridge Entra ID client credentials on the Dynamics side and a Slack bot token, verifying every inbound Slack request by HMAC-SHA256.
  • Acknowledge Slack events within three seconds, deduplicate by ControlNumber and event_id, and retry on 429 with a full audit trail.

Questions

Which direction does data move between Microsoft Dynamics 365 F&O and Slack?
The main flow is Dynamics into Slack. Business events for vendor invoices, purchase orders, payments, and workflow steps are read in full over OData and posted to Slack as messages or interactive cards. The only reverse flow is a button click on a Slack card, which ml-connector writes back to the matching Dynamics workflow or journal record, because Slack stores no finance data of its own.
Can people approve a Dynamics invoice from inside Slack?
Yes, through interactive Block Kit buttons. When an approver taps Approve or Reject, Slack posts a signed interaction to ml-connector, which verifies the HMAC-SHA256 signature and timestamp, acknowledges within the three-second window, then updates the corresponding Dynamics workflow record over OData. Posted invoices are read-only in OData, so the writeback acts through workflow or journal entities rather than editing a posted document.
How does the integration get events out of Dynamics 365 F&O and into Slack reliably?
Dynamics pushes through the Business Events framework, which sends a lightweight JSON payload to an HTTPS endpoint carrying identifiers and a ControlNumber rather than the full record. ml-connector deduplicates on that ControlNumber, since order is not guaranteed and events can repeat, then calls OData to fetch the complete record before posting to Slack. Outbound Slack posts respect the one-message-per-second channel limit and retry on a 429 Retry-After.

Related integrations

Connect Microsoft Dynamics 365 F&O and Slack

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

Get started