Skip to main content
Version: Streamsheets 2.5

RESPOND

star This is a Streamsheets Enterprise feature.

Sends either arbitrary JSON data or a message to specified producer. Usually this function is used to respond to a previously received request-message. A request-message must provide a requestId property within its Metadata object.

Syntax

=RESPOND(MessageOrJSON, Producer, requestId)

Arguments

NameDescription
MessageOrJSONData to send as response.
ProducerName of the Producer to use for sending respond.
requestIdThe requestId as provided by a previously received request-message

Return

TRUE on success or error code otherwise.

Examples

We assume that a request-message was received and that it provides a requestId which we store to cell B1 by using the READ function as follows: READ(INBOXMETADATA(,,"requestId"), B1, "String")

FormulaResultComment
=RESPOND(OUTBOX("Message"), "Rest", B1)
TRUESends the message with id Message from the outbox to the producer named Rest using the requestId in B1
RESPOND(DICTIONARY(A3:C5), "Rest", B1)
TRUESends the JSON data provided by the dictionary function to the producer named Rest using the requestId in B1