Dillo Flows
Money & expenses, template v1

Receipt from chat → expense sheet

Post a receipt in chat and the amount, merchant, and date are pulled off it and filed as a row in the expense sheet — after you approve the extraction. The chat message stays the source; the row names it.

Starts when: slack.message.posted. Produces: Receipt filing result. Steps: 5
Sample run — illustrative, not a record of a real run
messageId
sl_501
channelId
receipts
userId
u_ana
text
Lunch with the landlord — $86.40 at Harbor Cafe, Nov 9
postedAt
2026-11-09T20:00:00Z
hasFiles
true
1Pull out the details2A person decides3Write it back4Send it onward5The result

Sample result: Receipt filed: Harbor Cafe.

What each step does

Step 1 · Pull out the details

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.

Message · Text

Step 2 · 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.

Receipt · MerchantReceipt · Amount (cents)Receipt · Currency

Step 3 · Write it back

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

Receipt · MerchantReceipt · Amount (cents)Receipt · CurrencyReceipt · DateMessage · IDMessage · Author

Step 4 · Send it onward

Step 5 · The result

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

Receipt · Merchant

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
Expense sheetThe connection, by name, that can append rows to the expense sheet.A connection you name — never a key pasted here
Who approvesThe role or person the approval card is addressed to.Office manager

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 can append rows to the expense sheet.

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

The role or person the approval card is addressed to.

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

The definition

The whole mechanism, before you take it. Package checksums: sha256:58b759003f0e… · sha256:09d5e1c8097b… · sha256:4af398b1329a…. 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": "receipt-from-chat-to-sheet",
      "version": 1,
      "name": "Receipt from chat → expense sheet",
      "category": "money-expenses",
      "outcome": "Post a receipt in chat and the amount, merchant, and date are pulled off it and filed as a row in the expense sheet — after you approve the extraction. The chat message stays the source; the row names it.",
      "outputName": "Receipt filing result",
      "fits_when": [
        "expenses",
        "team_chat"
      ],
      "needs": [
        "connection:sheet"
      ]
    },
    "trigger": {
      "type": "slack.message.posted",
      "source": "slack",
      "manifestFields": {
        "messageId": "string!",
        "channelId": "string!",
        "userId": "string!",
        "text": "string!",
        "postedAt": "iso!",
        "hasFiles": "bool!"
      }
    },
    "inputConvention": "envelope",
    "variables": [
      {
        "name": "sheetConnection",
        "kind": "connection",
        "label": "Expense sheet",
        "instruction": "The connection, by name, that can append rows to the expense sheet."
      },
      {
        "name": "approverRole",
        "kind": "string",
        "label": "Who approves",
        "instruction": "The role or person the approval card is addressed to.",
        "example": "Office manager",
        "default": "Approver"
      }
    ],
    "sample": {
      "input": {
        "messageId": "sl_501",
        "channelId": "receipts",
        "userId": "u_ana",
        "text": "Lunch with the landlord — $86.40 at Harbor Cafe, Nov 9",
        "postedAt": "2026-11-09T20:00:00Z",
        "hasFiles": true
      },
      "output": "Receipt filed: Harbor Cafe."
    }
  },
  "flow.json": {
    "name": "Receipt from chat → expense sheet",
    "inputConvention": "envelope",
    "clefIn": [
      {
        "ruleset": "receipt-guard",
        "ids": [
          "message-text-present"
        ]
      }
    ],
    "steps": [
      {
        "type": "ai",
        "task": "extract",
        "untrustedInput": true,
        "text": {
          "segments": [
            {
              "text": "Extract the merchant, amount in cents, currency, and date from this receipt message: "
            },
            {
              "field": {
                "source": "trigger",
                "name": "text",
                "label": "Message · Text"
              }
            }
          ]
        }
      },
      {
        "type": "human",
        "kind": "approval",
        "due": 259200,
        "onExpire": "continue",
        "prompt": {
          "segments": [
            {
              "text": "File this receipt? "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "merchant"
                ],
                "label": "Receipt · Merchant"
              }
            },
            {
              "text": " — "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "amountCents"
                ],
                "label": "Receipt · Amount (cents)"
              }
            },
            {
              "text": " "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "currency"
                ],
                "label": "Receipt · Currency"
              }
            }
          ]
        }
      },
      {
        "type": "http",
        "method": "POST",
        "connectionFromVariable": "sheetConnection",
        "url": "https://sheets.example.com/rows",
        "body": {
          "segments": [
            {
              "text": "{\"merchant\": \""
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "merchant"
                ],
                "label": "Receipt · Merchant"
              }
            },
            {
              "text": "\", \"amountCents\": "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "amountCents"
                ],
                "label": "Receipt · Amount (cents)"
              }
            },
            {
              "text": ", \"currency\": \""
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "currency"
                ],
                "label": "Receipt · Currency"
              }
            },
            {
              "text": "\", \"occurredOn\": \""
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "occurredOn"
                ],
                "label": "Receipt · Date"
              }
            },
            {
              "text": "\", \"sourceMessage\": \""
            },
            {
              "field": {
                "source": "trigger",
                "name": "messageId",
                "label": "Message · ID"
              }
            },
            {
              "text": "\", \"postedBy\": \""
            },
            {
              "field": {
                "source": "trigger",
                "name": "userId",
                "label": "Message · Author"
              }
            },
            {
              "text": "\"}"
            }
          ]
        }
      },
      {
        "type": "dispatch",
        "channel": "event",
        "name": "finance.receipt.filed"
      },
      {
        "type": "output",
        "value": {
          "segments": [
            {
              "text": "Receipt filed: "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "merchant"
                ],
                "label": "Receipt · Merchant"
              }
            },
            {
              "text": "."
            }
          ]
        }
      }
    ]
  },
  "rules.json": {
    "rulesets": [
      {
        "name": "receipt-guard",
        "version": 1,
        "rules": [
          {
            "id": "message-text-present",
            "on": "step.payload.text",
            "op": "missing",
            "action": "block",
            "msg": "A receipt cannot be read from an empty message."
          }
        ]
      }
    ],
    "permissions": {
      "approvals": {
        "approveBeforeSteps": [
          1
        ],
        "rejectRequiresComment": true,
        "dueSeconds": 259200,
        "onExpire": "continue"
      },
      "connections": {
        "required": [
          {
            "nameFromVariable": "sheetConnection",
            "usedBySteps": [
              2
            ]
          }
        ],
        "optional": []
      }
    }
  }
}

All templates   See the system: Link Map