cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jam05eun
Regular Visitor

ID is malformed - Update Event (v4)

 

Hello,

I'm new to flow and I've been working on this error for 2 days and I can't really find the solution. 😞

I'm working on Sharepoint Calendar items, when an event is added to calendar, email will be triggered and it will also reflect in Outlook calendar (Create Event - this is working for me). And, if the event added is just updated, it will trigger another email and it needs to be updated as well on Outlook calendar (Update Event - this is where I get ID is malformed error).

My trigger is When item is added or modified, I added a condition and compare Created and Modified.

Please help me 😞 Thank you!

 

Body

{
  "status"400,
  "message""Id is malformed.\r\nclientRequestId: 49db1677-ffd7-434e-9127-d420bde0f9cb\r\nserviceRequestId: bb9029fc-8ab8-4f70-a569-2d9c62982b30",
  "error": {
    "message""Id is malformed.",
    "code""ErrorInvalidIdMalformed",
    "originalMessage""Id is malformed."
  },
  "source""office365-we.azconn-we-01.p.azurewebsites.net"
}
 
 
Header
{
  "Pragma""no-cache",
  "x-ms-request-id""bb9029fc-8ab8-4f70-a569-2d9c62982b30",
  "Strict-Transport-Security""max-age=31536000; includeSubDomains",
  "X-Content-Type-Options""nosniff",
  "X-Frame-Options""DENY",
  "Cache-Control""no-store, no-cache",
  "Set-Cookie""ARRAffinity=4327f3090a5b43f7b4821c2374826cd7a580e763791307bcfff20f84a98b5c22;Path=/;HttpOnly;Secure;Domain=office365-we.azconn-we-01.p.azurewebsites.net,ARRAffinitySameSite=4327f3090a5b43f7b4821c2374826cd7a580e763791307bcfff20f84a98b5c22;Path=/;HttpOnly;SameSite=None;Secure;Domain=office365-we.azconn-we-01.p.azurewebsites.net",
  "Timing-Allow-Origin""*",
  "x-ms-apihub-cached-response""true",
  "Date""Thu, 25 Mar 2021 05:27:12 GMT",
  "Content-Length""371",
  "Content-Type""application/json",
  "Expires""-1"
}

ID is malformed 1.JPG

 

 

ID is malformed 2.JPG




1 ACCEPTED SOLUTION

Accepted Solutions
annajhaveri
Super User
Super User

@jam05eun  i see that in Update Event action, you are using SharePoint calendar item in the Id parameter, that wont work. There are two options to get around this:

 

First option:

1. You will need the Calendar event Id which is created when you use Create Event, so i think you will need on extra column in SharePoint Calendar list to store Calendar ID, after Create Event, add Update item to update the Id from Create Event action in the new column that you added in SharePoint list to store the Id, and then modify the Update Event action to use Id from the new column

 

2. You can add "Get Events" action before the Update Event action to fetch the event from Calendar first, and then use Id from "Get Events" in the Update Event Id parameter. The only catch here is you need to apply filter query to get the event, you need to build filter query in such a way so that it returns event that you are looking for using attributes like subject, start date, etc

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

15 REPLIES 15
annajhaveri
Super User
Super User

@jam05eun  i see that in Update Event action, you are using SharePoint calendar item in the Id parameter, that wont work. There are two options to get around this:

 

First option:

1. You will need the Calendar event Id which is created when you use Create Event, so i think you will need on extra column in SharePoint Calendar list to store Calendar ID, after Create Event, add Update item to update the Id from Create Event action in the new column that you added in SharePoint list to store the Id, and then modify the Update Event action to use Id from the new column

 

2. You can add "Get Events" action before the Update Event action to fetch the event from Calendar first, and then use Id from "Get Events" in the Update Event Id parameter. The only catch here is you need to apply filter query to get the event, you need to build filter query in such a way so that it returns event that you are looking for using attributes like subject, start date, etc

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Hello! I'm trying to follow your solution 1, am I doing it correctly this way??

ID is malformed 3.JPG

 

 

 

@jam05eun Make below changes:

1. In Update Item -> Id parameter, select ID from Dynamic Content - from Trigger - ID

annajhaveri_1-1616665893206.png

 

2. You will also see Calendar new ID column in Update Item - there select Id from Dynamic content (Create Event) 

annajhaveri_2-1616665925512.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Thank you anna! IT is now working, however, whenever I create an item, it sends out the Create Item email and after less than a minute, it will also send the Modified email even if I don't change anything on the event. Is it because of the Update item after the Create event(v4) activity?

@jam05eun  yes it could be because of update item, are you using separate service account for the flow connection to connect to SharePoint.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

@annajhaveri i'm using 1 service account, is there a trigger condition expression that we can use so Modified event flow will not be triggered on Update item activity? 🤔

@jam05eun yes you can add trigger condition as follow, provide service account email in place of "user@company.com"  So this will prevent the flow triggers when service account updates the item, which will happen from the flow as flow is using service account.

@not(equals(triggerOutputs()?['body/Editor/Email'],'user@company.com'))

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

hi @annajhaveri , amazing! it works on my email, what if this flow will be used by many users? can we make it dynamic?

@jam05eun  yes this flow works for many users, what you want to make dynamic in this flow?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

@annajhaveri I mean on the trigger condition, it works only if I used my email address. Will it work the same if my teammates created an item? Can we use like 'Created by Email' instead of static email address? haha I just thought of it, I'm not sure if my idea is valid.

@jam05eun  the trigger has not equal to condition so the flow will always trigger when the user who has modified the item is not the service account. We are using static email address because we dont want flow to trigger when this specific service account has modified the item and any other user who modifies the item the flow will trigger.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

@annajhaveri thanks for explaining it to me 😊 I got it now. 

The flow became out of control now, lol suddenly, it sends out multiple emails and I'm getting this error...

UI.JPG

@jam05eun  this is just a warning, the trigger condition that you have added will avoid the infinite trigger loop.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

I have tried doing your #2 solution, and I can't seem to get it to work. Because one of the filter parameters always changes. I'm trying to create a "master calendar" under a user that all events will copy to that calendar and update and delete. 

@AddLanierLaw  the Get Events does not work for you? What is your scenario for filter parameter always changes?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,801)