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 Automate / Re: insert row in exce...
Power Automate
Answered

Re: insert row in excel file if it does not exist

(0) ShareShare
ReportReport
Posted on by 13

Tried it but i can't seem to get the condition syntax right

Here is a screenshot

 

flow1.png

Categories:
I have the same question (0)
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    Ah, this is a PowerApps community board, you're using Microsoft Flow. I'll move this thread to the appropriate board, and someone there should be able to answer it.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @majdi_d,

     

    Could you please show a bit more about your Excel table?

    Faurther, do you create a record in Opportunities object of Salesforce?

     

    I think there is something wrong with the formula that you provided within Condition box. The formula that you provided is only supported in PowerApps ranther than Microsoft Flow. More details about expression supported in Microsoft Flow, please check the following article:

    WDL expression in Microsoft Flow

     

    In addition, I think you have a misunderstanding in usage of the "Get row" action of Excel connector. The "Get row" action of Excel connector is used to retrieve a single row from an Excel table, the Row id field of this action is required to fill a Unique identifier of a row in your Excel table ranther than the unique identifier of a record in your Salesforce object.

     

    I assume that you created a record in Opportunity object of Salesforce, I have created a Excel table on my side and the data structure of it as below:6.JPG

    Note: The Opportunity ID column is used to store the unique identifier of a record in Opportunity Object. 

     

    I have made a test on my side and please take a try with the following workaround:

    • Add a "When a record is created" trigger, specify Object type.
    • Add a "Get rows" action, specify File Name and Table Name.
    • Add a "Filter array" action, From set to output of "Get rows" action, Within Condition box, left input box set to Opportunity ID dynamic content (Decorated as Opportunity_x0020_ID within Dynamic Content tab) of "Get rows" action, right input box set to Opportunity ID dynamic content of the trigger. Within middle drop down, choose is equal to.

    Note: If you want to check if there is a record with same Opportunity Name (or other properties) has been existed in your Excel table, within above Condition box, left input box set to Opportunity Name (or other properties) dynamic content.

     

    • Add a Condition, click "Edit in advanced mode", type the following formula:
    @empty(body('Filter_array'))
    • Within "If/yes" branch of Condition, add a "Insert row" action.

    Image reference:7.JPG

     

    8.JPG

    The flow works successfully as below:9.JPG

     

    10.JPG

     

     

    More details about using expression in flow actions, please check the following article:

    Using Expression in flow actions

     

     

    Best regards,

    Kris

     

  • Mike_Guzowski Profile Picture
    219 on at

    If there is nothing much happening after a conditional split please consider using error handling capability of Microsoft Flow along with Termination action with "Succeeded" status.

    Example ("update a row" may be also "get row"):

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks this helped me solve my issue!

  • rusgesig Profile Picture
    6 on at

    So how do we do this now that you can't have custom conditions?

  • Mike29f Profile Picture
    19 on at

    That's fine but what to do when I can't paste custom value?

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard