Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

481 B
Raw Blame
export async function main({ macro, trigger, knobs }: StepContext) {
  if (trigger.kind !== 'event') return { posted: false };
  const name = trigger.item.item?.name ?? 'A task';
  for await (const channel of macro.channels.list()) {
    if ((await channel.name()) === knobs.channel) {
      await channel.send(`Done: ${name}`);
      return { posted: true };
    }
  }
  throw new Error(`There's no channel named "${knobs.channel}". Change the channel this routine posts in.`);
}