Skip to content

Ask Salesforce questions in Microsoft Teams with a read-only Copilot agent

Reps and managers ask questions about deals and quotes in their work chat and get answers straight from the CRM, limited to what they are allowed to see. No digging through reports.

Curated by Andrew Donato, Editor. Reviewed .

Get one setup like this every Thursday, by email.

Written for sales leaders running leaner teams.

Free. One email a week. Unsubscribe anytime.

Paste this into ChatGPT, Claude or your agent tool. See the prompt

  • RevOps Reporting
  • intermediate
  • RevOps
  • AE
Category
RevOps Reporting
Difficulty
Intermediate
Est. cost
Not stated by source
Want this running on your team by next week? We'll set it up with your tools.

What problem does this solve?

Reps and managers want quick answers about quotes and opportunities without opening reports. An agent that guesses CPQ field names gets it wrong and makes many tool calls.

How is the agent set up?

A Copilot Studio agent with web knowledge removed has one tool, the Salesforce connector's Execute a SOQL query, which keeps it read-only. The query input is set to fill with AI, end-user authentication makes each person see only their own permissions, and the agent instructions list the org's field API names plus example queries. It is published to Microsoft Teams.

Want this built for your team? Let's talk.

What prompt does it use?

Starter prompt by The GTM Agent Weekly, written from the setup described on this page. It is not the source's own prompt; see the source link below for their write-up.

Starter prompt · 23 lines
# ROLE
You answer questions about our Salesforce data in chat. You have one tool: run a read-only
SOQL query as the signed-in user. You never change data.

# FIELD REFERENCE (fill in)
- Opportunity: Name, StageName, Amount, CloseDate, OwnerId, {{CUSTOM_FIELDS}}
- Account: Name, Industry, OwnerId, {{CUSTOM_FIELDS}}
- Stage values: {{STAGE_VALUES}}. Fiscal year starts: {{FY_START}}.

# EXAMPLE QUERIES
- "My open deals closing this month": SELECT Name, Amount, CloseDate, StageName FROM Opportunity
  WHERE OwnerId = '{{CURRENT_USER_ID}}' AND IsClosed = false AND CloseDate = THIS_MONTH
- {{MORE_EXAMPLES}}

# HOW TO WORK
1. Turn the question into one SOQL query using only the fields above.
2. Run it. If it errors, fix the query once; if it fails again, say so.
3. Answer in plain language with a short table. Mention the filter you used.

# GUARDRAILS
- Read-only. No web answers, no guessing beyond the query results.
- If results are empty, say "no records found" and suggest a broader question.
- Keep results to {{MAX_ROWS}} rows; offer to narrow down.

Replace every {{PLACEHOLDER}} before running. Works with any capable LLM and runner.

Get 5 setups like this every week, free.

Real agent setups with prompts, sources and failure modes, in one short weekly email.

Free. One email a week. Unsubscribe anytime.

What tools does it use?

How do you set it up?

  1. Create the agent and remove web search from its knowledge sources.
  2. Add only the Execute a SOQL query tool from the Salesforce connector.
  3. Use end-user authentication so each user's Salesforce permissions apply.
  4. Put the field list and example queries in the agent's Instructions box.
  5. Test in a fresh chat after each change, then publish to Teams.

What results are reported?

Practitioner walkthrough; the author reports fewer tool calls per question once the field list moved into instructions. No figures are given.

What goes wrong

Where does this break?

  • Field lists put in the tool's description did not reliably reach the agent; the Instructions box did.
  • A shared connection gives everyone your Salesforce access; fine for a test, wrong for a company.
  • Where the agent is available in Teams cannot be changed after publishing.

This is where most teams get stuck. Want us to handle the setup?

Source and credit

dev.to ›

Sahl Ebrahim, DEV Community · newsletter

Source dated 2026-10-11 · last reviewed 2026-10-11. Summarized in our own words; see the source for details.

Related.

Test whether an ROI walkthrough should be a required deal stage

This analysis checks whether deals that include an ROI or business-case conversation actually win more often, comparing like with like. Leaders can decide on a required sales step with evidence instead of instinct.

Works with any of SalesforceHubSpotGong +6

  • RevOps Reporting
  • advanced
  • Reference setup

A Slack paid media agent that reports weekly and proposes ad changes

Every Monday an agent joins ad platform spend with pipeline from the warehouse and posts a report per channel in Slack. People ask follow-up questions in the thread, and any campaign change it proposes waits for an authorized reviewer.

Works with SlackGoogle AdsMeta Ads +3

  • RevOps Reporting
  • advanced

Build an AI CMO chat that answers GTM questions only from your own data

Load ad, web, search and CRM data into one warehouse, put live reports behind company sign-in, and add a chat assistant that answers marketing and pipeline questions only from those sources and links every number to where it came from.

Works with HubSpotGoogle Analytics 4Google Search Console +3

  • RevOps Reporting
  • advanced