Dynamic data not working in API call, but the same static text works fine

Hi folks. Struggling a bit with the Microsoft Graph API. We have recently moved from Google Workspace over to M365 so I now have to convert the API calls etc whilst trying to maintain the same functionality.

I have done a lot of debugging on this one and really confused with what is going on, a bug report has been submitted but we’re really trying to get this fixed as soon as possible.

Using this API call: https://graph.microsoft.com/v1.0/me/events

When using dynamic data to fill the list of attendees, using the format as text functionality the API returns JSON invalid, but yet when I send this JSON to my email and paste it in as static text it works and runs fine!

Anybody have an experience like this?