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

local body1 = "hello yo (a)"
core.SendChat({
    from="<sender id>",
    to="99de4ae7-0597-4ffd-a862-c1358507eb43",
    kind="ad-hoc",
    data={text=body1},
    schema="text.json",
    body=body1
})

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

local body2 = "hello yo (b)"
core.SendDirectChat({
    from="<sender id>",
    to="b213c95c-d88e-4add-a047-902e38253043",
    body=body2,
    kind="direct",
    data={text=body2},
    schema="text.json"    
})

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

core.SendManagedChat({
    to="b213c95c-d88e-4add-a047-902e38253043",
    from="<sender id>",
    channel="519465c0-cc53-4fec-b9a3-7810a717729e",
    data={text="hello there!.. again"},
    schema="text.json",
    kind="managed",
    body="hello b"
})

SendNotification

core.SendNotification({...})

Send notification message

  • Object
    • to: UUID! user id to send to
    • body: String message
    • title: String notification message
    • kind: enum self
    • schema: text.json or other schema id

Boolean

core.SendNotification({
    to="b213c95c-d88e-4add-a047-902e38253043",
    body="hey there notification again yo",
    title="really important stuff",
    schema="text.json",
    kind="self"
})

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

SendNotification

core.SendNotification({...})

Send notification to self channel

  • 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"
})