A Helios conversation (an investigation: every question, answer and analysis) can be published from the chat with → Notion or → SharePoint, or through the API:
- App:
POST /investigations/{id}/publish?target=notion|sharepointorPOST /runs/{id}/publish?target=… - Developer API:
POST /v1/investigations/{id}/publish?target=…(export scope)
Republishing updates the same Notion page, the same SharePoint files and the same list item. It never creates duplicates. Decision: DM-130.
What is published#
Notion. Helios creates a Helios pipeline database under your chosen page. Each investigation is one row, with these properties:
- Name, Status (draft, accepted, corrected, rejected or mixed) and Questions;
- Last question, Updated, and the Helios and PDF links;
- Withheld sources.
The row's page holds the whole memo: summary, each question and answer, tables, sources and limits. Charts are named and stay in the PDF.
SharePoint. The memo is uploaded as PDF and HTML to Helios/<title>/ in the site's document
library. Republishing replaces the files, and SharePoint keeps their version history. Each
investigation is also one item of a Helios pipeline list (Status, Questions, LastQuestion,
Updated, HeliosLink, MemoPdf, WithheldSources).
Licence. Notion and SharePoint are outside Helios, so the content passes the same licence filter as the developer API. Parts built only on CMHC, CREA or TRCA data are withheld. An answer that used them is replaced by a note pointing to Helios, and the withheld sources are listed. The stored answer in Helios is unchanged.
Set up Notion (free plan)#
- Go to notion.so/profile/integrations and choose New integration (internal, your workspace). The capabilities needed are read content, update content and insert content. Copy the Internal Integration Secret.
- Create (or pick) a page, for example "Deals". In its … menu, choose Connections, then Connect to your integration.
- Copy the page's id (the 32 characters at the end of its link).
- In
.env.local(never committed; see.env.example):
NOTION_TOKEN=ntn_...
NOTION_PARENT_PAGE_ID=<the page id or its full link>
HELIOS_PUBLIC_URL=http://localhost:8081
- Restart the API. → Notion appears under the conversation in the chat.
Set up SharePoint (Microsoft 365; the Entra app registration is free)#
- In the Azure portal, go to Microsoft Entra ID → App registrations → New registration (single tenant). Note the Application (client) ID and the Directory (tenant) ID.
- Under Certificates & secrets → New client secret, copy the secret value.
- Under API permissions → Microsoft Graph → Application permissions, choose one:
- Sites.Selected (recommended: only the sites you grant). A SharePoint admin then grants
the app write access to the one site, for example with PnP PowerShell:
Grant-PnPAzureADAppSitePermission -AppId <client id> -DisplayName Helios -Site https://contoso.sharepoint.com/sites/Deals -Permissions Write. - Or Sites.ReadWrite.All (simpler, every site).
Then choose Grant admin consent.
4. In .env.local:
MS_TENANT_ID=<directory id>
MS_CLIENT_ID=<application id>
MS_CLIENT_SECRET=<secret value>
SHAREPOINT_SITE=contoso.sharepoint.com:/sites/Deals
- Restart the API. → SharePoint appears under the conversation.
Nothing here creates a billed Azure resource.
Check the setup#
python -m helios integrations check tests each configured integration against its real service and
says what is wrong (for example a page that is not shared with the integration, or a missing admin
consent). It prints no secret and writes nothing.
Links#
The links written to Notion and SharePoint (Helios page and PDF) use HELIOS_PUBLIC_URL. While
Helios runs on your computer, they open only there. Once Helios is deployed, set
HELIOS_PUBLIC_URL to its address. The PDF uploaded to SharePoint is a copy and opens anywhere.
Checking without the services#
GET /integrations shows which targets are configured. It reports true or false only, never the
secrets. Tests replace Notion and Microsoft Graph with fakes and check every call
(tests/test_publish.py).
