Skip to content

Working with data operations and variables in Power Automate

Your Power Automate flows need to handle real data - lots of it. When you’re pulling information from Tallyfy, you’ll work with collections of tasks, data from form fields, and everything in between. You need ways to store values temporarily, transform data, and process multiple items at once. That’s where data operations and variables come in.

Understanding variables in Power Automate for Tallyfy integrations

Think of variables as temporary storage boxes. They hold data while your flow runs, and that data can change as the flow progresses through different steps.

  • 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: Always comes first - declares a variable, names it, sets its type and initial value
    • Set variable: Updates the value after initialization
    • Increment variable / Decrement variable: Adds or subtracts 1 (perfect for counters)
    • Append to string variable: Tacks text onto the end of a string
    • Append to array variable: Adds items to your list

Looping through Tallyfy data (Apply to each)

Got multiple items to process? The Apply to each control handles that.

  • How it works: Feed it an array of Tallyfy items. It runs your actions once for every single item.
  • Automatic usage: Power Automate’s pretty smart - it’ll add an “Apply to each” loop automatically when you select dynamic content that’s a list (like rows from a Tallyfy table form field)
  • Explicit usage: You can also add an “Apply to each” control yourself and point it to array data from an earlier step

Tallyfy example: Let’s say you have a task with a table-type form field where users list equipment needed for a project. When you pull this task’s details through the Tallyfy connector or API, that table comes back as an array. Perfect scenario for looping.

Use “Apply to each” to go through every row. Maybe you create purchase orders in your ERP system for each item. Or add them as checklist items to another Tallyfy task. The loop handles it row by row.

Data parsing: Parse JSON action for Tallyfy data

Here’s the reality - Tallyfy webhooks and API responses speak JSON. You need to understand that language.

  • Why parse JSON from Tallyfy? Power Automate receives JSON strings from Tallyfy (think webhook payloads or API responses). The Parse JSON action turns that text into actual objects and properties you can work with. No parsing means no access to the data inside.
  • Using the “Parse JSON” action:
    1. Add the Parse JSON action from Data Operations
    2. Content: Drop in your JSON string from Tallyfy
    3. Schema: This defines the structure. Here’s the shortcut - click Generate from sample and paste in real JSON from a Tallyfy webhook or API call. Done.

Tallyfy example: Someone launches a process in Tallyfy. Your webhook fires off a JSON payload to Power Automate. Inside that JSON? Everything you need - process name, who started it, all the launch form data. But it’s just text until you parse it. Run it through “Parse JSON” and suddenly you can grab the initiator’s email for notifications, use the form data to update other systems, whatever you need.

Handling Tallyfy field types in Power Automate:

  • Text fields: Straight mapping as strings - easy
  • Dropdown fields: Need the display text? Use item()?['fieldName']?['text'] after parsing
  • Checkbox fields: You get an array of what’s checked. Loop through it or grab specific items by index
  • Table fields: Each row is an object in an array. You’ll need loops here
  • Date fields: Comes as ISO format. Make it pretty with formatDateTime()

Data transformation for Tallyfy data: Create CSV Table and Create HTML Table

Need to turn Tallyfy data into reports? These two actions have you covered:

  • Create CSV Table: Feed it an array of Tallyfy task details. Get back a CSV string ready for Excel
  • Create HTML Table: Same idea, but outputs an HTML table you can drop right into an email

Tallyfy use cases:

  • Pull all overdue tasks for a project using the Tallyfy connector or API
  • Run them through Create CSV Table for a downloadable report
  • Or use Create HTML Table to email a nicely formatted summary to stakeholders

Combining variables, loops, and data operations: a Tallyfy example

Time to put it all together with a real workflow.

Scenario: Your team lead wants a daily email showing all their Tallyfy tasks due today. Nice HTML format, arrives at 8 AM sharp.

  1. Trigger: Recurrence. Set to run daily. (See understanding Power Automate basics for trigger types).

  2. Action: Get user profile (V2) (Office 365 Users). (Optional, if needing assignee details beyond email for Tallyfy interaction).

  3. Action: Tallyfy - “List tasks”.

    • Set up your Tallyfy connection
    • Assigned To User Email: Your team lead’s email
    • Status: Filter for Open or In Progress tasks
    • Due Date: The basic connector might not filter by exact date. Two options here - grab all open tasks and filter them yourself, or hit the Tallyfy API directly for better filtering
  4. (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'))
  5. 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>)
  6. 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).
  7. Inside “Apply to each”: Action - “Append to string variable”.

    • Name: DailyTaskReportHTML
    • Value: Build your table row by row: <tr><td>[Task Name dynamic content]</td><td>[Due Date dynamic content formatted nicely]</td></tr> (Pro tip: use formatDateTime() to make those dates readable)
  8. (Outside “Apply to each”) Action: Set variable (Optional).

    • Close off your table with </table> if you started with headers
  9. Action: Send an email (V2).

    • To: Team lead’s email
    • Subject: Your Tallyfy Tasks Due Today
    • Body: Switch to code view (</>) and drop in your DailyTaskReportHTML variable. Make sure HTML rendering is enabled!

Tips for Tallyfy users working with data operations

  • Initialize early: Put all your variable initializations right at the start. Keeps things organized.
  • Array structures from Tallyfy: Watch out for arrays - they’re everywhere in Tallyfy data. Table form fields? Arrays. Multiple tasks from the API? Arrays. You’ll be using “Apply to each” a lot.
  • Inspect with “Compose”: Can’t figure out what your data looks like? Drop in a “Compose” action and output your variable or Tallyfy data. It’s like console.log for Power Automate (yes, debugging is that simple).

Power Automate > Using conditional logic in Power Automate

Power Automate conditional logic enables flows to make intelligent decisions based on Tallyfy data using Condition and Switch controls to create different action paths depending on task status form field values and process criteria.

Power Automate > Advanced conditions and expressions in Power Automate

Advanced conditional techniques in Power Automate enable sophisticated decision-making for Tallyfy integrations through expressions grouping conditions and Switch controls that can evaluate form field data perform calculations check for null values and create multiple outcome paths for automated workflow responses.

Power Automate > Understanding Power Automate basics

Microsoft Power Automate enables workflow automation by connecting Tallyfy with various business applications through triggers and actions while Tallyfy manages human-centric processes and Power Automate handles system integrations and repetitive micro-tasks.