Dillo Flows
Money & expenses, template v1

Overdue invoice nudge drafts

Once a week, each overdue invoice gets a drafted reminder in the tone its lateness earns. Nothing sends until you approve each draft.

Starts when: Every week. Produces: Drafts awaiting approval. Steps: 4
Sample run — illustrative, not a record of a real run
schedule
weekly-overdue
scheduledFor
2026-11-09T15:00:00Z
firedAt
2026-11-09T15:00:00Z
1Write it back2Draft it3A person decides4The result

Sample result: Two drafts written: one friendly (6 days overdue), one firm (41 days). Both awaiting your approval.

What each step does

Step 1 · Write it back

The outcome is posted back through the connection you name. The secret stays sealed; the step carries the name only.

Step 2 · Draft it

An AI step does this part. Today it runs on a simulated stand-in, labelled simulated on every run, until a real model is wired. This step reads text that arrived from outside — an email, a document, a form. Treat its output as a draft from untrusted input: that is why a person checks what it produces before anything leaves.

Ledger · Overdue listFirm tone after (days)

Step 3 · A person decides

The run stops and asks the person named in your settings. The decision window is 72 hours; if it lapses, the run carries on without a decision, and the lapse is on the record. Rejecting always takes a comment.

Reminder drafts · Draft

Step 4 · The result

This is what the run hands back, written into the run's record where you can read it.

What you'll fill in

These are the only things the template asks of you. Examples teach the shape — they are never values your flow runs on; what you type (or the stated starting value) is what gets used.

FieldWhat to put in itExample
Ledger to readThe connection, by name, that lists your invoices.A connection you name — never a key pasted here
Firm tone after (days)Invoices overdue longer than this get the firm draft.30

Set it up

  1. Fill in the fields below.
  2. Name the connections it needs — by name only.
  3. Look at the trigger preview: what would start a run, counted before anything is armed.
  4. Review the steps, the rules, and every place a person is asked.
  5. Create it — then run it once yourself, and read the run's record.
Creating never arms the trigger. The flow is created switched off: no runs start for things that already match. Arming is a separate tap on the created flow, after you have seen the preview count.

Use this template

The connection, by name, that lists your invoices.

Connections are named, sealed, and never shown again. Add one in the console's setup, then pick it here by name.

Invoices overdue longer than this get the firm draft.

Sign in to preview what this trigger would match in your space.

The definition

The whole mechanism, before you take it. Package checksums: sha256:2dbead37beed… · sha256:e50968bf4f14… · sha256:7a52b4d02d6b…. A flow made from this template carries this template's name and version in its record, and exports in the standard bundle with that provenance.

Advanced · the three files, as written
{
  "trigger.json": {
    "template": {
      "slug": "overdue-invoice-nudge-drafts",
      "version": 1,
      "name": "Overdue invoice nudge drafts",
      "category": "money-expenses",
      "outcome": "Once a week, each overdue invoice gets a drafted reminder in the tone its lateness earns. Nothing sends until you approve each draft.",
      "outputName": "Drafts awaiting approval",
      "fits_when": [
        "invoices_outstanding"
      ],
      "needs": [
        "connection:ledger"
      ]
    },
    "trigger": {
      "type": "timer.fired",
      "source": "platform",
      "manifestFields": {
        "schedule": "string!",
        "scheduledFor": "iso!",
        "firedAt": "iso!"
      },
      "schedule": {
        "label": "Every week",
        "intervalMinutes": 10080
      }
    },
    "inputConvention": "envelope",
    "variables": [
      {
        "name": "ledgerConnection",
        "kind": "connection",
        "label": "Ledger to read",
        "instruction": "The connection, by name, that lists your invoices."
      },
      {
        "name": "firmAfterDays",
        "kind": "int",
        "label": "Firm tone after (days)",
        "instruction": "Invoices overdue longer than this get the firm draft.",
        "example": 30,
        "default": 30
      }
    ],
    "sample": {
      "input": {
        "schedule": "weekly-overdue",
        "scheduledFor": "2026-11-09T15:00:00Z",
        "firedAt": "2026-11-09T15:00:00Z"
      },
      "output": "Two drafts written: one friendly (6 days overdue), one firm (41 days). Both awaiting your approval."
    }
  },
  "flow.json": {
    "name": "Overdue invoice nudge drafts",
    "inputConvention": "envelope",
    "steps": [
      {
        "type": "http",
        "method": "GET",
        "url": "https://example.com/invoices/overdue",
        "connectionFromVariable": "ledgerConnection"
      },
      {
        "type": "ai",
        "task": "draft",
        "untrustedInput": true,
        "text": {
          "segments": [
            {
              "text": "Overdue invoices: "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "body"
                ],
                "label": "Ledger · Overdue list"
              }
            },
            {
              "text": ". Draft one reminder per invoice; firm tone past "
            },
            {
              "field": {
                "source": "variable",
                "name": "firmAfterDays",
                "label": "Firm tone after (days)"
              }
            },
            {
              "text": " days."
            }
          ]
        }
      },
      {
        "type": "human",
        "kind": "approval",
        "prompt": {
          "segments": [
            {
              "text": "Approve these reminder drafts? "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 1,
                "path": [
                  "draft"
                ],
                "label": "Reminder drafts · Draft"
              }
            }
          ]
        },
        "due": 259200,
        "onExpire": "continue"
      },
      {
        "type": "output",
        "value": "Drafts awaiting approval — nothing was sent."
      }
    ]
  },
  "rules.json": {
    "rulesets": [],
    "permissions": {
      "approvals": {
        "approveBeforeSteps": [
          2
        ],
        "rejectRequiresComment": true,
        "dueSeconds": 259200,
        "onExpire": "continue"
      },
      "connections": {
        "required": [
          {
            "nameFromVariable": "ledgerConnection",
            "usedBySteps": [
              0
            ]
          }
        ],
        "optional": []
      }
    }
  }
}

All templates   See the system: Link Map