On this page Why transformations matter in automation Common transformation types Where transformations live in a workflow Handling messy data Conditions and loops Testing transformations Keeping transformations maintainable Where Pathfix fits Frequently asked questions
Data rarely arrives in the shape the next system needs. One API returns a full name; the next expects first and last names separately. One returns dates as timestamps; another wants formatted strings. One returns a list of 200 records; you only need the five that changed today.
Data transformation is the work between steps in an API workflow: reshaping, filtering, combining and converting data so each step receives what it expects.
In a workflow that chains APIs, each step's output becomes the next step's input. Without transformations, workflows break on small mismatches, or builders push transformation logic into separate services, which defeats the point of automation.
In embedded SaaS automation, where one workflow runs for many connected users, transformations also need to cope with variation in each user's data: missing fields, different formats, empty lists.
Type Example Mapping Rename email_address to email Formatting Convert a Unix timestamp to an ISO 8601 date Combining Join first and last name into a display name Splitting Break a full address into components Filtering Keep only invoices with status "overdue" Aggregating Sum line items into an order total Restructuring Turn a nested object into a flat record, or the reverse Defaults Use "Unassigned" when an owner field is empty Type conversion Turn a numeric string into a number
Transformations can be:
Inline , applied to a single value as it's passed into a step, such as formatting a date in a request body.Dedicated steps , which take an input, transform it and output a new structure for later steps.Loop operations , applied to each item in a list.
Inline transformations keep simple cases compact. Dedicated steps keep complex logic visible and testable.
AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTphYzZjZTUwMS1hYTFiLTQ1ODgtYTQ3ZC02NGZmYTA5YjA2NmUAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaK6qSvncCnoWGytAuFFNKAkAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDpkNTYxMzVkOS01NzYzLTQ2ZTEtOWU1MS04YmE2ZWVjYTk2MmRscmV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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQBgoLg/W/2yiaINsW2hs3i9JEhnEXEPvdnF+CIGHkKl89InKPCAdD5NnJD+TTtSxyglJjM4h0AkBl89s5wkKw38= Embedded automation workflow For a connected user, a trigger such as a webhook or schedule starts a workflow that transforms data, calls an API in that user’s context and records the execution. Connected user Trigger webhook, schedule Transform map, filter API call in user’s context Execution log Transformation sits between trigger and API call, shaping data for each step in the workflow.
Handling messy data#
Real data is inconsistent. Good transformation practice includes:
Checking for missing values before using them, with sensible defaults.Normalizing formats early, such as trimming whitespace and standardizing case for emails.Validating before writing to an external API, so failures are caught in your workflow rather than as provider errors.Preserving originals where useful, so you can debug or re-run.
Conditions and loops#
Transformations often work alongside control flow:
Conditions route data differently based on values, such as handling paid and unpaid invoices separately.Loops apply steps to each item in a list, such as creating a record for each new contact.
Together with transformations, they let a workflow express real business logic without custom code.
Test with real sample data from each source, including edge cases: empty strings, nulls, very long values, unexpected types, unicode. In a multi-user workflow, test with data from more than one connected account, because different users' data can differ in ways a single test account won't show.
Keeping transformations maintainable#
Name intermediate values clearly. Prefer several simple transformations over one complex expression. Document assumptions about input formats. Revisit transformations when a provider changes its API.
Where Pathfix fits#
Pathfix Automation supports data transformation as part of its workflow builder: mapping, processing and reshaping API response data, using output from one step in subsequent steps, with conditions and loops to control execution. Workflows run in the context of each connected user.
See the Automation documentation for the transformation options currently available.
Frequently asked questions#
Simple reshaping between API steps belongs in the workflow. Complex business rules your application already owns may be better kept there.
How do I handle a field that's sometimes missing?#
Check for it and supply a default, or branch with a condition so the workflow handles both cases explicitly.
Yes. Each workflow run processes that user's data in their own context.