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.
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.
model set to google-claude-46-sonnet. If that model isn't enabled in your tenant, change it to one that is — list available models with POST /server/get-models. 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.