Building SharePoint-Based Agents with World Bank GDP and Football Data

From structured list queries to PDF knowledge bases and SPFx visualization

A very strong pattern for Microsoft 365 AI solutions is to begin with structured data in SharePoint lists, then evolve toward document generation and knowledge reuse. SharePoint is already positioned by Microsoft as a platform to manage content, knowledge, and applications, while SPFx is the recommended customization model for surfacing those experiences in SharePoint, Teams, and Viva Connections. At the same time, Copilot Studio agents can use knowledge sources and instructions to answer questions over enterprise content, and Power Automate can orchestrate SharePoint, Word templates, and PDF conversion into a repeatable pipeline. (Microsoft Learn)

In this article, I will explore an architecture for a technical blog scenario where:

  1. A SharePoint list stores structured data such as World Bank GDP indicators and football match data.
  2. A first, simpler agent answers directly from that structured list.
  3. A second, more mature architecture uses Power Automate to create analytical documents, convert them to PDF, store them in a SharePoint document library, and let another agent read those PDFs as a knowledge base.
  4. The final result can be surfaced inside a SharePoint page through an SPFx web part. (World Bank Data Help Desk)

Why this architecture is interesting

The beauty of this pattern is that it mirrors how many business solutions mature in real life.

At the beginning, the data is usually tabular and factual. For example:

  • country
  • year
  • GDP value
  • GDP growth
  • match date
  • home team
  • away team
  • score
  • competition
  • commentary

This is ideal for a SharePoint list because lists are excellent for lightweight structured records, filtering, views, metadata, automation triggers, and integration with Microsoft 365. Microsoft also documents SharePoint and Power Automate as tightly integrated, with list and library changes able to trigger flows directly. (Microsoft Learn)

Later, however, users stop asking only factual questions such as:

  • “What was Brazil’s GDP in 2023?”
  • “What was the score of Palmeiras vs. Mirassol?”
  • “Which countries had higher GDP growth than Argentina?”

They start asking higher-value questions such as:

  • “Write a short economic summary comparing Brazil and Argentina.”
  • “Generate a football round-up with tactical and numeric interpretation.”
  • “Create a report that mixes GDP trends and football context for a country.”
  • “Store that report and let another agent use it later.”

That is the moment when documents become useful. A list stores facts. A PDF stores curated interpretation.

That difference is the heart of the architecture.


Conceptual architecture

Layer 1 – Structured operational data

Use one or more SharePoint lists as the system of record for raw, queryable data.

Examples:

  • GDP List
  • Football Matches List
  • Generated Analysis Queue List or Requests List

This is your operational layer.

Layer 2 – Automation and content generation

Use Power Automate to:

  • react when an item is created or modified
  • collect related list data
  • populate a Word template
  • convert the Word document to PDF
  • save the PDF into a SharePoint document library

The Word Online (Business) connector supports both Populate a Microsoft Word template and Convert Word Document to PDF, which makes this pattern especially practical inside Microsoft 365. (Microsoft Learn)

Layer 3 – Knowledge library

Use a SharePoint document library as a curated knowledge repository.

This becomes the place where:

  • generated reports live
  • versioning can be enabled
  • metadata can be applied
  • agents can consume approved PDFs as knowledge sources

SharePoint document libraries are designed for document management scenarios, and version history controls are available at multiple levels in SharePoint Online. (Microsoft Learn)

Layer 4 – Agent experience

Use Copilot Studio or a Microsoft 365 agent pattern to create:

  • Agent 1: reads from structured knowledge and answers direct questions
  • Agent 2: reads generated PDF reports and interacts with richer narrative knowledge

Copilot Studio supports adding knowledge sources to agents, including enterprise and external content, and Microsoft documents the knowledge-source model explicitly. (Microsoft Learn)

Layer 5 – User interface

Surface the final experience in SharePoint using an SPFx web part.

SPFx is Microsoft’s recommended extensibility model for modern SharePoint and can surface the same component across Microsoft 365 hosts. (Microsoft Learn)


Step 1 – Model the SharePoint lists

1.1 GDP list design

Create a list called CountryEconomicIndicators with fields such as:

  • Title → Country + Year
  • CountryName
  • CountryCode
  • Year
  • GDPCurrentUSD
  • GDPGrowthPercent
  • Population
  • Source
  • IndicatorCode
  • NarrativeReady (Yes/No)
  • AnalysisStatus (Choice)

For the World Bank side, the Indicators API provides programmatic access to a very large indicator catalog, and the GDP current-US-dollar indicator uses code NY.GDP.MKTP.CD. (World Bank Data Help Desk)

1.2 Football matches list design

Create a second list called FootballMatches with fields such as:

  • Title → Match label
  • MatchDate
  • Competition
  • Season
  • Country
  • HomeTeam
  • AwayTeam
  • HomeGoals
  • AwayGoals
  • Result
  • Round
  • Summary
  • NarrativeReady (Yes/No)

This list can be fed manually, through Power Automate, through a custom app, or through an API integration.

1.3 Why lists first

Lists work well here because they give you:

  • filtered views
  • permissions
  • automation triggers
  • lightweight data storage
  • a business-friendly administration experience

For this phase, you are not trying to build a data warehouse. You are building an AI-ready operational dataset inside Microsoft 365.


Step 2 – Ingest World Bank GDP data

The World Bank exposes GDP and many other indicators through its Indicators API. That makes it possible to create a small ingestion process that periodically reads values and inserts them into a SharePoint list. The World Bank documentation states that the Indicators API exposes thousands of time series and supports direct indicator queries. (World Bank Data Help Desk)

2.1 Suggested ingestion options

Option A – Power Automate

Use a scheduled cloud flow:

  • Recurrence trigger
  • HTTP action to call the World Bank API
  • Parse JSON
  • Apply to each returned record
  • Create item or update item in the GDP SharePoint list

This is the fastest low-code option.

Option B – Azure Function or console app

Use C# or Python:

  • call the World Bank API
  • normalize the payload
  • write into SharePoint via Graph or SharePoint REST

This is more flexible for larger loads.

2.2 Good practice

Do not dump every possible indicator at once. Start with a narrow, meaningful dataset such as:

  • GDP current US$
  • GDP growth annual %
  • population
  • inflation if needed later

That keeps the list usable, understandable, and agent-friendly.


Step 3 – Create the first simple agent

Now we arrive at the first real agent scenario.

Goal of Agent 1

Answer direct questions from structured business data.

Examples:

  • “What was Brazil’s GDP in 2024?”
  • “Compare Brazil and Argentina GDP growth.”
  • “Show me the latest Palmeiras results.”
  • “Which country had the higher GDP among Brazil, Argentina, and Mexico?”

Why this first version is important

This version is simple, but very valuable.

It proves:

  • the SharePoint list schema works
  • the data quality is good enough
  • the agent can retrieve relevant knowledge
  • users trust the answers

Recommended mental model

This first agent is not really a “writer.”
It is a structured data interpreter.

That means the agent should be guided to:

  • retrieve only relevant records
  • summarize without hallucinating
  • mention when data is missing
  • avoid over-interpreting sparse data

Architecture of Agent 1

Data source
SharePoint lists containing GDP and football records.

Agent
Copilot Studio agent or Microsoft 365 agent pattern.

Behavior
Use structured knowledge and clear instructions such as:

  • answer from available list data
  • compare records when asked
  • be explicit about years and missing values
  • do not invent trends if only one year is present

Copilot Studio supports agent instructions and knowledge sources, which makes this pattern feasible as an initial implementation. (Microsoft Learn)

Strengths of Agent 1

  • fast to build
  • grounded in list rows
  • easy to govern
  • easy to debug

Limitations of Agent 1

  • weak on long-form narrative
  • weak on cross-document reasoning
  • not ideal for reusable analytical memory
  • better at “facts” than “reports”

And that leads naturally to the next evolution.


Step 4 – Add Power Automate to generate documents

This is the turning point.

Instead of asking the agent to create a complex report on the fly every time, you can introduce a content production pipeline.

Core idea

When certain list data reaches a business state, Power Automate generates a report.

Example triggers:

  • a GDP item is marked NarrativeReady = Yes
  • a football round is completed
  • a country-year analysis request is created
  • a comparison request is submitted in a SharePoint list

Power Automate supports SharePoint-based triggers for list and library changes, so this pattern is native to the platform. (Microsoft Learn)

Document generation pipeline

Step 4.1 – Create a request item

A user creates an item in a list like AnalysisRequests.

Fields might include:

  • analysis type
  • country
  • year
  • comparison country
  • competition
  • round
  • output language
  • status

Step 4.2 – Flow starts

A SharePoint trigger such as When an item is created starts the cloud flow. (Microsoft Learn)

Step 4.3 – Gather source data

The flow retrieves:

  • GDP rows from CountryEconomicIndicators
  • football rows from FootballMatches
  • optional notes from another list

Step 4.4 – Build a narrative

At this stage, you can either:

  • assemble a deterministic narrative from dynamic content
  • call an AI action or agent
  • compose a hybrid narrative with rules plus AI summarization

Step 4.5 – Populate a Word template

Use Populate a Microsoft Word template to fill placeholders such as:

  • country name
  • year
  • GDP value
  • football results
  • comparison summary
  • conclusion

Step 4.6 – Convert to PDF

Use Convert Word Document to PDF. Microsoft documents both actions in the Word Online (Business) connector. (Microsoft Learn)

Step 4.7 – Save the PDF in SharePoint

Store the file in a library such as EconomicFootballKnowledgeBase.

Add metadata such as:

  • ReportType
  • Country
  • Year
  • Competition
  • Round
  • RequestId
  • CreatedByFlow
  • ApprovedForAgent

Now you have created a durable knowledge artifact.


Step 5 – Turn the PDF library into a knowledge base

This is where the architecture becomes truly interesting.

Why a PDF layer matters

A SharePoint list row is excellent for facts.

A PDF is better for:

  • curated interpretation
  • narrative context
  • executive summaries
  • reusable knowledge packages
  • approval and archival

Instead of making every future answer recompute the meaning of raw rows, you are now letting the platform build a knowledge memory.

Agent 2 pattern

Create a second agent whose knowledge source is the SharePoint library containing the generated PDFs.

This second agent can answer questions such as:

  • “Summarize the latest Brazil GDP and football report.”
  • “What themes were mentioned in the Argentina comparison reports?”
  • “Compare the narrative tone of the last three reports.”
  • “What risks were highlighted in the 2025 football-economic summary?”

Copilot Studio knowledge sources are designed for this kind of grounding over enterprise content. (Microsoft Learn)

Important architectural distinction

Agent 1

Works mostly from facts and fields.

Agent 2

Works mostly from generated knowledge artifacts.

This is not duplication. It is specialization.

That separation is powerful because it lets you keep raw truth and interpreted truth in different layers.


Step 6 – Why use both football and GDP in the same solution

At first glance, football and GDP seem unrelated. Architecturally, though, they are a great demonstration pair.

GDP gives you

  • stable public data
  • annual time series
  • a clean external API source
  • strong examples of structured indicators

Football gives you

  • high-frequency events
  • narrative-rich summaries
  • user-friendly questions
  • a more dynamic conversational use case

Together, they let you demonstrate two kinds of agent intelligence:

Numeric analytical intelligence

“Which country had greater GDP growth?”

Event narrative intelligence

“How did the team perform recently?”

Combined intelligence

“Generate a country profile that mentions both economic trend and football momentum.”

That makes the blog scenario much richer than using only one dataset.


Step 7 – Governance and design principles

A solution like this looks simple on a whiteboard, but the success depends on disciplined architecture.

7.1 Keep raw and generated content separate

Use:

  • one list for raw GDP
  • one list for raw football data
  • one list for requests
  • one library for generated reports

Do not mix everything into one place.

7.2 Use metadata aggressively

On the PDF library, store metadata that makes filtering and agent scoping easier.

Examples:

  • ReportDomain = GDP / Football / Hybrid
  • Country
  • Year
  • Competition
  • MatchRound
  • PublicationStatus
  • AgentVisible

7.3 Approve before exposing to the second agent

Do not let every generated PDF become a knowledge source automatically.

A better pattern is:

  • flow generates PDF
  • reviewer checks it
  • metadata field AgentVisible = Yes
  • only approved content becomes agent knowledge

7.4 Preserve versioning

Document libraries support version history controls, which is useful when your analytical wording evolves over time. (Microsoft Learn)

7.5 Avoid overloading SharePoint lists

Use SharePoint lists for operational records, not for massive historical analytical storage. Microsoft has guidance discussing different storage options and tradeoffs in SharePoint-based solutions. (Microsoft Learn)


Step 8 – How SPFx fits into the final solution

SPFx is the presentation layer that makes the whole solution feel like a product instead of a back-end experiment.

Microsoft positions SPFx as the recommended model for SharePoint customization, and client-side web parts are the building blocks of modern SharePoint pages. (Microsoft Learn)

What the SPFx web part can do

A single SPFx web part can present:

  • a small dashboard with GDP cards
  • a latest football match summary
  • a button to submit a new report request
  • a chat launcher for Agent 1
  • a panel showing recently generated PDFs
  • a second chat experience for Agent 2

Example page layout

Section A – Structured data panels

  • Latest GDP by selected country
  • Top GDP growth changes
  • Latest football results

Section B – Actions

  • Generate report
  • Open knowledge base
  • Ask agent

Section C – Knowledge artifacts

  • latest generated PDFs
  • report metadata
  • approval status

Section D – Agent interaction

  • inline embedded conversational experience
  • quick prompts

This turns the architecture into a real SharePoint business application.


Step 9 – Recommended phased implementation

Phase 1 – Data foundation

Build the SharePoint lists and ingest only a small, reliable GDP sample plus a football dataset.

Deliverable:

  • clean list schema
  • validated rows
  • simple views

Phase 2 – First agent

Create Agent 1 over the structured list data.

Deliverable:

  • direct Q&A over GDP and football rows
  • prompt guardrails
  • grounded answers

Phase 3 – Request-driven narrative generation

Create the request list and Power Automate flow that generates Word and PDF reports.

Deliverable:

  • one-click or list-triggered report generation
  • PDF stored in SharePoint library

Phase 4 – Knowledge-base agent

Create Agent 2 over the generated PDF library.

Deliverable:

  • narrative Q&A over curated reports
  • better executive interaction

Phase 5 – SPFx experience

Build an SPFx web part that brings together:

  • request form
  • dashboards
  • knowledge library
  • agent launch points

Deliverable:

  • a modern SharePoint page experience

Step 10 – A practical reference scenario

Let us imagine the following end-to-end case.

A user opens a SharePoint page with an SPFx web part.

The page shows:

  • Brazil GDP for recent years
  • recent football matches for Brazilian clubs or national teams
  • a button called Generate Country Sports-Economy Brief

The user clicks the button.

That action creates an item in AnalysisRequests.

A Power Automate flow starts from that SharePoint trigger, collects the relevant GDP and football rows, populates a Word template, converts it to PDF, and stores it in a document library. The document is then marked for review. After approval, another agent can use that PDF as knowledge. (Microsoft Learn)

Now you have two different user experiences:

  • one agent for immediate factual queries
  • one agent for higher-level report-based interaction

That is a very elegant Microsoft 365 architecture.


Benefits of this architecture

Business benefits

  • fast time to value
  • low-code friendly
  • traceable content lifecycle
  • easier governance than ad hoc AI prompts
  • reusable knowledge generation

Technical benefits

  • clear separation of concerns
  • SharePoint-native storage
  • Power Automate-native orchestration
  • SPFx-native presentation
  • agent evolution without redesigning everything

AI benefits

  • grounded answers from structured facts
  • curated narrative memory through generated PDFs
  • opportunity to split responsibilities across specialized agents

Limitations and cautions

1. Raw list answers are only as good as the data quality

If your list fields are inconsistent, the first agent will feel unreliable.

2. Generated PDFs can amplify bad logic

If the template or narrative rules are weak, the second agent will confidently reuse weak content.

3. Knowledge libraries need governance

Not every PDF should be exposed automatically.

4. SharePoint is not your analytical warehouse

For very large economic or sports history datasets, you may eventually want a dedicated data platform and keep SharePoint as the operational and presentation layer.


Final architectural recommendation

If I were implementing this for a real Microsoft 365 solution, I would recommend the following target pattern:

Recommended target

  • SharePoint List A: GDP operational data from World Bank
  • SharePoint List B: football match operational data
  • SharePoint List C: report generation requests
  • Power Automate: orchestrates retrieval, templating, PDF conversion, and storage
  • SharePoint Document Library: stores generated PDF reports with metadata and approval
  • Agent 1: structured Q&A over list-driven facts
  • Agent 2: narrative Q&A over approved PDF knowledge artifacts
  • SPFx Web Part: presents dashboard, actions, reports, and agent entry points

This gives you a layered architecture that starts simple, scales well, and stays aligned with Microsoft 365 capabilities. (Microsoft Learn)


Step-by-step implementation roadmap

StepWhat to buildMain Microsoft 365 componentOutcome
1Create GDP listSharePoint ListStructured economic data
2Create football listSharePoint ListStructured sports data
3Load World Bank GDP valuesPower Automate or custom ingestionReliable external indicator data
4Create direct Q&A agentCopilot StudioStructured factual interaction
5Create request listSharePoint ListUser-driven analysis workflow
6Build report flowPower AutomateWord + PDF generation
7Store reports with metadataSharePoint Document LibraryCurated knowledge repository
8Create second agent over PDFsCopilot StudioNarrative knowledge interaction
9Build page experienceSPFx web partUnified user experience
10Add approval and governanceSharePoint + library metadata + processSafer enterprise AI lifecycle

Technical component summary

ComponentRole in the solutionWhy it matters
SharePoint ListStores structured GDP and football recordsBest for operational tabular data
World Bank Indicators APIProvides public GDP indicatorsReliable external data source
Power AutomateOrchestrates triggers and document generationLow-code automation backbone
Word Online (Business) connectorPopulates templates and converts to PDFNative document pipeline
SharePoint Document LibraryStores generated reportsDurable knowledge artifacts
Copilot Studio Agent 1Answers from structured list dataFast first milestone
Copilot Studio Agent 2Answers from curated PDFsHigher-value narrative interaction
SPFx web partSurfaces UI in SharePointProduct-like user experience

Source map for your blog research base

TopicRecommended source
SharePoint platform overviewMicrosoft Learn SharePoint introduction
SPFx architectureMicrosoft Learn SPFx overview
SharePoint + Power Automate integrationMicrosoft Learn SharePoint and Power Automate overview
SharePoint triggers/actionsMicrosoft Learn SharePoint connector docs
Copilot Studio knowledge sourcesMicrosoft Learn Copilot Studio knowledge docs
Word template and PDF conversionMicrosoft Learn Word Online (Business) connector docs
World Bank GDP APIWorld Bank Indicators API documentation

Edvaldo Guimrães Filho Avatar

Published by