canonical: https://jentic.com/apis/loopfour.com/loopfour

# Loopfour Workflows API

The Loopfour Workflows API builds, triggers, and inspects deterministic finance workflows, the same ones you design on the Loopfour canvas. You discover available blocks and integration actions such as QuickBooks, create a workflow from a trigger and steps, activate, pause, schedule, or run it synchronously or asynchronously with an idempotencyKey, and then read its runs and logs, cancel, retry, or restart a run from a chosen step. Supporting resources cover versioning with compare and rollback, LLM-backed extraction and classification agents that workflows call, OAuth and API key connections to third-party providers, data tables with row queries, workflow secrets, and outbound webhook endpoints with delivery retries.

## For AI agents

Create, schedule, and run Loopfour finance workflows, inspect run logs and retry or restart failed runs, manage provider connections, data tables, and workflow secrets, and send run events to webhook endpoints.

## Scope

Does not keep a general ledger, file taxes, or move money between bank accounts itself. Use for building, scheduling, running, and monitoring Loopfour finance workflows only.

## Capabilities

- Discover workflow blocks and integration actions with listBlocks (kind core, integrations, or triggers) and getBlock for a type such as quickbooks
- Trigger a workflow run in async or sync mode with an idempotencyKey to prevent duplicate runs
- Read a run's status and logs, then cancel it, retry a failed run, or restart it from a specific fromStepId
- Schedule a workflow with a cron or interval in a given timezone, or fire a scheduled run on demand
- Compare workflow versions and roll back to an earlier version
- Store reference data in tables and query rows with filter, sort, and order
- Register outbound webhook endpoints for workflow events, rotate their secrets, and retry failed deliveries

## Use cases

### Agent-operated finance workflows through Jentic

An operations agent asks Jentic for the Loopfour run operations, triggers a workflow with triggerWorkflowRun and an idempotencyKey, then follows it with getRun and getRunLogs. When a step fails it calls restartRun with the fromStepId of that step instead of rerunning the whole workflow. The x-api-key value stays in your self-hosted Jentic One instance.

Example prompt: Search Jentic for 'run a Loopfour workflow', call triggerWorkflowRun for workflow id 'wf_123' with mode 'async' and idempotencyKey 'close-2026-11', then poll getRun until it finishes

### Failed run triage

A support routine calls listRuns with status and a from and to date window to find failures, reads getRunLogs for each, and either retries the run with retryRun or restarts it from the failing step with restartRun and optional overrideInput. Failed outbound notifications can be re-sent with retryWebhookDelivery.

Example prompt: Call listRuns with status 'failed', then call getRunLogs for each run id and summarize the failing step

### Building workflows from integration actions

Start with listBlocks using kind integrations to see available providers, then getBlock for a type such as quickbooks to read its action ids and input definitions. createWorkflow takes a name, a trigger, and steps built from those actions, and activateWorkflow turns it on once a provider connection exists.

Example prompt: Call getBlock with type 'quickbooks', pick the action for creating an invoice, then call createWorkflow with name 'Invoice sync', a trigger, and one step using that action

### Scheduled runs and versioned changes

Set a workflow's cron, interval, timezone, and enabled flag with updateWorkflowSchedule. Before shipping an edit, compareWorkflowVersions shows the difference between two versions, and rollbackWorkflowVersion restores the last good one if a change breaks a run.

Example prompt: Call updateWorkflowSchedule for workflow 'wf_123' with cron '0 7 * * 1-5', timezone 'Europe/Dublin', and enabled true

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/blocks` | Discover workflow blocks and actions |
| POST | `/workflows` | Create a workflow |
| POST | `/workflows/{id}/run` | Trigger a workflow run |
| GET | `/runs/{id}` | Get a run |
| GET | `/runs/{id}/logs` | Get run logs |
| POST | `/runs/{id}/restart` | Restart a run from a step |
| PUT | `/workflows/{id}/schedule` | Update a workflow schedule |
| POST | `/tables/{id}/rows/query` | Query table rows |

## Key resources

- **Workflows** — Finance workflows with triggers, steps, schedules, versions, and secrets
- **Runs** — Executions with status and logs that can be cancelled, retried, or restarted
- **Blocks** — Available core, integration, and trigger actions with input definitions
- **Connections** — OAuth and API key links to third-party providers
- **Tables** — Data tables with rows, columns, and queries

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 63 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 74 / 100
  - Developer Experience & Jentic Compatibility: 64 / 100
  - AI-Readiness & Agent Experience: 50 / 100
  - Agent Usability: 90 / 100
  - Security: 50 / 100
  - AI Discoverability: 70 / 100
- **View full report:** https://jentic.com/apis/loopfour.com/loopfour/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Loopfour by hand means sending its x-api-key header, unwrapping the success and data envelope, and polling async runs or tuning sync timeouts yourself. Through Jentic you install once, import Loopfour from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Loopfour puts the workflow id in the URL path for runs, schedules, versions, and secrets, so a rule can pin your agent to one workflow: it can trigger and inspect that workflow under `/workflows/{id}`/ and nothing else. You choose the operations it may call, so destructive ones like deleteWorkflow or deleteConnection are not included unless you add them.
- **Credential handling:** Your Loopfour API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run a finance workflow' or 'get run logs', and Jentic returns the matching Loopfour operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **n8n API** — Self-hostable general workflow automation
- **Pipedream API** — Code-first integration workflows and event sources
- **Activepieces API** — Open-source no-code automation flows
- **Xero Accounting API** — Accounting ledger, invoices, and contacts

## FAQ

### What authentication does the Loopfour Workflows API use?

Per its OpenAPI spec, the Loopfour Workflows API uses an apiKey scheme: a key issued from your Loopfour workspace settings, sent in the `x-api-key` header. Through Jentic the key is stored encrypted by your own Jentic One instance and injected at call time, so it never enters the agent's prompt or logs.

### Can I run a Loopfour workflow synchronously?

Yes. POST `/workflows/{id}/run` accepts mode 'sync' with maxExecutionTimeMs between 1000 and 300000, plus onTimeout (return_run_id or throw_error) and onFailure (throw_error or switch_to_async). The default is async, and an idempotencyKey prevents duplicate runs.

### What are the rate limits for the Loopfour Workflows API?

The OpenAPI spec does not specify rate limits. Check the Loopfour documentation for current limits, and use idempotencyKey on run triggers so retries do not start duplicate runs.

### How do I restart a failed run with the Loopfour Workflows API through Jentic?

Install Jentic One with `curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh`, add the Loopfour Workflows API from the Jentic API Directory, and have your agent search for 'restart a workflow run'. Jentic returns restartRun (POST `/runs/{id}/restart`) with its schema, and the agent sends the required fromStepId plus optional overrideInput. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Loopfour MCP server?

You don't need an MCP server to give your agent the Loopfour Workflows API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it, with operations discovered on demand instead of loading extra tool definitions into its context.

### Can I limit what my agent is allowed to do with the Loopfour Workflows API?

Yes. Write a rule that allows triggerWorkflowRun and listWorkflowRuns only on `/workflows/wf_123`/, plus getRun and getRunLogs. The agent can run and monitor that one workflow, while deleteWorkflow, the connection calls, and workflow secret operations are outside the allowed set, and every call it makes is logged.

### Which integrations can Loopfour workflows use?

Call GET /blocks with kind integrations to list available integration blocks, or GET `/blocks/{type}` with a known type such as quickbooks to read its action ids, input definitions, requirements, and choices. Provider credentials are linked with the connection endpoints, either through an OAuth auth URL or an API key connection.
