{ "kind": "open-flow-workflow", "version": 1, "name": "Mailgun Email Sender", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_ebc3c8a8bc052731": { "name": "Enter Mailgun email", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "domain" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "from" }, { "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Recipient email address or friendly name string." }, "minItems": 1, "description": "Primary recipients. Mailgun accepts email addresses or friendly name strings." }, "nullable": false, "handle": "to" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "subject" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "text" } ] }, "n_a53669f5d938a3ee": { "inputs": { "domain": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ebc3c8a8bc052731", "output": "domain" } ] }, "from": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ebc3c8a8bc052731", "output": "from" } ] }, "to": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ebc3c8a8bc052731", "output": "to" } ] }, "subject": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ebc3c8a8bc052731", "output": "subject" } ] }, "text": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ebc3c8a8bc052731", "output": "text" } ] } }, "name": "Send Mailgun email", "kind": "task", "task": { "inputs": [ { "description": "Mailgun sending domain name.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Mailgun sending domain name." }, "nullable": false, "handle": "domain" }, { "description": "Email address for the From header. Friendly name format is supported.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Email address for the From header. Friendly name format is supported." }, "nullable": true, "handle": "from", "value": null }, { "description": "Primary recipients. Mailgun accepts email addresses or friendly name strings.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Recipient email address or friendly name string." }, "minItems": 1, "description": "Primary recipients. Mailgun accepts email addresses or friendly name strings." }, "nullable": false, "handle": "to" }, { "description": "Carbon copy recipients.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Carbon copy recipient email address or friendly name string." }, "description": "Carbon copy recipients." }, "nullable": true, "handle": "cc", "value": null }, { "description": "Blind carbon copy recipients.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Blind carbon copy recipient email address or friendly name string." }, "description": "Blind carbon copy recipients." }, "nullable": true, "handle": "bcc", "value": null }, { "description": "Message subject line.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Message subject line." }, "nullable": true, "handle": "subject", "value": null }, { "description": "Plain text message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text message body." }, "nullable": true, "handle": "text", "value": null }, { "description": "HTML message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "HTML message body." }, "nullable": true, "handle": "html", "value": null }, { "description": "AMP HTML message body.", "jsonSchema": { "type": "string", "minLength": 1, "description": "AMP HTML message body." }, "nullable": true, "handle": "ampHtml", "value": null }, { "description": "Stored Mailgun template name to render for this email.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Stored Mailgun template name to render for this email." }, "nullable": true, "handle": "template", "value": null }, { "description": "Template version tag to render.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Template version tag to render." }, "nullable": true, "handle": "templateVersion", "value": null }, { "description": "Whether Mailgun should generate a text part from the template.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun should generate a text part from the template." }, "nullable": true, "handle": "templateText", "value": null }, { "description": "Template variables encoded into Mailgun t:variables.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "Template variable value." }, "description": "Template variables encoded into Mailgun t:variables." }, "nullable": true, "handle": "templateVariables", "value": null }, { "description": "Recipient variables for Mailgun batch sending.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Variables for one recipient." }, "description": "Recipient variables for Mailgun batch sending." }, "nullable": true, "handle": "recipientVariables", "value": null }, { "description": "Mailgun tags attached to the message.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Mailgun tag." }, "description": "Mailgun tags attached to the message." }, "nullable": true, "handle": "tags", "value": null }, { "description": "String map forwarded to Mailgun.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "string", "description": "Map value." }, "description": "String map forwarded to Mailgun." }, "nullable": true, "handle": "headers", "value": null }, { "description": "Custom Mailgun user variables stored with events and webhooks.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "Custom variable value." }, "description": "Custom Mailgun user variables stored with events and webhooks." }, "nullable": true, "handle": "variables", "value": null }, { "description": "Scheduled delivery time in RFC 2822 format.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Scheduled delivery time in RFC 2822 format." }, "nullable": true, "handle": "deliveryTime", "value": null }, { "description": "Maximum delivery window such as 1h30m or 24h.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Maximum delivery window such as 1h30m or 24h." }, "nullable": true, "handle": "deliverWithin", "value": null }, { "description": "Whether to send in Mailgun test mode.", "jsonSchema": { "type": "boolean", "description": "Whether to send in Mailgun test mode." }, "nullable": true, "handle": "testMode", "value": null }, { "description": "Mailgun yes/no or boolean string option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false" ], "description": "Mailgun yes/no or boolean string option value." }, "nullable": true, "handle": "dkim", "value": null }, { "description": "Mailgun tracking option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false", "htmlonly" ], "description": "Mailgun tracking option value." }, "nullable": true, "handle": "tracking", "value": null }, { "description": "Mailgun tracking option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false", "htmlonly" ], "description": "Mailgun tracking option value." }, "nullable": true, "handle": "trackingClicks", "value": null }, { "description": "Mailgun yes/no or boolean string option value.", "jsonSchema": { "type": "string", "enum": [ "yes", "no", "true", "false" ], "description": "Mailgun yes/no or boolean string option value." }, "nullable": true, "handle": "trackingOpens", "value": null }, { "description": "Whether Mailgun must deliver only over TLS.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun must deliver only over TLS." }, "nullable": true, "handle": "requireTls", "value": null }, { "description": "Whether Mailgun should skip MX TLS certificate verification.", "jsonSchema": { "type": "boolean", "description": "Whether Mailgun should skip MX TLS certificate verification." }, "nullable": true, "handle": "skipVerification", "value": null }, { "description": "Dedicated sending IP address to use.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Dedicated sending IP address to use." }, "nullable": true, "handle": "sendingIp", "value": null }, { "description": "Dedicated IP pool ID to use.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Dedicated IP pool ID to use." }, "nullable": true, "handle": "sendingIpPool", "value": null } ], "outputs": [ { "description": "Mailgun message identifier.", "jsonSchema": { "type": [ "string", "null" ], "description": "Mailgun message identifier." }, "nullable": true, "handle": "id" }, { "description": "Mailgun status message.", "jsonSchema": { "type": [ "string", "null" ], "description": "Mailgun status message." }, "nullable": true, "handle": "message" }, { "description": "Object returned by Mailgun.", "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Object returned by Mailgun." }, "nullable": false, "handle": "raw" } ], "name": "Send Mailgun email", "executor": { "kind": "connector", "action": "mailgun.send_email" } } }, "n_51649238c01db76a": { "inputs": { "raw": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a53669f5d938a3ee", "output": "raw" } ] } }, "name": "Confirm queued Mailgun email", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": {}, "additionalProperties": true, "description": "Object returned by Mailgun." }, "nullable": false, "handle": "raw" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "message" } ], "name": "Confirm queued Mailgun email", "moduleId": "n_ce73873847bacdce", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_9c2622e3a3984c80": { "name": "Mailgun queue result", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "message" } ], "outputMappings": { "message": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_51649238c01db76a", "output": "message" } ] } } } }, "edges": [ { "source": "n_ebc3c8a8bc052731", "target": "n_a53669f5d938a3ee" }, { "source": "n_a53669f5d938a3ee", "target": "n_51649238c01db76a" }, { "source": "n_51649238c01db76a", "target": "n_9c2622e3a3984c80" } ] } }, "modules": { "n_ce73873847bacdce": { "name": "Confirm queued Mailgun email", "imports": [], "source": "function readMailgunQueuedMessage(raw) {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw) || typeof raw.id !== 'string' || raw.id.length === 0) throw new Error('Mailgun did not return a queued message ID');\n return raw;\n}\nexport default function mailgunEmailResult({ raw }) {\n return { message: readMailgunQueuedMessage(raw) };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }