Before you test
You need two things in place before a test run executes:A Linked Account for the integration
A Linked Account for the integration
Tests run against a real Linked Account so any API calls inside the workflow hit the actual third-party app. Pick one from the Testing panel under the Prerequisites section. If the account is unauthenticated or its token has expired, the editor shows a warning. Click Authorize Application to reconnect. Once the account is connected, the status changes to Connected.
A sample input payload
A sample input payload
Every workflow needs an input to run. The editor auto-loads a sample payload based on the workflowโs trigger (event, webhook, schedule, or API call). Edit the JSON to match the shape of the payload you expect in production.Use Reset to restore the auto-generated sample.
Run a test from the workflow editor
You can test a single node in isolation or execute the full workflow end-to-end.Test a single node
Use this when you want to verify one nodeโs logic without running everything upstream.Click Run Node
Press Run Node. Refold resolves any variables referenced by the node using the sample payload and previously-tested upstream nodes, then executes that node against the Linked Account.A checkmark appears on the node once it succeeds. The resolved input, the raw output, and any error returned by the call all render in the same panel.
Test the entire workflow
Confirm the payload and Linked Account
Verify the prerequisites section shows a connected account and the payload you want to send in.
Click Execute Workflow
Press Execute Workflow. Refold runs the workflow start to finish and writes a Run log capturing the input and output of every node.
Mock the trigger payload
You rarely have a clean production event handy while building. To simulate one:- Edit the auto-loaded payload directly in the Testing panel. The shape mirrors what the trigger would send at runtime, so you can replace IDs, change field values, or add extra keys before running.
- Reset to the default to get a fresh template if your edits drift too far.
- Save multiple payloads if your workflow supports it, so you can re-run the same fixture later.
Override variables and environment values
If your workflow reads from project-level variables or secrets, those values still apply during a test run. To test against different values:- Update the variable in your project settings before running, then revert.
- Hard-code the value into the test payload and reference it from there for the duration of the test.
A first-class โoverride for this test run onlyโ UI may not exist yet. Confirm with your Refold contact before relying on one.
Inspect node-level results
Every test run produces a per-node breakdown. For each node you can see:| Field | What it shows |
|---|---|
| Input | The fully resolved payload sent into the node after all variables and templates evaluate. |
| Output | The raw response the node returned (API response body, function return value, mapped object). |
| Error | The error message and (where available) the upstream HTTP status, retry count, and stack trace. |
| Timing | How long the node took to execute. |
- On the node itself, via the Input/Output tab, for the most recent run.
- In the Run log opened from the Testing panel, for any historical run during this editing session.
Re-run with a previous input
To replay an earlier test:Promote a tested workflow to production
A passing test does not by itself activate the workflow for production events. To ship it:Resolve any pending changes
Make sure all node-level edits are saved. Unsaved changes do not publish.
Publish the workflow
Click Publish (or the equivalent action) in the editor. Refold promotes the current draft so that incoming trigger events run against it.
Verify in production
Trigger one real event and check the run in your workflow run history.
Testing patterns and fixtures
A few patterns that hold up as workflows grow:- One payload per code path. Keep a short library of input payloads, one for each branch your workflow takes (success, missing-field, rate-limited, deleted record). Run each before publishing.
- Test downstream first. When debugging a multi-node failure, run the failing node in isolation with a hand-crafted input. This isolates whether the bug is in the node or in upstream data.
- Use Log nodes as breakpoints. Drop Log nodes between steps to checkpoint intermediate values during a full-workflow run.
- Wrap risky calls in Try/Catch. Test the catch branch by feeding a payload guaranteed to fail (bad ID, missing field). See Try/Catch nodes.
- Mock external IDs explicitly. Donโt depend on auto-generated IDs from your Linked Accountโs sandbox: hard-code stable IDs into the test payload so re-runs are reproducible.
Common gotchas
Node shows a checkmark but the workflow still fails end-to-end
Node shows a checkmark but the workflow still fails end-to-end
A node-level checkmark only means that node ran successfully with the sample input you provided. The same node can still fail when upstream nodes produce a differently-shaped payload at runtime. Always run a full Execute Workflow before publishing.
Variables resolve to empty strings or `undefined`
Variables resolve to empty strings or `undefined`
Templated variables reference outputs of upstream nodes. If you havenโt run those upstream nodes yet (or you cleared their output), references resolve to nothing. Run each upstream node once, or run the full workflow, to populate the values.
Linked Account auth expired mid-test
Linked Account auth expired mid-test
Tokens stored on the Linked Account can expire between test runs. If a node returns a 401, reopen the Testing panel and reauthorize before re-running.
Group nodes and paginated loops don't show output
Group nodes and paginated loops don't show output
Single-node testing isnโt supported for Group nodes or pagination. Run the full workflow to exercise these.
Test runs hit real third-party APIs
Test runs hit real third-party APIs
Because tests use a real Linked Account, they create real records, send real emails, and consume real rate limits. Point your Linked Account at a sandbox or test workspace whenever the integration supports one.
The payload editor rejects valid JSON
The payload editor rejects valid JSON
Trailing commas and single quotes arenโt valid JSON. If the editor refuses to save, paste the payload through a JSON validator first.
Related
Workflow overview
The fundamentals of workflows, triggers, and nodes.
Templating and variables
Reference upstream node outputs in your inputs.
Linked Accounts
Authenticate the third-party account your tests run against.
Log node
Capture intermediate values during a run.