Invoice InvoiceTrigger

Invoice InvoiceTrigger

Certified

Trigger a flow when QuickBooks invoices are created, updated or paid

Polls the QuickBooks Change Data Capture endpoint for Invoice changes since the last poll and starts an execution when at least one change matches the configured event. Deleted invoices are never reported.

A polling trigger starts at most one execution per evaluation: invoice is the oldest matching change and invoices lists all matching changes of the poll, so use invoices to process every change.

The watermark is stored in the namespace KV store and only advances once the execution has been built, so a failed poll is retried over the same window. CDC only looks back about 30 days.

yaml
type: io.kestra.plugin.quickbooks.invoices.InvoiceTrigger

Start a flow when an invoice is paid

yaml
id: qbo_on_invoice_paid
namespace: company.finance

triggers:
  - id: on_invoice_paid
    type: io.kestra.plugin.quickbooks.invoices.InvoiceTrigger
    clientId: "{{ secret('QBO_CLIENT_ID') }}"
    clientSecret: "{{ secret('QBO_CLIENT_SECRET') }}"
    refreshToken: "{{ secret('QBO_REFRESH_TOKEN') }}"
    realmId: "{{ secret('QBO_REALM_ID') }}"
    event: PAID
    interval: PT15M

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "Invoice {{ trigger.invoice.DocNumber }} is paid ({{ trigger.invoice.TotalAmt }})"
Properties

QuickBooks Client ID

QuickBooks Client Secret

QuickBooks Realm ID

QuickBooks Refresh Token

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Defaulthttps://oauth.platform.intuit.com/oauth2/v1/tokens/bearer

OAuth Token URL

The OAuth2 token endpoint. Must be an intuit.com domain.

Defaulthttps://quickbooks.api.intuit.com

Base URL

The Base URL for QuickBooks API. Must be an intuit.com domain. Defaults to production.

DefaultCREATED
Possible Values
CREATEDUPDATEDPAID

Invoice event to react to

Supported values (uppercase, case-sensitive):

  • CREATED: invoices created since the last poll.
  • UPDATED: invoices that already existed before the last poll and were modified since.
  • PAID: invoices changed since the last poll that have a zero balance and a positive total. QuickBooks CDC does not report what changed, so an already paid invoice that is edited again is reported again.
DefaultPT15M
Formatduration

Polling interval

How often the trigger should poll for changes.

Default75

Minor Version

The minor version of the QuickBooks API to use. Must be 1 or more, checked after rendering.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

Count

The number of invoices matching the event in this poll.

Invoice

The oldest invoice matching the event, as returned by QuickBooks.

SubTypeobject

Invoices

All invoices matching the event in this poll, oldest first. Includes invoice.