Skip to main content

Notifications

Copilot Studio - General
Unanswered

Copilot Studio - handle attachments?

(1) ShareShare
ReportReport
Posted on by 14

Hi everyone,

I’m looking to read the contents of Activity.Attachments in Copilot Studio. Currently, I receive a table as the result. I’m not sure how to handle this table object or data type in my Copilot project. My goal is to forward this table (referred to as @Attachments) to a webhook. Alternatively, I would also consider storing these attachments or information somewhere and then just providing the URL.

Has anyone dealt with something similar or have any suggestions on how to approach this?

Thanks!

Categories:
  • Suggested answer
    FLMike Profile Picture
    FLMike 29,105 on at
    Copilot Studio - handle attachments?
    Hi,
     
    Without seeing the flow itself, its a little bit of a guess here.
     
    The attachments "property" is always a Table, because it can have 1-M attachments. 
     
    Now this is where you don't have enough details to fully answer so I will guess.
     
    Your webhook only allows for 1 attachment??? and therefor you need to grab the single "Row" of the Attachments, even though it looks like a table.
     
    Even though attachments may only have 1, its still a Table. so if you know for sure, its always just 1 you have 2 options.
     
    1. You can add an Apply to Each(or a For Each). Inside that "loop" it will give you the first attachment. Use that to send to your webhook
    2. You can access the Array of Attachments by ordinal like
    Attachments[0] and then you need to grab the Content so validate this by looking at your content from Activity.Attachments and it will be in a JSON format.
    Work your way to until you get to the properties with name and contents
     
    Silly example
     
    Attachments[body/value][0]['Name']
    Attachments[body/value][0]['contentBytes']
     
    Like that, now send to your Webhook.
     
     
     
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard