Power Automate > Managing and monitoring Power Automate flows
Working with data operations and variables in Power Automate
As your Power Automate flows become more sophisticated, especially when integrating with data-rich platforms like Tallyfy, you’ll often need to manipulate data, store temporary values, and process collections of items (like multiple Tallyfy tasks or data from Tallyfy form fields). Power Automate provides several data operations and variable functionalities to handle these requirements effectively when working with your Tallyfy data.
Variables are named containers to store data temporarily during a flow run. This data can change as your Tallyfy-integrated flow progresses.
-
Why use variables with Tallyfy integrations?
- Store intermediate results from calculations or data lookups related to Tallyfy items.
- Count Tallyfy tasks meeting certain criteria.
- Accumulate data (like a list of Tallyfy task names) before sending it to Tallyfy or another system.
- Control loop behavior or conditional logic based on a changing value from Tallyfy data.
-
Types of variables: Power Automate supports several data types:
- Boolean: True or false.
- Integer: Whole numbers (e.g., 10, -5).
- Float: Numbers with decimals (e.g., 3.14).
- String: Text.
- Array: A list or collection of items (e.g., a list of Tallyfy task names).
- Object: A complex data structure with key-value pairs (often representing JSON objects).
-
Common variable actions:
- Initialize variable: Must be used first to declare a variable for your Tallyfy data, name it, specify its type, and set an initial value.
- Set variable: Updates an initialized variable’s value.
- Increment variable / Decrement variable: Adds or subtracts 1 from an integer or float variable (useful for counters).
- Append to string variable: Adds text to the end of an existing string variable.
- Append to array variable: Adds an item to an existing array variable.
When you need to perform the same actions on multiple items from Tallyfy (an array), the Apply to each control is essential.
- How it works: Provide an array of Tallyfy items. Actions inside this control run once for every item.
- Automatic usage: Power Automate often adds an “Apply to each” loop if you select dynamic content representing a list (e.g., rows from a Tallyfy table form field).
- Explicit usage: Add an “Apply to each” control manually and select an array output from a previous step that retrieved Tallyfy data.
Tallyfy example: A Tallyfy task might have a table-type form field where users list multiple sub-items. If you retrieve this task’s details using the Tallyfy connector or API, the table data will likely be an array. You can use an “Apply to each” loop to iterate through these rows from Tallyfy. Inside the loop, you could then create a separate entry for each row in an external system or add them as checklist items to another Tallyfy task.
JSON is common for data exchange. Tallyfy webhooks and API responses are often in JSON format.
- Why parse JSON from Tallyfy? When Power Automate receives a JSON string from Tallyfy (e.g., from an HTTP request or a webhook), the Parse JSON action converts this string into structured objects and properties you can use as dynamic content in your flow.
- Using the “Parse JSON” action:
- Add the Parse JSON action (a Data Operation action).
- Content: Provide the JSON string from Tallyfy.
- Schema: A definition of the Tallyfy JSON structure. Generate this by clicking Generate from sample and pasting a sample JSON output from your Tallyfy webhook or API call.
Tallyfy example: When a Tallyfy process is launched, a webhook can send a JSON payload to a Power Automate HTTP-triggered flow. This payload might contain Tallyfy Process Name, Initiator’s Email, and Launch Form data. Using “Parse JSON” on this Tallyfy webhook body lets you extract these pieces of information for other actions.
These Data Operation actions format arrays of Tallyfy data for reporting or display:
- Create CSV Table: Takes an array (e.g., a collection of Tallyfy task details) and converts it into a CSV string.
- Create HTML Table: Similar, but converts the array of Tallyfy data into an HTML table string for embedding in an email.
Tallyfy use cases:
- Gather data from multiple Tallyfy tasks (e.g., all overdue tasks for a project) using the Tallyfy connector or API.
- Use Create CSV Table to format this Tallyfy task array into a CSV report.
- Use Create HTML Table to create a formatted summary of these Tallyfy tasks for an email.
Let’s outline a flow for a Tallyfy scenario.
Scenario: Every morning, get a list of all Tallyfy tasks assigned to a specific Tallyfy member that are due today. Format this list as an HTML table and email it to that member.
-
Trigger: Recurrence. Set to run daily. (See understanding Power Automate basics for trigger types).
-
Action: Get user profile (V2) (Office 365 Users). (Optional, if needing assignee details beyond email for Tallyfy interaction).
-
Action: Tallyfy - “List tasks”.
- Configure the Tallyfy connection.
- Assigned To User Email: Enter the email of the Tallyfy member.
- Status: Filter for
Open
orIn Progress
Tallyfy tasks. - Due Date: Direct precise date filtering might be limited in the basic connector. You might get all open tasks and filter within Power Automate, or use the Tallyfy API for advanced querying.
-
(Alternative) Control: “Filter array” (Data Operation).
- From: Use the
value
(list of tasks) output from the “List tasks” Tallyfy action. - Condition: Use an expression to filter tasks where due date is today. Example:
@equals(formatDateTime(item()?['dueDate'], 'yyyy-MM-dd'), formatDateTime(utcNow(), 'yyyy-MM-dd'))
- From: Use the
-
Action: Initialize variable.
- Name:
DailyTaskReportHTML
- Type:
String
- Value: (Leave empty or add HTML table headers:
<table><tr><th>Task Name</th><th>Due Date</th></tr>
)
- Name:
-
Control: “Apply to each”.
- Select an output from previous steps: Use the output from the “List tasks” action (or the “Filter array” action if you used it).
-
Inside “Apply to each”: Action - “Append to string variable”.
- Name:
DailyTaskReportHTML
- Value: Append an HTML table row for each Tallyfy task. Use dynamic content for Task Name and Due Date from the current item:
<tr><td>[Task Name dynamic content]</td><td>[Due Date dynamic content formatted nicely]</td></tr>
(You might useformatDateTime()
again for the due date from Tallyfy).
- Name:
-
(Outside “Apply to each”) Action: Set variable (Optional).
- If you added table headers initially, now append the closing
</table>
tag toDailyTaskReportHTML
.
- If you added table headers initially, now append the closing
-
Action: Send an email (V2).
- To: The Tallyfy member’s email address.
- Subject:
Your Tallyfy Tasks Due Today
- Body: Switch to code view (
</>
) for the email body and insert theDailyTaskReportHTML
variable. Ensure the email client will render HTML.
- Initialize early: Initialize variables at the beginning of your Tallyfy-integrated flow.
- Array structures from Tallyfy: Pay attention to data structures from Tallyfy, especially with table-type form fields or when getting multiple items (tasks, processes) via the Tallyfy connector or API. These usually require an “Apply to each” loop.
- Inspect with “Compose”: The “Compose” Data Operation action is invaluable. Use it to output Tallyfy data or variable content during development to understand its structure and values.
Power Automate > Using conditional logic in Power Automate
Power Automate > Advanced conditions and expressions in Power Automate
Power Automate > Understanding Power Automate basics
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks