ivy: flow/v1
name: Weekly report
description: Run a report script every Monday and post a summary to a channel.

on:
  schedule: { cron: "0 8 * * 1" } # Mondays at 08:00 in the space's time zone

steps:
  - id: build
    code: forecast.py # a code file of this space that writes the report
  - id: summarise
    agent: ivy
    prompt: Summarise this week's figures in five bullets.
    input: "{{ steps.build.output }}"
  - id: share
    post:
      to: { channel: Sales } # the channel the summary goes to
      text: "{{ steps.summarise.output.text }}"
