Dillo Flows
Records & files, template v1

Document changed → what changed

When a watched document changes, the new version is fetched and a short note says what changed, written for the document's owner.

Starts when: Document edited. Produces: Change note. Steps: 3
Sample run — illustrative, not a record of a real run
documentId
doc-sample-1
title
Sample plan
revisionId
rev-sample-2
editor
Sample Editor
1Write it back2Read and summarize3The result

Sample result: Change note: the launch date moved and two paragraphs were added. Note ready for the owner.

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.

Document · ID

Step 2 · Read and summarize

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.

Document · TitleDocument fetch · Body

Step 3 · The result

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

Document · Title

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
Documents to read fromThe connection, by name, that can fetch the document.A connection you name — never a key pasted here

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 fetch the document.

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

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

The definition

The whole mechanism, before you take it. Package checksums: sha256:142b1e93498c… · sha256:3e07b365f528… · sha256:d083942164ab…. 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": "document-changed-what-changed",
      "version": 1,
      "name": "Document changed → what changed",
      "category": "records-files",
      "outcome": "When a watched document changes, the new version is fetched and a short note says what changed, written for the document's owner.",
      "outputName": "Change note",
      "fits_when": [
        "shared_docs"
      ],
      "needs": [
        "connection:google"
      ]
    },
    "trigger": {
      "type": "docs.document.edited",
      "source": "google",
      "manifestFields": {
        "documentId": "string!",
        "title": "string!",
        "revisionId": "string!",
        "editor": "string"
      }
    },
    "inputConvention": "envelope",
    "variables": [
      {
        "name": "docsConnection",
        "kind": "connection",
        "label": "Documents to read from",
        "instruction": "The connection, by name, that can fetch the document."
      }
    ],
    "sample": {
      "input": {
        "documentId": "doc-sample-1",
        "title": "Sample plan",
        "revisionId": "rev-sample-2",
        "editor": "Sample Editor"
      },
      "output": "Change note: the launch date moved and two paragraphs were added. Note ready for the owner."
    }
  },
  "flow.json": {
    "name": "Document changed → what changed",
    "inputConvention": "envelope",
    "steps": [
      {
        "type": "http",
        "method": "GET",
        "connectionFromVariable": "docsConnection",
        "url": {
          "segments": [
            {
              "text": "https://example.com/documents/"
            },
            {
              "field": {
                "source": "trigger",
                "name": "documentId",
                "label": "Document · ID"
              }
            }
          ]
        }
      },
      {
        "type": "ai",
        "task": "summarize",
        "untrustedInput": true,
        "text": {
          "segments": [
            {
              "text": "Document "
            },
            {
              "field": {
                "source": "trigger",
                "name": "title",
                "label": "Document · Title"
              }
            },
            {
              "text": " changed. New content: "
            },
            {
              "field": {
                "source": "step",
                "stepIndex": 0,
                "path": [
                  "body"
                ],
                "label": "Document fetch · Body"
              }
            },
            {
              "text": ". Write a short note on what changed."
            }
          ]
        }
      },
      {
        "type": "output",
        "value": {
          "segments": [
            {
              "text": "Change note ready for "
            },
            {
              "field": {
                "source": "trigger",
                "name": "title",
                "label": "Document · Title"
              }
            }
          ]
        }
      }
    ]
  },
  "rules.json": {
    "rulesets": [],
    "permissions": {
      "approvals": {
        "approveBeforeSteps": [],
        "rejectRequiresComment": true,
        "dueSeconds": 259200,
        "onExpire": "continue"
      },
      "connections": {
        "required": [
          {
            "nameFromVariable": "docsConnection",
            "usedBySteps": [
              0
            ]
          }
        ],
        "optional": []
      }
    }
  }
}

All templates   See the system: Link Map