Skip to content

Workflows

In Azure Logic Apps Automation, a workflow is an automation workload that begins with an event (trigger), followed by the tasks you want to perform (actions). Workflows exist inside apps and support expressions, IntelliSense, inline code execution such as JavaScript, and more.

You build a workflow by using the designer or the AI workflow assistant. The platform’s runtime executes the workflow.

To get started, see Quickstart.

Workflow type support and runtime behavior aren’t yet documented here.

Here are some example triggers that can start a workflow:

Trigger groupTriggerDescription
ScheduleRecurrenceRun on a schedule, such as every minute, hour, or day.
RequestWhen an HTTP request is receivedRun when an HTTP or HTTPS request arrives from an external caller. (non-polling)
Managed connectorsOutlook, SharePoint, Salesforce, and so onRun when an event happens like When a new email arrives or When a new file is uploaded. The operation can require a connection.

Here are some example actions that can run in a workflow:

Action groupActionDescription
HTTPHTTPSend generic REST calls like GET or POST.
Control- Condition
- Switch
- For each
- Until
Change the flow based on meeting specific criteria.
Data Operations- Compose
- Parse JSON
- Select
- Filter array
- Join
Perform data shaping.
Variables- Initialize variable
- Set variable
- Increment variable
- Decrement variable
Store and manage variable values.
Inline CodeExecute JavaScript CodeRun code snippets inline with your workflow.
Service integration examplesService Bus, Azure Blob Storage, Azure QueuesPerform operations with services such as Service Bus and Azure Storage.
Managed connectorsOutlook, SharePoint, Salesforce, and so onPerform a task like Send an email or Upload a file. The operation can require a connection.
AgentsAgent optionsAI-driven actions with a system prompt and a toolset.

Trigger and action parameters accept literal values and calculated values. For calculated values, use an expression to call prebuilt functions by using the workflow expression language.

In a workflow definition, workflow-language expressions start with @. For example:

@add(triggerBody()?.num1, 5)

@formatDateTime(utcNow(), 'yyyy-MM-dd')

@if(empty(variables('orders')), 'none', 'present')

Action parameters also accept dynamic output from preceding steps in the same workflow. The designer lets you select this output wherever you can specify a value. In the underlying JSON, this output appears as expressions such as @triggerBody() and @outputs('<action-name>').

For example, if an earlier action named GetUser returns a body containing {"name": "Alex"}, @body('GetUser')['name'] references the value Alex. Use your action’s name and the fields in its actual output; the structure depends on the operation.

Workflow definitions also support JavaScript expressions enclosed in ${...}. For example, ${(10 + 5) * 2 - 1} evaluates to 29, and ${10 > 5 ? 'yes' : 'no'} evaluates to yes. These are expressions used as values, not separate workflow actions.

Use an expression for a calculated parameter value. For a longer, multi-step program, use the separate Execute JavaScript Code action described below. Review the available expression editor and supported functions in your environment.

For logic that’s hard to represent as an expression, add and run JavaScript by using the Inline Code action named Execute JavaScript Code. For example, you might need to use code for tasks such as string parsing, complex data shaping, and multistep calculation.

The following illustrative example assumes an earlier action named Fetch_Orders returns an array in its output body:

// Action: Execute JavaScript Code
const orders = workflowContext.actions.Fetch_Orders.outputs.body;
return orders
.filter(o => o.total > 100)
.map(o => ({ id: o.id, customer: o.customerName, total: o.total }));

The designer can show a read-only Published version view with an Edit draft option. Review the draft, its connections, and its test data before publishing. The effects of publishing on running workflows aren’t currently documented here; confirm them with your administrator.

The designer can show Test draft workflow and a Run with test data option. Review each step’s test data and connections before testing.

The platform provides a code view where you can edit the workflow’s underlying JSON definition. Valid changes synchronize with the designer; fix JSON errors before saving. Inline code actions and expression fields provide their own editing experiences.

The code view offers the following capabilities:

CapabilityDescription
Auto-completeView suggestions for workflow JSON properties and action types based on the editing context.
Validation and diagnosticsReview JSON syntax errors and workflow schema diagnostics in the code editor.