{ "kind": "open-flow-workflow", "version": 1, "name": "Send a Daily Gratitude Reminder on LINE", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_23d02c163f77d558": { "name": "Daily at 21:00 Bangkok", "kind": "cron", "cronTimes": [ { "type": "cron", "expression": "0 21 * * *", "timezone": "Asia/Bangkok" } ] }, "n_0c177cbf21305472": { "inputs": {}, "name": "Write a gratitude reminder", "kind": "task", "task": { "inputs": [], "outputs": [ { "description": "The final result produced by the Agent.", "jsonSchema": { "type": "string" }, "nullable": false, "handle": "output" } ], "name": "Write a gratitude reminder", "executor": { "kind": "agent", "code": false, "model": "gpt-4o-mini", "prompt": "Rewrite this reminder in a fresh way to ask the recipient to record a good thing from today. Return only the reminder.\n\nToday is a wonderful day! 🌟 What or who brought a smile to your face today? 😊", "maxRounds": 1, "tools": [] } } }, "n_a2a62c17fb480f88": { "inputs": { "reminder": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_0c177cbf21305472", "output": "output" } ] } }, "name": "Check the reminder", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "reminder" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 5000, "description": "A non-empty text message preserved exactly as provided." }, "minItems": 1, "maxItems": 5, "description": "The text messages to send in order." }, "nullable": false, "handle": "texts" } ], "name": "Check the reminder", "moduleId": "n_7048c54b5a3239f9", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_ae40e0f32576179b": { "inputs": { "to": { "kind": "value", "value": "YOUR_LINE_DESTINATION_ID" }, "texts": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a2a62c17fb480f88", "output": "texts" } ] } }, "name": "Send the LINE reminder", "kind": "task", "task": { "inputs": [ { "description": "The target LINE user, group, or room ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The target LINE user, group, or room ID." }, "nullable": false, "handle": "to" }, { "description": "The text messages to send in order.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 5000, "description": "A non-empty text message preserved exactly as provided." }, "minItems": 1, "maxItems": 5, "description": "The text messages to send in order." }, "nullable": false, "handle": "texts" }, { "description": "Whether LINE should suppress push notifications for the sent messages.", "jsonSchema": { "type": "boolean", "description": "Whether LINE should suppress push notifications for the sent messages." }, "nullable": true, "handle": "notificationDisabled", "value": null }, { "description": "An optional caller-generated UUID used by LINE to deduplicate a retried request.", "jsonSchema": { "type": "string", "format": "uuid", "description": "An optional caller-generated UUID used by LINE to deduplicate a retried request." }, "nullable": true, "handle": "retryKey", "value": null } ], "outputs": [ { "description": "The accepted LINE messages.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The message identifier assigned by LINE." }, "quoteToken": { "type": "string", "description": "The token that can be used to quote this message." } }, "required": [ "id" ], "additionalProperties": false, "description": "A message accepted by LINE." }, "description": "The accepted LINE messages." }, "nullable": false, "handle": "sentMessages" } ], "name": "Send the LINE reminder", "executor": { "kind": "connector", "action": "line.send_push_text" } } } }, "edges": [ { "source": "n_23d02c163f77d558", "target": "n_0c177cbf21305472" }, { "source": "n_0c177cbf21305472", "target": "n_a2a62c17fb480f88" }, { "source": "n_a2a62c17fb480f88", "target": "n_ae40e0f32576179b" } ] } }, "modules": { "n_7048c54b5a3239f9": { "name": "Check the reminder", "imports": [], "source": "export default function prepare({reminder}) {if(typeof reminder !== 'string' || !reminder.trim() || reminder.length > 5000) throw Error('Expected a nonempty LINE message of at most 5000 characters');return {texts:[reminder.trim()]};}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }