Ask Sage for Power Automate
Bring governed, accredited generative AI into your existing Power Automate flows — no code required.
Because Ask Sage exposes a standard REST API, any Power Automate flow can send a prompt and use the response in the next step: an email, a Teams reply, a SharePoint item, an approval, a Dataverse record, and so on.
Instance-Specific Base URL: The examples here call the public Ask Sage API at https://api.asksage.ai/server/. The api. prefix and path suffix stay the same across deployments — only the instance segment in the middle changes based on which Ask Sage instance you log into. Always use the instance approved by your organization and applicable regulatory requirements, and match the base URL in your flows to the instance you authenticate against.
Two ways to connect
There are two ways to call Ask Sage from a flow. Both require a Power Automate plan that includes premium connectors (the HTTP action is premium).
HTTP action
Built-in, nothing to manage. Best for testing, prototypes, and one-off flows.
Custom connector
Wraps the API as a first-class action, reusable across flows. Best for production and teams.
Prerequisites
Ask Sage:
- An Ask Sage account on a plan with API access.
- An API key — Ask Sage UI → Settings → API Keys. Treat it like a password.
Power Automate:
- A Microsoft account with access to make.powerautomate.com.
- A plan that includes premium connectors — both the HTTP action and the custom connector are premium features. (Older guides that said the HTTP method works on a free license are incorrect.)
- To import a solution: a System Administrator or System Customizer role in the target environment.
Per-example extras: Teams bot needs a Teams team + channel; OneDrive / SharePoint analysis need a OneDrive for Business / SharePoint Online library with files to analyze.
Who needs a licence
"Requires premium connectors" is only half the answer, and the half that gets budgeted wrong. Which people need a licence depends on how each flow is triggered:
- Automated and scheduled flows run under the flow owner's licence. Other people can benefit from the flow without being licensed themselves.
- Instant flows — anything triggered by a button, a manual run, or Power Apps — run under the invoking user's licence. Microsoft is explicit that everyone who runs a shared instant flow needs their own Premium licence.
Applying that to the downloadable examples on this page:
| Example | Trigger | Who needs Premium |
|---|---|---|
| Teams bot | Automated — fires on a new channel/chat message | The flow owner only. Channel members who talk to the bot do not need licences. |
| HTTP quickstart | Instant (manual button) | Every user who runs it. Sharing the flow with a team means a Premium licence per person. |
| Custom connector | Instant (manual button) | |
| OneDrive analysis | Instant (manual button) | |
| SharePoint analysis | Instant (manual button) |
If per-user licensing does not suit a flow, a Process licence can be assigned to the flow itself instead, giving it premium access and its own daily action entitlement regardless of who runs it. That is usually the cheaper shape for a widely shared automation.
Two further points worth knowing before you plan a rollout:
- Office 365 licences are not sufficient. They include standard connectors only — premium connectors and custom connectors are both excluded, so neither method on this page works on an Office 365 licence alone. The one exception is a Dataverse for Teams environment.
- Importing a flow counts as a modification. Importing, enabling, disabling, or saving a flow that uses premium connectors all require the licence to be in place first. Without it the import fails with "The user does not have a service plan adequate for the non-Standard connection", which reads like a permissions problem but is a licensing one.
Microsoft's Power Automate licensing FAQ is the authoritative reference, and licence terms change — confirm current entitlements with your Microsoft licensing contact before committing to a rollout.
Authentication
Send your Ask Sage API key directly in a custom header named x-access-tokens — it is not Authorization: Bearer, and you don't need to exchange it for a token first:
POST https://api.asksage.ai/server/query
Content-Type: application/json
x-access-tokens: YOUR_ASK_SAGE_API_KEY
{ "message": "What is Ask Sage?" }A successful response returns the model's answer in the message field — read it in a flow with body('<action>')?['message'].
Importing a solution
The fastest path is to import a pre-built solution (each example ships one), then connect and run:
- Power Automate → select your environment → Solutions → Import solution → pick the
.zip→ Import. - Create a connection with your Ask Sage API key (and, where applicable, a OneDrive / SharePoint / Teams connection).
- Open the imported flow, bind it to your connection (or set the
x-access-tokensheader in the HTTP flow), replace any placeholders (file IDs, site URL, model), and Test → Run.
- The OneDrive and SharePoint document-analysis flows set
modeltogoogle-claude-46-sonnet. - The custom connector declares a schema default of
gpt-4o-mini, which applies whenever a flow calls it without passingmodelexplicitly. That is a notably older and weaker model than anything you would pick today — setmodelin the action rather than relying on the default.
Both are still valid model IDs, so nothing fails outright; you simply get an older model than you probably intended. List what your account can actually reach with POST /server/get-models, and see the current model line-up for what to move to.
Examples
Five working examples, each with a downloadable step-by-step guide (PDF) and an import-ready solution (.zip).
The simplest call: a manually-triggered flow that takes a question, sends it to Ask Sage with the built-in HTTP action, and shows the answer. Best for: testing and prototypes.
A reusable Ask Sage connector action — your flows just add a step and fill in a message, with no raw HTTP wiring. Best for: production and teams. Ships in the same solution as the HTTP quickstart.
A Microsoft Teams channel bot powered by Ask Sage, with threaded conversation history and bot-loop prevention. Best for: self-service Q&A inside a Teams channel.
Analyze a PDF stored in OneDrive by sending it to the query_with_file endpoint, then read back the AI analysis. Best for: summarizing or extracting insight from documents.
The SharePoint counterpart to example 4: analyze a document from a SharePoint library with query_with_file, then optionally write the analysis back into SharePoint. Best for: document libraries on a team site.