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 / Create a flow with: fo...
Power Automate
Answered

Create a flow with: forms, sharepoint and excel

(0) ShareShare
ReportReport
Posted on by 10

Hi, I need help
I created a flow that receives responses from a form...

If there is no Excel file with the name of this form, it creates one.

If there is an Excel file with the name of this form, it just adds a line to a table.

I managed to progress to the automatic creation of an Excel file with a table, I need to understand how to automate my idea and add lines to an existing file.

Captura de tela 2023-11-14 110513.png

Categories:
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @CampBraz017 ,

     

    Please try this:

    The logic is that you need to get all the tables first and then filter the tables whose name is equal to the result in the form, if the filter is empty then create a table otherwise add a row to the table.

    vmengmlimsft_0-1700015211080.png

     

    The expression:

    item()?['name']
    empty(body('Filter_array'))

     

    Add a row to filtered tables:

    vmengmlimsft_1-1700015971528.png

     

     

    Thanks for reading!

    Rimmon

  • CampBraz017 Profile Picture
    10 on at

    Hi, tks for your answer!! about "get tables" what do you put inside?

  • CampBraz017 Profile Picture
    10 on at

    This is throwing an error 😞ff.png

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @CampBraz017 ,

     

    There's nothing special about ‘Get tables’ action, it just get all tables in one excel file:

    vmengmlimsft_0-1700203575691.png

    Have you changed any settings of 'filter array' and 'condition'?
    Please show me the expression now in your flow.

  • CampBraz017 Profile Picture
    10 on at

    In your flow, did you create an excel file or does it create it automatically?

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @CampBraz017 ,

     

    Yeah! The excel file has existed in my folder. 

    I initially thought there were multiple tables in the same excel file, so you can refer to the approach I provided earlier if you want to find a specific table in multiple excel tables and add a row.

    The same logic applies to how to determine that an excel file already exists and add a row to the table:

    1.Get all files and filter all excel files.

    vmengmlimsft_0-1700635238164.png

    2.Filter excel files in Filter array3 which name is value of "table" in response:

    vmengmlimsft_1-1700635582725.png

    3.When the result of condition is false, get all tables in the existing excel file.

    vmengmlimsft_2-1700635857326.png

    4.Getting specific table in the file and add a row. (Assuming only one table in the file.)

    vmengmlimsft_3-1700636265906.png

     

    Rimmon

     

     

  • CampBraz017 Profile Picture
    10 on at

    hello, what did you put in "get a file"? and I don't have this "table" option in the filter array... sorry for the many questions

  • CampBraz017 Profile Picture
    10 on at

    Another question, in your "apply to each" what you put in "Select an output from previous steps" didn't appear, what can I put? it is showing an error

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi!

    Have you solved your problem?

     

    Q1:

    The action of "Get files": This is for get all files in one folder.

    You can replace it with your folder where stores your multiple excel files.

    vmengmlimsft_0-1700718758049.png

     

    Q2:

    The "table" is selected dynamic content of "get response details", so it is a question name in my Form. I just use it to filter for files with a name of value in "table" question.

     

    Q3:

    The "apply to each" action:

    vmengmlimsft_1-1700719209054.png

    it will enter "apply to each" automatically when you add "list of responses" in "get response details".

     

    Hope make above clear.

     

    If my answer solved your problem, please accept it as a solution.

    Thanks.😀🎉

     

    Rimmon

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard