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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Why does my power auto...
Power Automate
Unanswered

Why does my power automate flow run keep running and does not stop?

(0) ShareShare
ReportReport
Posted on by 16

Hello,

 

I am getting a never-ending loop/ the flow never ends, and it keeps re-adding some of the data and does not stop. Basically, I have a manual trigger -> reads a pdf -> unstructured document model ai that reads the pdf text -> then updates a excel sheet.

 

Flow:

jalfaro_0-1704820034873.png

 

But every time I fill out the columns with the A.I variables in image 2, it keeps creating these "for each loops" automatically forcing me to use it. For example, when I fill the date variable it creates 3 for each loops. The loops work but they never stop and it just keeps re-adding the data that was already added and does not stop. So instead of my excel file being small, the flow does not stop until I manually trigger the "Stop test"

 

My goal is to put the data into the excel file once. Currently, the flow does not stop and it keeps readding the same data.

 

 

 

 

 

Categories:
I have the same question (0)
  • rzaneti Profile Picture
    4,249 Super User 2025 Season 2 on at

    Hi @jalfaro ,

     

    By default, Power Automate adds a 'For each' loop when you are trying to access a property that is inside an array item (like a date field, for example). It happens because technically you first need to access the array element, and then the specific property. Sometimes, however, we have a single item in the array, but Power Automate still adds the 'For each' loop for us. 

     

    To solve it, we can build an expression to directly access your date element, avoiding these 3 loops. Could you please share the raw outputs from the AI Builder action that is returning the date field? To access the raw outputs, you just need to go to your any previous flow run, navigate until the relevant action and click in 'Show raw outputs', as highlighted in yellow: 

    rzaneti_0-1704845757724.png

     

    The raw outputs will appear in the right side of the screen: you can copy and share it here (just make sure to remove any sensitive data before sharing). Also, if you need more details about how to access the raw outputs, refer to the step-by-step from this blog post: http://digitalmill.net/2023/07/31/using-dynamic-content-in-power-automate/, or feel free to ask us in this thread 🙂 

  • jalfaro Profile Picture
    16 on at

    Hello,

     

    How would I create "an expression to directly access your date element, avoiding these 3 loops"? Do I create a compose activity? Or what are the steps needed.

     

    Here is some of the raw data, not all of it. When I do not include one of the parameters, it does not create two for each loops. And the flow ends, but I need this parameter to be able to distinguish the names of each column. So what can I do?

     

    Possible reason:

    I think the for each loops are created, because in the AI hub, I am extracting three fields: 

    1. Parameters Column 

    2. Name Field

    3. Ending Page 

    jalfaro_0-1704916543566.png

     

     

    Raw Data:

    raw inputs: "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "34",
    "text": "H-2A",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.2617181864651767,
    "top": 0.15224706425386317,
    "width": 0.022572712464766054,
    "height": 0.013482346254236555,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.2617181864651767,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.2838545495813543,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.28429089892994275,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.2617181864651767,
    "y": 0.16572941050809972
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "35",
    "text": "257.283",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.3550363670695912,
    "top": 0.15281176567077637,
    "width": 0.03732726790688251,
    "height": 0.012917644837323355,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.3550363670695912,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.3919272856278853,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.3923636349764737,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.3550363670695912,
    "y": 0.16572941050809972
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "36",
    "text": "12.000",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.4183999841863459,
    "top": 0.15281176567077637,
    "width": 0.02908182144165039,
    "height": 0.012917644837323355,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.4183999841863459,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.4474818056279963,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.4474818056279963,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.4183999841863459,
    "y": 0.1646117603077608
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "37",
    "text": "0.000",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.4795999960465865,
    "top": 0.15224706425386317,
    "width": 0.025172710418701116,
    "height": 0.012917644837323355,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.4795999960465865,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5047727064652876,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5047727064652876,
    "y": 0.16516470909118652
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.4795999960465865,
    "y": 0.16516470909118652
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "38",
    "text": "269.283",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.5260454524647106,
    "top": 0.15281176567077637,
    "width": 0.03645454753528943,
    "height": 0.013482346254236555,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5260454524647106,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5620636506514116,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5625,
    "y": 0.16629411192501292
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5260454524647106,
    "y": 0.16516470909118652
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "39",
    "text": "4,206.205",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.5733545476740057,
    "top": 0.15281176567077637,
    "width": 0.04513636502352625,
    "height": 0.012917644837323355,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5733545476740057,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.6180545633489435,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.618490912697532,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5737818371165883,
    "y": 0.16572941050809972
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "40",
    "text": "0.000",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.6497363610701128,
    "top": 0.15224706425386317,
    "width": 0.025172710418701172,
    "height": 0.013482346254236555,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.6497363610701128,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.674909071488814,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.674909071488814,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.6497363610701128,
    "y": 0.16516470909118652
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "41",
    "text": "0.000",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.7070272619074042,
    "top": 0.15224706425386317,
    "width": 0.02518185702237208,
    "height": 0.013482346254236555,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7070272619074042,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7322091189297762,
    "y": 0.15281176567077637
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7322091189297762,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7070272619074042,
    "y": 0.16516470909118652
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "42",
    "text": "0.000",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.7634545239535245,
    "top": 0.15224706425386317,
    "width": 0.02560910311612208,
    "height": 0.013482346254236555,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7634545239535245,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7890636270696466,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7890636270696466,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.7634545239535245,
    "y": 0.16572941050809972
    }
    ]
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "id": "43",
    "text": "0.000",
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.82030911879106,
    "top": 0.15224706425386317,
    "width": 0.02560910311612208,
    "height": 0.013482346254236555,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.82030911879106,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.8459182219071821,
    "y": 0.15224706425386317
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.8459182219071821,
    "y": 0.16572941050809972
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.82030911879106,
    "y": 0.16516470909118652
    }
    ]
    }
    }
    },

     

     

     

     

  • rzaneti Profile Picture
    4,249 Super User 2025 Season 2 on at

    Hi @jalfaro ,

     

    The outputs don't contain a reference of the document field extracted by AI Builder, so we won't be able to use it to find a solution.

     

    As an alternative, you can share the JSON from the 'Code view' of your actions. To access it, just click in the action and, in the left side of the screen (in the same pane where you enter the parameters), select the 'Code view', as highlighted in yellow:

    rzaneti_0-1704934698097.png

     

    We will need it for both 'Add row into a table' actions and the three loops. 

     

    About the expressions, you can insert it directly in your 'Add row into a table' action inputs. We will dig into this part of the process once we have the expressions ready 🙂

     

  • jalfaro Profile Picture
    16 on at

    The flow looks a bit like this now. I removed the other excel "add a row" to try and get the flow to look a bit more simple and so it could function properly.

    jalfaro_1-1705015250081.png

    Here is the code from the first "for each" : 

    {
      "type": "Foreach",
      "foreach": "@outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries']",
      "actions": {
        "For_each_2": {
          "type": "Foreach",
          "foreach": "@outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Crew_0022c7ee1247c02ccb3a711d582c9d73db6']?['columns']",
          "actions": {
            "Add_a_row_into_a_table": {
              "type": "OpenApiConnection",
              "inputs": {
                "parameters": {
                  "source": "me",
                  "drive": "b!FPgrkPStAEy4OoAy8HSHSh9vj2lzn6NNkSAJ-Qng1xsZEK-K7iylQL0dL_Hgtahh",
                  "file": "01U47DLXCASRZ644OEOFAKMPS2YQMJTEYR",
                  "table": "{74525493-0328-48EB-87BD-BDE5B61B208F}",
                  "item/Date": "@items('For_each')?['Date']?['text']",
                  "item/Job(s)": "@items('For_each')?['Hours_004569f0b6a7e8769364f074183f28efc5']?['text']",
                  "item/Hours - Job": "@items('For_each')?['Hours_004569f0b6a7e8769364f074183f28efc5']?['text']",
                  "item/Hours - Break": "@items('For_each')?['Hours_002cc024136d3c5e0c504613bab2af61e1']?['text']",
                  "item/Hours - NPT": "@items('For_each')?['Hours_004c7f46d00c82aee4ec2077b9d28dd7df']?['text']",
                  "item/Hours - Paid": "@items('For_each')?['Hours_0065a7f71a8030420e08c2167e75128771']?['text']",
                  "item/Time Pay": "@items('For_each')?['Time_002fde14afb3a20b37487e67d9d67a448e0']?['text']",
                  "item/Production Pay": "@items('For_each')?['Producti132efa0c6b566deed804341b17203544']?['text']",
                  "item/Additional Pay - Hours": "@items('For_each')?['Addition27035ec9bb9dd92bd16749ecc4676356']?['text']",
                  "item/Additional Pay - Pay": "@items('For_each')?['Addition02f1f00c7e089920922b99d42a2a6e91']?['text']",
                  "item/Total": "@items('For_each')?['Total']?['text']",
                  "item/Crew Name": "@items('For_each_2')?['name']"
                },
                "host": {
                  "apiId": "/providers/Microsoft.PowerApps/apis/shared_excelonlinebusiness",
                  "connection": "shared_excelonlinebusiness",
                  "operationId": "AddRowV2"
                }
              },
              "metadata": {
                "01U47DLXHVSEWL4M7DTNBYYBS4OWC5SLCH": "/Desktop/11.8 - PDF to Excel Test copy.xlsx",
                "tableId": "{74525493-0328-48EB-87BD-BDE5B61B208F}",
                "01U47DLXGFKLOTLTAIH5H3POPMDQ2FTTGZ": "/Desktop/11.8 - PDF to Excel Test.xlsx",
                "operationMetadataId": "7e33223c-b137-4c43-89b7-72305f77874e",
                "01U47DLXCASRZ644OEOFAKMPS2YQMJTEYR": "/Desktop/TEST 12.xlsx"
              }
            }
          }
        }
      },
      "runAfter": {
        "Extract_information_from_forms": [
          "Succeeded"
        ]
      }
    }
  • rzaneti Profile Picture
    4,249 Super User 2025 Season 2 on at

    Hi @jalfaro ,

     

    Thank you for sharing the code view! Power Automate added the 'For each 2' to capture the 'Crew name' value, and the 'For each' for all of the other values. Below, I'm sharing the expressions that will replace the fields dynamic content in each of your 'Add row to a table' inputs:

     

    Date: outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries'][0]?['Date']?['text']

                  Job(s): outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries'][0]?['Hours_004569f0b6a7e8769364f074183f28efc5']?['text']

                  Hours - Job:  outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries'][0]?['Hours_004569f0b6a7e8769364f074183f28efc5']?['text']

                  Hours - Break:  outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries'][0]?['Hours_002cc024136d3c5e0c504613bab2af61e1']?['text']

                  Hours - NPT:  outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries'][0]?['Hours_004c7f46d00c82aee4ec2077b9d28dd7df']?['text']

                  Hours - Paid: outputs(‘Extract_information_from_forms’)?[‘body’]?[‘responsev2’]?[‘predictionOutput’]?[‘tables’]?[‘Automate597bbeef311f5b9e0df340f0b0a68c1d’]?[‘entries’][0]?['Hours_0065a7f71a8030420e08c2167e75128771']?['text']

                  Time Pay: outputs(‘Extract_information_from_forms’)?[‘body’]?[‘responsev2’]?[‘predictionOutput’]?[‘tables’]?[‘Automate597bbeef311f5b9e0df340f0b0a68c1d’]?[‘entries’][0]?['Time_002fde14afb3a20b37487e67d9d67a448e0']?['text']

                  Production Pay: outputs(‘Extract_information_from_forms’)?[‘body’]?[‘responsev2’]?[‘predictionOutput’]?[‘tables’]?[‘Automate597bbeef311f5b9e0df340f0b0a68c1d’]?[‘entries’][0]?['Producti132efa0c6b566deed804341b17203544']?['text']

                  Additional Pay - Hours: outputs(‘Extract_information_from_forms’)?[‘body’]?[‘responsev2’]?[‘predictionOutput’]?[‘tables’]?[‘Automate597bbeef311f5b9e0df340f0b0a68c1d’]?[‘entries’][0]?['Addition27035ec9bb9dd92bd16749ecc4676356']?['text']

                  Additional Pay - Pay: outputs(‘Extract_information_from_forms’)?[‘body’]?[‘responsev2’]?[‘predictionOutput’]?[‘tables’]?[‘Automate597bbeef311f5b9e0df340f0b0a68c1d’]?[‘entries’][0]?['Addition02f1f00c7e089920922b99d42a2a6e91']?['text']

                  Total: outputs(‘Extract_information_from_forms’)?[‘body’]?[‘responsev2’]?[‘predictionOutput’]?[‘tables’]?[‘Automate597bbeef311f5b9e0df340f0b0a68c1d’]?[‘entries’][0]?['Total']?['text']

                  Crew Name:  outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Crew_0022c7ee1247c02ccb3a711d582c9d73db6']?['columns'][0]?['name']

     

    Where to add these values?

    For each input of your 'Add row into a table' action, click in the "Fx" button:

    rzaneti_0-1705104993453.png

     

    An expression editor will pop-up, and you can insert the expression there. 

    rzaneti_1-1705105650462.png

     

    After clicking "Add", the action's input field will look like below. Repeat this same process for all input fields, inserting the respective expression for each of them.

    rzaneti_2-1705105701524.png

     

    Quick explanation about the solution

    Behind the scenes, all of the dynamic contents that you use in your actions are actually an expression. For example, when you were populating your 'Add row into a table' action and Power Automate automatically created the 'For each' loop, it added as input the expression outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries']. You get this information by checking your action 'Code view'.

     

    When you check the expression relative to each input from your Excel action, you will find references to 'For each' or 'For each 2' (in red), like this one in Date: items('For_each')?['Date']?['text']. It means that, for each array element mapped by the 'For each' loop, Power Automate will access the 'Date' property, and then the 'text' property. 

     

    I'm assuming here that you are extracting only a single value per entity with AI Builder (the read document will have only one date, only one job, only one hours - job, and so on), so in the expressions that I've provided you with, I've basically joined the expressions from 'For each' (in red below) and from the specific entity (in blue below). As we need to access only the first element of the array, there is also a '[0]' as index reference (in green below):

     

    outputs('Extract_information_from_forms')?['body']?['responsev2']?['predictionOutput']?['tables']?['Automate597bbeef311f5b9e0df340f0b0a68c1d']?['entries'][0]?['Date']?['text']

     

    Conclusion and next steps

    I know that the instructions above may be a confusing, so do not hesitate in asking for additional clarification about any step.

     

    Also, for those users that are new to array references in Power Automate, I'm sharing this blog post about how to loop or access individual array elements: http://digitalmill.net/2023/07/12/using-loops-and-accessing-array-elements-in-power-automate/

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/ 
    https://www.linkedin.com/in/raphael-haus-zaneti/ 

     

     

  • jalfaro Profile Picture
    16 on at

    Hello, I tried your solution. But actually, my pdf file has multiple dates. When I tried this solution, it only copied the single value. For example, I have date1, date2, date3, date4, etc. But for this solution, it kept repeating this date1(Monday) and repeated for 86 times:

     

    jalfaro_0-1705427385730.png

     

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard