Azure Functions
Send data to an Azure Functions HTTP trigger endpoint. Use Zeotap to push audience data, model results, or enriched profiles to your custom Azure Functions for serverless processing, transformation, or downstream routing.
Prerequisites
- An Azure account with an active subscription
- An Azure Functions app with at least one HTTP trigger function deployed
- The function URL and an appropriate authentication key (function key, API key, or Azure AD token)
Authentication
Azure Functions supports three authentication methods. Choose the one that matches your function’s authorization level.
Function Key (Default)
This is the most common method for Azure Functions. The function key is appended as a code query parameter.
- In the Azure Portal, navigate to your Function App
- Select your function and click Function Keys (or App Keys for host-level keys)
- Copy the default key or create a new one
- In Zeotap, select Function Key as the auth method and paste the key
API Key
Use this method when your function expects an API key in the x-functions-key header.
- Obtain your API key from the Azure Portal or your function’s configuration
- In Zeotap, select API Key as the auth method
- Paste the API key value
Bearer Token
Use this method when your function is protected by Azure Active Directory (Azure AD) authentication.
- Register an application in Azure AD and configure your function app to require authentication
- Obtain an access token for the registered application
- In Zeotap, select Bearer Token as the auth method
- Paste the access token
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Function URL | Text | Yes | The full URL of your Azure Functions HTTP trigger endpoint (e.g., https://my-app.azurewebsites.net/api/my-function) |
| HTTP Method | Select | No | HTTP method to use: POST (default), PUT, or PATCH |
Supported Operations
Sync Modes
| Mode | Supported |
|---|---|
| Insert | Yes |
| Upsert | Yes |
| Update | — |
| Mirror | — |
Audience Sync Modes
| Mode | Supported |
|---|---|
| Add | Yes |
| Remove | Yes |
| Mirror | Yes |
| Upsert | Yes |
Features
- Field Mapping: Yes — map source columns to destination field names sent in the payload
- Schema Introspection: No — Azure Functions accept arbitrary JSON payloads
How It Works
Zeotap sends data to your Azure Functions endpoint as JSON HTTP requests:
- Rows are collected into a batch and serialized as a JSON payload
- The payload includes a
sync_modefield and an array ofrows, each containingdata,operation, andprimary_key - Authentication is applied based on the selected method (query parameter, header, or bearer token)
- Sync metadata is included as HTTP headers (
X-Sync-Mode,X-Batch-Size) for routing without body parsing - Your function processes the payload and returns an HTTP status code
Payload Format
{
"sync_mode": "upsert",
"rows": [
{
"data": {
"email": "user@example.com",
"name": "Jane Doe",
"segment": "high_value"
},
"operation": "added",
"primary_key": "user@example.com"
}
]
}HTTP Headers
| Header | Description |
|---|---|
Content-Type | Always application/json |
X-Sync-Mode | The sync mode for this batch (e.g., upsert, insert) |
X-Batch-Size | Number of rows in the batch |
x-functions-key | API key (when using API Key auth) |
Authorization | Bearer token (when using Bearer Token auth) |
Rate Limits
Azure Functions rate limits depend on your hosting plan:
- Consumption plan: 100 concurrent executions per function app (default), up to 200
- Premium plan: Configurable, typically higher limits
- Dedicated plan: Based on the App Service plan tier
If your function returns HTTP 429 (Too Many Requests), Zeotap will report the error. Consider scaling your function app or reducing sync frequency if you encounter rate limit errors.
Best Practices
- Use function-level keys rather than host keys for least-privilege access
- Return descriptive error messages in your function’s HTTP response body — Zeotap surfaces these in sync run logs
- Set appropriate timeouts in your function configuration to match expected processing time for batch sizes
- Use the
operationfield in the payload to handle inserts, updates, and deletes differently in your function logic - Monitor with Application Insights to track function invocations, failures, and latency
- Consider using a Premium or Dedicated plan for high-volume syncs to avoid cold start latency
Troubleshooting
Authentication failed (HTTP 401 or 403)
Verify your function key, API key, or bearer token is correct and not expired. For function keys, check that you are using the correct key level (function vs. host). For Azure AD tokens, ensure the token has not expired and has the correct audience claim.
Function not found (HTTP 404)
Check that the function URL is correct and the function is deployed. Verify the function app name and function name in the URL match your Azure deployment. Ensure the function app is running and not in a stopped state.
Request timeout
Azure Functions on the Consumption plan have a default timeout of 5 minutes. If your function takes longer to process a batch, consider using a Premium or Dedicated plan with a longer timeout, or reduce the batch size in your sync configuration.
Cold start latency
Functions on the Consumption plan may experience cold starts after periods of inactivity, leading to higher latency for the first batch. Use a Premium plan with always-ready instances to avoid cold starts, or configure a warm-up trigger.
HTTP 500 Internal Server Error
This indicates an error in your function code. Check your function’s Application Insights or log stream in the Azure Portal for detailed error messages. Common causes include unhandled exceptions, missing dependencies, or configuration issues.
Payload too large (HTTP 413)
Azure Functions has a default request size limit of 100 MB. If your batch exceeds this limit, reduce the number of rows per batch in your sync configuration. For very large payloads, consider using Azure Blob Storage as an intermediary.