web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to capture eventId...
Power Apps
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?
 
I have the same question (0)
  • SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
    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
     
  • egoscin Profile Picture
    28 on at
    On this portion I get an eventid isn't recognized error: 

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

     
  • Verified answer
    egoscin Profile Picture
    28 on at
    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!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard