Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Creating a ActivityMimeAttachment

Hi Everyone,


I am trying to create an attachment and link it to an appointment in CRM Dynamics.


I am running into a problem that it won`t let me save the flow because it gives me an error:


"Definition contains invalid parameters"


I have checked all parameters en what kind of value they should have and i really don`t know what im doing wrong here.

Hopefully someone can help me.


Let me guide u to the flow from beginning until the end:


In short:

1:Trigger - When appointment is created

2: Action - Get case record

3: Action - Get annotations records with Odata query

4: Parrallel Branch


4.1.1: (ForEach) Get appointment record

4.1.2: (ForEach) Edit appointment record


4.2.0 (ForEach) Condition if isdocument from step3 true

4.2.1 (ForEach) Create attachment record

4.2.2 (ForEach) Create ActivityMimeAttachment record

So this all works great. The problem comes at step 4.2.2


I will give u printscreens from all items that relate to the parallel branch:


Here i get all annotations from the Appointment record with Odata query.



Here i say If annotation record has a attachment:



Then create a attachment in CRM (i do this because i need a attachment ID in order to create an ActivityMimeAttachement, and i need an activitymimeattachment in order to link a attachement to an appointment 🙂 )




So above dynamic content all comes from the Annotation Record. It gets the filename, mimetype, i dont know why i have to add a subject to the attachment but ok, for this i use the titel of the annotation. Then all things are good, attachement is created. Ready to link this attachement to the appointment by creacting a new record from the entitiy ActivityMImeAttachment.


I use the attachment ID from the Record i just created in step 4.2.1.

I have to fill in a Item ID. This is the ID of the appointment. I get this from the annotation record step 3.

The same with Item type.


So all fields are filled and now its give me the error of the definition contains invalid parameters?

What im a doing wrong?



error flow definitions parameters.PNG

Level 8

Re: Creating a ActivityMimeAttachment

Must be something wrong with the content you filled in th fields, let me try and tell you the result later.

Level: Powered On

Re: Creating a ActivityMimeAttachment

have u been able to try it and have results?

im very curious what im doing wrong.


btw i think u are right about that there is something about the content in the fields im not doing right, but i just dont know it.


Thanks in advance.

Level: Powered On

Re: Creating a ActivityMimeAttachment

Hi Leo9,


I created a new flow and made it possible for all the fields to be correct so i can save my flow and let it get triggered.

But then i got the error message: That the Action: Create Record for CRM Dynamics is not possible on the entity Attachment.


So this means that its just nog possible to let Flow create an attachment in CRM..

Is there anyone that can confirm this or is there still a possibility?



Helpful resources


Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!


Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,899)