Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Answered

How to capture eventId from flow but still capture error

(2) ShareShare
ReportReport
Posted on by 28
I am trying to do error handling and capture the ID returned by this flow call 'CreateEvent.Run'. It is a power automate flow that creates an event in an Outlook user's calendar.

The problem is when I wrap it in IfError, it does error checking on the UpdateContext function that I am using to capture the resulting eventID and not the 'CreateEvent.Run' function.

IfError(UpdateContext({id:CreateEvent.Run(
// contents
 
).eventid}),Notify("Error Creating Event",NotificationType.Error),


How do I capture the eventid but still do error handling on the 'CreateEvent.Run() Power Automate function?
 
  • Verified answer
    egoscin Profile Picture
    egoscin 28 on at
    How to capture eventId from flow but still capture error
    I got it to work. It should look something like this: 
     
    Set(varEventResult, CreateEvent.Run(
        // Parameters for the flow
    ));
    IfError(
        varEventResult,
        Notify("Error Creating Event", NotificationType.Error)
    );
     
    Set(varEventResultID, varEventResult.eventid


    Thanks for the help!
  • egoscin Profile Picture
    egoscin 28 on at
    How to capture eventId from flow but still capture error
    On this portion I get an eventid isn't recognized error: 

    IfError(
        Set(varEventID, varEventResult.eventid),
        Notify("Error Creating Event", NotificationType.Error)
    );

     
  • SaiRT14 Profile Picture
    SaiRT14 1,926 on at
    How to capture eventId from flow but still capture error
    Hi  
     
    pls try the following:
    Set(varEventResult, CreateEvent.Run(
        // Parameters for the flow
    ));
    IfError(
        Set(varEventID, varEventResult.eventid),
        Notify("Error Creating Event", NotificationType.Error)
    );
     
    Thanks
     

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

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard