Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Unanswered

How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

(0) ShareShare
ReportReport
Posted on by

I have a Portal Contact Us Page that accepts attachments that make their way into the Lead entity. I pick up the new Lead entry in Power Automate and I sent an email to users using an Outlook Connector to create a new email. I have the email set up as you can see in the image but I cannot figure out how to access the <NOTES (Annocations) Table >to either add the attachment to the email in Power Automate?

 

What steps are necessary in Power Automate to add the atachment into the email I am generating? 

 

2022-03-08_10-43-19.gif

Categories:
  • Prakash4691 Profile Picture
    Prakash4691 1,332 on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    @bradlaw ,

    Not sure what is the issue but it should work fine.

    Validate your last run and check output for the actions which is not working as expected.

     

     

    Regards,

    Prakash

  • bradlaw Profile Picture
    bradlaw on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    Thank you both, I still do not have this working correctly. It runs just fine with these final steps but I don't get an email from the Apply All Step? The normal send email does work above the Apply All email send however?

     

    when these two send emails are in the same flow, the first one without the Apply All does send an email. The second one with the Appy to All does not send an email. 

    2022-03-11_21-36-04.gif

     

    Even when I add the suggested Compose content like this it does not work.

     

    bradlaw_0-1647053513863.png

     

    This one does appear to run successfully in FLOW, but no email is sent. 

     

    2022-03-11_21-43-50.gif

  • bradlaw Profile Picture
    bradlaw on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    Ok. Yes, this was a text file attachment. I'll take a look.

  • Prakash4691 Profile Picture
    Prakash4691 1,332 on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    @bradlaw ,

    Check output of compose action whether you can able to see base64 string of file content. If it is a txt file then content type is fine or else as I mentioned earlier for different file type you need to add condition and change the content type accordingly.

     

    Regards,

    Prakash

  • bradlaw Profile Picture
    bradlaw on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    @rampprakash,

     

    Good news is I was able to follow your instructions and I am receiving an errors when running the flow. My attachment has a ".txt" attachment I assume it needs to be based on the Compose step you suggested?

     

    The error is 

     

    Request to XRM API failed with error: 'Message: Flow client error returned with status code "BadRequest" and details "{"error":{"code":"InvalidOpenApiFlow","message":"Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'Apply_to_each_-_Utilize_Document_and_Send_Email' referenced by 'inputs' in action 'Compose' are not defined in the template.'.'."}}". Code: 0x80060467 InnerError: '.

     

     

    2022-03-09_16-13-55.gif

    2022-03-09_16-14-18.gif

     

     

     

     

  • Prakash4691 Profile Picture
    Prakash4691 1,332 on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    @bradlaw ,

    For filter rows the field you need to include is _objectid_value eq 'leadid', leadid should be from previous request. To get exact content of attachment compose an action. If there are multiple mime types involved kindly add condition to check for diff types. While sending an email, for attachment content include output of compose and file name from notes.

     

    I will include couple of screenshots for your reference.

     

    If it answers your question, kindly give kudo and accept it as solution.

     

    Prakash4691_0-1646789318505.png

    Prakash4691_2-1646789506363.png

     

     

    Regards,

    Prakash

  • bradlaw Profile Picture
    bradlaw on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    @rampprakash,

     

    Thanks so here is what I have, where can I verify the syntax of the filter? I just cannot seem to get the filter correct? Also ocne I get this correct, do I get the File Content and File Name by initilizing them as variables?

     

    2022-03-08_13-29-33.gif

     

     

    2022-03-08_13-28-12.gif

     

     

     

     

  • Ram Prakash Profile Picture
    Ram Prakash 5,154 on at
    Re: How do I Access Dynamics 365 attachments (Leads) from Notes (Annotations) via Power Automate?

    Hello @bradlaw 

     

    Hope you are doing good.

     

    Steps to Follow:

     

    1. List Rows for Notes

        Filter _regardingobjectid_value eq 'LeadId'

    2. Get the File Content and File Name and use it 🙂

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

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,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard

Featured topics