Email

manifest.json 96 lines

Files · 9
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596{
  "id": "com.lattice.email",
  "name": "Email",
  "icon": "✉️",
  "color": "#8b5cf6",
  "description": "Send and receive mail for one account, and trigger workflows when a message is starred.",
  "requested_permissions": {
    "storage": ["kv", "sql"],
    "network": { "allowlist": [] },
    "email": true,
    "events": {
      "email-sent": {
        "description": "A message was sent.",
        "schema": {
          "type": "object",
          "properties": {
            "id": { "type": "integer", "description": "Message ID." },
            "to": { "type": "string", "description": "Recipient address or comma-separated addresses." },
            "subject": { "type": "string", "description": "Message subject." },
            "body": { "type": "string", "description": "Message body; empty means no content." },
            "sent_at": { "type": "string", "description": "Send time, UTC ISO 8601 timestamp." }
          },
          "required": ["id", "to", "subject", "body", "sent_at"]
        }
      },
      "email-received": {
        "description": "A message was received.",
        "schema": {
          "type": "object",
          "properties": {
            "id": { "type": "integer", "description": "Message ID." },
            "from": { "type": "string", "description": "Sender address or Display Name <address>." },
            "subject": { "type": "string", "description": "Message subject." },
            "body": { "type": "string", "description": "Message body; empty means no content." },
            "received_at": { "type": "string", "description": "Receipt time, UTC ISO 8601 timestamp." }
          },
          "required": ["id", "from", "subject", "body", "received_at"]
        }
      },
      "email-starred": {
        "description": "A message changed from unstarred to starred. Unstarring and starring an already-starred message emit nothing.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "Message ID."
            },
            "from": {
              "type": "string",
              "description": "Sender address or Display Name <address>; empty when the sender is unavailable (for example an unsent draft)."
            },
            "subject": {
              "type": "string",
              "description": "Message subject."
            },
            "body": {
              "type": "string",
              "description": "Message body; empty means no content."
            },
            "received_at": {
              "type": "string",
              "description": "Original message time (emails.created_at), UTC; receipt time for incoming mail and creation/send time for other folders."
            },
            "folder": {
              "type": "string",
              "description": "Stored message folder, for example inbox, sent, outbox or drafts; starred is a view, not a folder."
            }
          },
          "required": [
            "id",
            "from",
            "subject",
            "body",
            "received_at",
            "folder"
          ]
        }
      }
    },
    "listeners": {
      "send-email": {
        "description": "Send a message.",
        "schema": {
          "type": "object",
          "properties": {
            "to": { "type": "string", "description": "Address or comma-separated addresses; \"me\" uses this account." },
            "subject": { "type": "string", "description": "Nonempty message subject." },
            "body": { "type": "string", "description": "Message body; omitted or empty means no content." }
          },
          "required": ["to", "subject"]
        }
      }
    }
  }
}