Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
Run a JavaScript ES module in Deno against the real Macro SDK, as the signed-in user. Export async function main({macro}); return {data: }. macro is an authenticated Macro SDK client. Optional imports: import {Macro} from "@macro-inc/sdk"; import Handlebars from "handlebars". main also receives token and hosts for explicit SDK construction. Never print, return or persist the token. No TypeScript syntax or package installation.
Prefer ExecuteCode for Macro work that would otherwise take several tool calls. Before writing a program, call DescribeCodeTools with task set to what the program must do, unless the entity indexes it needs are already in this conversation, then read the symbols the program uses with ReadCodeDocs, all together in one call. The SDK is large; do not guess method names or options. If a program fails with an SDK error, read the symbol involved with ReadCodeDocs and fix the program. Never sleep, call setTimeout or poll inside ExecuteCode to wait for something. To check back later, create a routine with a once trigger due shortly, macro.routines.create({trigger: {type: "once", at}, ...}), whose prompt says what to check and where to report, then finish; it runs within about a second of at.