Azure Functions Documentation

Triggers & Bindings Overview

Azure Functions can be invoked by a variety of triggers and can interact with external resources via bindings. Triggers start the execution of a function, while bindings provide declarative data input and output without writing integration code.

HTTP Trigger

Invokes a function via an HTTP request.

{
  "bindings": [
    {
      "type": "httpTrigger",
      "direction": "in",
      "authLevel": "function",
      "methods": ["get","post"]
    },
    {
      "type": "http",
      "direction": "out"
    }
  ]
}

Timer Trigger

Runs on a schedule defined with a CRON expression.

{
  "bindings": [
    {
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 */5 * * * *"
    }
  ]
}

Blob Trigger

Executes when a new or updated blob is detected.

{
  "bindings": [
    {
      "type": "blobTrigger",
      "direction": "in",
      "path": "samples-workitems/{name}",
      "connection": "AzureWebJobsStorage"
    },
    {
      "type": "blob",
      "direction": "out",
      "name": "outputBlob",
      "path": "processed/{name}",
      "connection": "AzureWebJobsStorage"
    }
  ]
}

Queue Trigger

Invoked when a new message appears in an Azure Queue.

{
  "bindings": [
    {
      "type": "queueTrigger",
      "direction": "in",
      "name": "msg",
      "queueName": "myqueue-items",
      "connection": "AzureWebJobsStorage"
    }
  ]
}

Event Grid Trigger

React to events from Azure Event Grid.

{
  "bindings": [
    {
      "type": "eventGridTrigger",
      "direction": "in",
      "name": "event"
    }
  ]
}

Cosmos DB Trigger

Runs when changes occur in a Cosmos DB container.

{
  "bindings": [
    {
      "type": "cosmosDBTrigger",
      "direction": "in",
      "name": "documents",
      "databaseName": "mydb",
      "collectionName": "mycoll",
      "connectionStringSetting": "CosmosDBConnection",
      "leaseCollectionName": "leases"
    }
  ]
}

Input Bindings

Binding TypeDirectionTypical Uses
blobinRead from a blob storage file
queueinRead a message from a queue
cosmosDBinRetrieve a document by id
httpinAccess request metadata

Output Bindings

Binding TypeDirectionTypical Uses
bloboutWrite data to a blob
queueoutPlace a message onto a queue
cosmosDBoutInsert or update a document
signalRoutSend real‑time messages

Sample Functions

Explore the repo for complete function samples: