Create a Clarifo Automate automation, switched off. Nothing runs and
nothing is spent until it is activated (activate_automation after the
user approves, or in Clarifo). Use when the user asks for recurring
research, e.g. a weekly watchlist brief.
Show the user the returned summary (what, scope, schedule, timezone,
next_run, folder) before offering to activate. kind=prompt reads only
its watchlist (scope.company_count, scope.companies_sample): when the
instructions name companies or a sector outside it, say which are not
covered before offering to activate, and offer to add them to the
watchlist (save_to_workspace) or a kind=reports automation with a
sector, industry or market scope instead.
Args:
name: Short name, up to 60 characters.
idempotency_key: Optional; leave it out. Clarifo recognises a repeated identical request by its content. Give one only to retry this same request.
kind: "prompt" answers instructions across the watchlist on a
cadence; "reports" drafts a cited document for each newly
reported company in scope.
instructions: For kind=prompt, what to answer (10+ characters).
cadence: For kind=prompt: daily, weekly (default), monthly, quarterly.
scope_kind: For kind=reports: all, market, watchlist, sector,
industry, releases.
kind=prompt reads watchlists only (all or watchlist);
the result's scope says how many companies that is.
scope_value: Market, sector, or watchlist (portfolio) id; for
kind=prompt a watchlist id, or empty for every
watchlist in the workspace.
folder: Workspace folder for the output.
run_times: Times of day, "HH:MM" in 15-minute steps (up to 6).
run_days: ISO weekdays, 1 = Monday.
timezone_name: IANA zone, e.g. "Europe/Helsinki", "America/New_York".
max_new_per_run: Documents per run at most (1-25).
language: Output language for kind=prompt: en, fi, sv.
workspace_id: A workspace the user owns; omit when they own one.
template: Optional; the name (or id) of one of the user's report
templates, made in Clarifo under Automate > Report
templates: a company-report template for kind=reports,
a portfolio-report template for kind=prompt. Omit for
Clarifo's standard format. An unknown name returns the
available ones.
Returns:
{"status": "draft_created", "automation_id", "enabled": false,
"what", "schedule", "timezone", "next_run", "activation_token",
"review_url"} or {"error", "failure_kind"}.