Copilot AI Agent: QR Code Generator

At Hypergen, we get a lot of questions from businesses wanting to build their own AI agents. While we absolutely can write custom code when needed, we often recommend starting with out-of-the-box tools like Microsoft 365 Copilot Chat. In many cases, you can build something useful without writing a single line of code.

We also encourage businesses to start small with AI agents. You do not need to create a complex, multi-step assistant from day one. In fact, some of the most valuable agents are simple, designed to automate a task that is repetitive, annoying, or unnecessarily manual.

This QR code generator is a good example. Most online QR code generators are hit or miss. Many require an email or account just to do something that ought to be straightforward. And if you need something that can generate QR codes for internal resources, for example links you do not want to publish to the web, they can be tricky to find.

So this Copilot QR code generator is a small utility that solves a real problem, and it is a practical first agent if you are just getting started with Microsoft Copilot Studio or Microsoft 365 Copilot Chat.

The generator takes a URL as input, allows the user to optionally choose a colour, and returns a downloadable QR code image, typically with a transparent background. It does not require sign-ups, uses the built-in (and securely sandboxed) code interpreter that comes with Copilot, and runs directly within your private Microsoft 365 tenant.

How to Build the Copilot QR Code Generator

  1. Go to m365.cloud.microsoft/chat
    This is the home of Microsoft 365 Copilot Chat, where you can create and manage simple AI agents.
  2. Click "Create an Agent" on the right-hand panel.
    This will launch the agent builder where you can describe what you want it to do.
  3. Enter a description of your agent.
    For example: "I want to build an agent that takes a URL, generates a QR code with a transparent background, and returns the image." Copilot will automatically start drafting the agent for you.
  4. Switch to the Configure tab to refine the agent.
    • Review and adjust the system prompt as needed.
    • Test your changes using the built-in chat panel.
  5. Enable the Code Interpreter tool.
    This allows Copilot to generate and run Python code behind the scenes. It is essential for generating the QR code.
  6. Add starter prompts.
    These are example messages that guide users. Include prompts like:
    • "Generate a black QR code for https://contoso.sharepoint.com"
    • "Create a blue QR code for https://myapp.internal"
  7. Test your agent.
    Paste a URL into the chat and confirm the QR code is generated correctly. Most of the time, the background will be transparent. In rare cases it may default to white.

That is it. You now have a lightweight, private, no-sign-up QR code generator powered by Microsoft 365 Copilot.

Bonus: Our Exact QR Code Agent Configuration

If you want to skip the setup and replicate what we use at Hypergen, here is the exact configuration for our agent.

Agent name: Hypergen QR code generator

Description: "Enter a URL and I'll reply back with a QR code for you, aligned to your brand's colours."

Instructions:

  • Generate QR codes for users.
  • If users do not provide a URL, ask for one.
  • If the user does not specify a colour, always ask for the colour they wish the QR code to be in. Offer 3 options: Dark Purple #77368E, Mid Purple #9644B3, or Grey/Purple #BAB4D4.
  • Never reply with code to the user. Always respond with a generated image by calling your code interpreter tool.
  • The QR image returned should be in .png format.
  • The QR image background should always be transparent, even if not specified by the user.
  • If any other request comes in, say you cannot help and instead ask for a URL to convert to a QR code.

Knowledge: None required

Web search: Off

Code interpreter: On (this runs a Python script in the background to generate the QR code for you)

Image generator: Off

Starter prompts:

Title Message
Dark Purple Create a QR code in Hypergen dark purple
Mid Purple Create a QR code in Hypergen mid purple
Grey/Purple Create a QR code in Hypergen grey/purple

Where to Go from Here

A QR code generator is a small starting point, but it demonstrates a broader principle: many useful AI agents do not require custom development. Microsoft 365 Copilot Chat makes it possible to build practical tools in minutes, using capabilities your organisation may already have access to.

If you are interested in identifying where AI agents could add value across your business, our AI Accelerate Workshop is designed to help teams surface and prioritise those opportunities. And if your team is looking to build confidence with Copilot and the broader Microsoft AI toolset, our AI Skilling programmes provide a structured path from fundamentals to hands-on agent building. For teams that want a senior practitioner on call as they build more agents, our M365 Copilot support packages cover prebuilt agents, custom agents, and Cowork use cases.

Ready to explore what AI agents can do for your organisation?

Whether you are just getting started with Microsoft 365 Copilot or looking to build more advanced agents, we can help you find the right approach for your business.

Get in Touch