I am building an autonomous agent in Copilot Studio with a trigger = Daily at 5 am. The agent is designed to search the web for articles on particular topics and send me an email with links to the articles it found along with a short summary of the contents of the article. When testing the agent, I do see that it is searching for articles and it does provide a decent output (not always consistent) but when I click the link to the article, I always get 'Page Not Found' messages. When looking at the url the agent provided me, it is consistently grabbing the parent URL and adding the name of the article right after it. However, in most cases, the articles lives a few levels deep, which is not being captured in the url.
I need help figuring out how to instruct the agent to give me valid links. I've add specific websites as knowledge and still get broken links. I tried removing all websites from the knowledge and still get broken links.
Another issue I'm experiencing is when I test the trigger, I can see the summary of articles in the test chat but I don't always receive an email with the output. When I ask the agent for the email, it does send it but as plain text and not in rich text, like it was configured. But again, I had to prompt it to send me the email, which defeats the purpose of this being an autonomous agent.
Here are the instructions I am using, for reference:
Trigger
Run daily at 5:15 AM CST
Step 1: Search and Select Articles
Retrieve up to 20 articles published within the last 24 hours
Include at least 3 articles per topic:
-Consulting industry developments
-Leadership insights and trends
-Artificial Intelligence (AI) advancements
Use primary sources only (e.g., Forbes, MIT Technology Review, Harvard Business Review, etc.)
Exclude aggregator sites (e.g., Flipboard, Pocket)
If fewer than 3 articles are found for a topic, include as many as available
If no articles are found within 24 hours, expand the search to include articles published within the last 72 hours
Step 2: Verify URLs
Ensure each URL returns a 200 OK status
Exclude any links that:
-Redirect to homepages
-Return errors (e.g., 404, 403)
-For each article, extract the actual, complete URL from the page’s metadata.
Prioritize the <link rel="canonical"> tag if available.
If the canonical tag is missing or invalid, use the final resolved URL after following any redirects.
Do not use placeholder URLs (e.g.,
Validate each URL by performing a GET request and confirming:The response status is 200 OKThe page content matches the article title and summaryThe URL includes all necessary path segments and does not redirect to a homepage or error page
If a valid URL cannot be found, skip the article and continue processing the rest.
-Confirm each link leads directly to the article
If a link is broken:
-Search for a valid alternative from the same source
-If none found, skip the article and continue processing the rest
Step 3: Send an Email using (added the Send an Email tool here)
Format the selected articles into a rich text email using HTML or Markdown.
Start the email with:
"Hi [Recipient Name], here is your daily news on key topics:"
For each article, include:
-Title as a clickable hyperlink
-Source name in italics or (parentheses)
-1–3 sentence summary explaining relevance to the topic
The email must include:
-Bold section headers (e.g., Consulting Industry Developments)
-Clickable hyperlinks embedded in article titles
-Source name in italics or (parentheses)
-Bullet points or spacing between articles for readability
-A clean, professional layout with visual hierarchy
If any topic has fewer than 3 articles, include a note indicating limited coverage for that section
Do Not Ask Questions
-The email should be informative only
-Do not include questions or prompts to the user