Azure Functions: Bindings and Triggers
What You'll Learn
You'll learn how Azure Functions uses bindings and triggers to connect your code declaratively to Azure services without writing integration boilerplate.
Core Concept
In Azure Functions, triggers define how a function starts, while bindings define what data flows in and out.
Think of it like a smart mailbox: the trigger is the sensor that detects new mail arrival (starting your function), and bindings are the automated sorting system that places incoming mail on your desk and takes outgoing mail to the post office—all without you walking to the mailbox yourself.
Triggers
Every Azure Function has exactly one trigger that starts execution. Common trigger types include:
- HTTP triggers - Respond to web requests
- Timer triggers - Run on a schedule
- Queue triggers - React to messages in Azure Storage Queues or Service Bus
- Blob triggers - Execute when files are added/modified
- Event Hub/Event Grid triggers - Process streaming events
Bindings
Bindings are optional and declarative. They automatically handle connecting to services, reading input data, and writing output data. You can have multiple input and output bindings per function.
Input bindings inject data into your function (like reading from a database).
Output bindings send data from your function (like writing to storage).
The power is in the configuration—you declare bindings in function.json or via attributes in code, and Azure handles authentication, connection management, and data serialization automatically.
This declarative integration pattern means less plumbing code and faster development focused on business logic rather than infrastructure connections.
Key Takeaway:
Triggers start function execution (one per function), while bindings declaratively handle input/output integration with Azure services, eliminating manual connection code and letting you focus on core logic.