Hello Power Automate Community,
I hope you can help please.
I'm using the "Common Data Service (Current Environment)" connector. I want the Flow to run when:
An "Opportunity" is marked as "Close Won"
And
The "Opportunity" field "Originating Lead" is populated.
I'm doing this using a"Conditional Trigger" and it's working great, so long as a value is populated in the "Opportunity" field "Originating Lead". See below:

But if that's not populated I get a failed message.
The next step in the Flow after the trigger is to get the Originating Lead GUID. So I used the "Get Record" action. But I receive the below error because the Opportunity didn't have a value in it's Originating Lead field.

I read somewhere that I should use the "coalesce", and I read information about that at this URL https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-isblank-isempty but I just can't write the expression needed to substitute the below expression using coalesce.
@not(equals(triggerBody()?['originatingleadid_value'],'null'))
Any ideas on how to do that please? I believe the problem is the 'null' value, as that's a string and it's looking for an integer.
Thanks in advance to anyone that can help, I've wasted many hours trying to solve this.
Garry