Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PRINT

Debug output keyword. PRINT is an alias for TALK - both send messages to the current conversation.

Note: PRINT and TALK are equivalent. Use TALK for user-facing messages and PRINT for debug output during development. In production, prefer TALK for clarity.

Syntax

PRINT expression

Parameters

ParameterTypeDescription
expressionAnyThe value to output (string, number, or any expression)

Description

PRINT outputs a message to the current conversation. It is functionally identical to TALK but conventionally used for debugging and logging purposes.

For sending messages to specific recipients on other channels, use:

  • TALK TO - Send to a specific recipient (WhatsApp, Teams, etc.)
  • SEND FILE TO - Send files to a specific recipient

Examples

Basic Debug Output

x = 10
y = 20
PRINT "Debug: x = " + x + ", y = " + y

result = x + y
PRINT "Result: " + result

Logging During Processing

WEBHOOK "process-order"

order_id = body.order_id
PRINT "Processing order: " + order_id

' Process the order
customer = FIND "customers", "id=" + body.customer_id
PRINT "Found customer: " + customer.name

' More processing...
PRINT "Order processing complete"

result_status = "ok"

Variable Inspection

data = GET "https://api.example.com/data"
PRINT "API Response: " + data

items = FIND "products", "stock < 10"
PRINT "Low stock items count: " + UBOUND(items)

Equivalent Keywords

KeywordDescription
TALKSame as PRINT - send message to conversation
TALK TOSend message to specific recipient

Example: PRINT vs TALK TO

' Debug output (goes to current conversation)
PRINT "Starting order notification..."

' User-facing message to specific WhatsApp number
TALK TO "whatsapp:+5511999887766", "Your order is confirmed!"

' More debug output
PRINT "Notification sent successfully"

Best Practices

  1. Use TALK for production - More readable for user-facing messages
  2. Use PRINT for debugging - Makes it clear this is debug/log output
  3. Use TALK TO for channels - When sending to specific recipients
' Good: Clear intent
PRINT "Debug: Processing started"
TALK "Welcome! How can I help you?"
TALK TO "whatsapp:" + phone, "Your order is ready!"

' Also valid but less clear:
PRINT "Welcome! How can I help you?"  ' Works but TALK is clearer

See Also

  • TALK - Primary message output keyword
  • TALK TO - Send to specific recipients
  • SEND FILE TO - Send files to recipients