name: send-gmail description: | Send email via Gmail SMTP. Configure user/from and the named secret, then call from other workflows with trigger-workflow.js (name: send-gmail). Input (data): to optional recipient(s); defaults to your Gmail below subject required text plain body (aliases: body, message) html optional HTML body from, cc, bcc, replyTo, priority, headers optional scripts: - script: jsonata.js config: expression: | { "to": $exists(data.to) ? data.to : "nasyarobby@gmail.com", "from": data.from, "subject": data.subject, "text": $exists(data.text) ? data.text : ($exists(data.body) ? data.body : data.message), "html": data.html, "cc": data.cc, "bcc": data.bcc, "replyTo": data.replyTo, "priority": data.priority, "headers": data.headers } - script: send-email.js config: service: Gmail user: elevent16th@gmail.com from: elevent16th@gmail.com passwordSecret: gmail_app_password triggers: - type: workflow - type: HTTP method: POST path: /send-gmail auth: - 0f78d6d7-bd44-45d7-a826-f51c027b767f