• /
  • EnglishEspañolFrançais日本語한국어Português
  • EntrarComeçar agora

Invoke an Azure Function

The Azure Functions Invoke action lets you call any HTTP-triggered Azure Function directly from your workflows. It provides a supported, validated interface for invoking Azure Functions — with typed inputs, URL validation, and secret-backed authentication — rather than constructing raw HTTP calls.

Invoke an Azure Function

This action sends an HTTP request to an Azure Function endpoint and returns the response. Authentication uses Azure's function key mechanism; the workflow passes it as the x-functions-key header.

The following fields configure the Azure Function request.

Input fieldOptionalityTypeDescription
functionRequiredStringFull HTTPS URL of the Azure Function HTTP trigger endpoint. For example, "https://myapp.azurewebsites.net/api/MyFunction".
keyOptionalStringA function-level or host-level API key for authentication. The workflow sends it as the x-functions-key header. Pass as a secret.
methodRequiredStringHTTP method to use. One of "GET", "POST", "PUT", "DELETE", "PATCH". Defaults to "POST".
bodyOptionalStringRequest body as a JSON string. Applies only when method is not GET or HEAD. Accepts secret references.
headersOptionalMapAdditional HTTP headers in JSON format. For example, {"X-Custom-Header": "value", "Content-Type": "application/json"}. Accepts secret references.
queryParametersOptionalMapQuery parameters to append to the function URL. Must not start with ? or &. For example, param1=value1&param2=value2.

The action returns the following fields.

Output fieldTypeDescription
statusCodeIntegerHTTP status code returned by the Azure Function. For example, 200, 404, or 500.
responseStringResponse body from the Azure Function. Can be JSON, plain text, HTML, or any other format.
successBooleanIndicates whether the function call succeeded. true for 2xx responses (200–299), false otherwise.

Example: Trigger a remediation function

name: azure-function-invoke-remediation
steps:
- name: invokeRemediationFunction
type: action
action: azure.functions.invoke
version: 1
inputs:
function: "https://remediation.azurewebsites.net/api/fix-incident"
key: ${{ :secrets:azure:functionKey }}
method: "POST"
body: '{"incidentId":"${{ .workflowInputs.incidentId }}"}'

Example: GET request with query parameters

name: azure-function-invoke-get
steps:
- name: getFromFunction
type: action
action: azure.functions.invoke
version: 1
inputs:
function: "https://myapp.azurewebsites.net/api/GetStatus"
key: ${{ :secrets:azure:functionKey }}
method: "GET"
queryParameters: "env=prod&region=eastus"

Example: Invoke a function and log the result

name: azure-function-invoke-and-log
steps:
- name: invokeFunction
type: action
action: azure.functions.invoke
version: 1
inputs:
function: "https://myapp.azurewebsites.net/api/RunCheck"
key: ${{ :secrets:azure:functionKey }}
method: "POST"
body: '{"target":"${{ .workflowInputs.target }}"}'
headers:
Content-Type: "application/json"
- name: logFunctionResult
type: action
action: newrelic.ingest.sendLogs
version: 1
inputs:
logs:
- message: "Azure Function invocation complete"
attributes:
success: ${{ .steps.invokeFunction.outputs.success }}
statusCode: ${{ .steps.invokeFunction.outputs.statusCode }}
response: ${{ .steps.invokeFunction.outputs.response }}
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.