Event-Driven Architecture with FileMaker
ExpertDesign event-driven integration patterns where FileMaker publishes change events and external systems react, using script triggers, webhooks, and an event bus.
What you'll learn
- How to publish events from FileMaker using script triggers and Insert from URL
- How to use an event bus (Redis Pub/Sub or a simple queue) to distribute events
- How to design event payloads that include enough context for consumers
- How to handle event ordering and deduplication
In a polling-based integration, external systems ask FileMaker "what changed?" on a schedule. In an event-driven integration, FileMaker tells external systems "something changed" the moment it happens. The latter is faster, more scalable, and easier to reason about. FileMaker's script triggers and Insert from URL make it possible to publish events from the database itself.
Event publishing from FileMaker scripts
Attach an OnRecordCommit or OnObjectSave trigger to call a script that POSTs an event to your event bus endpoint. Include record ID, event type, and key field values in the payload.
// Script: PublishRecordEvent (triggered by OnRecordCommit)
Set Variable [ $event ; Value:
JSONSetElement ( "{}" ;
["eventType" ; "contact.updated" ; JSONString] ;
["recordId" ; Get ( RecordID ) ; JSONString] ;
["timestamp" ; Get ( CurrentTimestamp ) ; JSONString] ;
["Name" ; Contacts::Name ; JSONString] ;
["Status" ; Contacts::Status ; JSONString]
)
]
Set Variable [ $opts ; Value:
"--request POST" &
" --header "Content-Type: application/json"" &
" --header "Authorization: Bearer " & $eventBusToken & """ &
" --data " & Quote ( $event ) &
" --max-time 3"
]
Insert from URL [ Select ; With dialog: Off ; Target: $result ; "https://events.yourapp.com/ingest" ; cURL options: $opts ]Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo