Skip to content

Transport

Send a message through one of the available transport channels.

SendEmail

core.SendEmail({...})

Send an email

  • Object
    • to: Email
    • subject: String!
    • message: String!
    • reply: String Email reply to
    • name: String Email display name
    • from: String Email from (must be an approved domain)

Boolean

SendText

core.SendText({...})

Send an SMS message

  • Object
    • to: String valid cell phone number with country code and area code
    • message: String! text message; limited to 160 characters in many regions

Boolean

SendChat

core.SendChat({...})

Send a chat messgae to a group channel

  • Object
    • to: UUID! channel id to send to
    • from: UUID! user Id to send from
    • body: String display message
    • data: Lua Table data for the message
    • kind: enum direct | group | ad-hoc | org | self | managed | dispatch | data
    • schema: text.json or other schema id

Boolean

SendDirectChat

core.SendDirectChat({...})

Send a chat message to a user via direct chat

  • Object
    • to: UUID! user id to send to
    • from: UUID! user Id to send from
    • message: String message
    • data: Lua Table data for the message

Boolean

SendManagedChat

core.SendManagedChat({...})

Send a chat message to a managed channel for a user

  • Object
    • to: UUID! user id to send to
    • from: UUID! user Id to send from
    • message: String message
    • data: Lua Table data for the message

Boolean

InvokeInbox

core.InvokeInbox({...})

Initiate an inbox workflow

  • Object
    • id: UUID! inbox id
    • recipient: UUID! recipient id
    • data: Lua Table data object used by the inbox
    • serviceId: String optional globally unique string for the inbox; only one instance will be sent (nothing will be done if the service ID already exists)
    • dispatchId: String optional dispatch ID to use for invoking the inbox

Boolean

SendPush

core.SendPush({...})

Send a push notification to a specific user

  • Object
    • id: UUID! user id to send to
    • title: String title
    • message: String message

Boolean

InvokeTunnel

core.InvokeTunnel({...})

Invoke a behavior trigger in another org. Receiving org should check the originId to confirm this is an expected script invokation.

  • Object
    • orgId: UUID! org id of target org
    • handle: String handle of target behavior
    • data: Any data object to pass

Boolean

core.InvokeTunnel({
    orgId="<destination org>",
    handle="<target trigger>",
    data={blob={a="test1", b="test2"}}
})

Send Chat

core.SendChat({...})
core.SendChat({
    to="5aa21c...1e339",
    from="aeebf9...0c5f9cd",
    channel="5aa21c...1e339",
    data={
        text="yo!",
        data_schema="text.json"        
    },
    schema="text.json",
    kind="org",
    body="yo!",
    notifyMode="none",
    event="weave.chat"
})