Yes it is. You need to use the Filter Array action to cross-reference the Excel data against the data in SharePoint.
In this flow Example. I'm cross-referencing my Excel data against what is already entered in SharePoint. Anything SP Item that doesn't exist in the Excel file I'm deleting. You can take this concept and adjust it for your flow. Instead of deleting the SP Item you can update it to adjust the status.
Any item that doesn't already exist in SP will be added (in my case). It may differ for your flow.

Note: Scope actions are optional. I use them in my flows to organize and group actions together.
Get Excel Data
I'm dynamically returning a table for the List rows present in a table action. If you want to know how to do this—you can follow this tutorial I uploaded to YT. Otherwise, you can omit the 3 actions I've outlined below and just use a List Rows present in a table action.

Your Excel file must have a unique ID that you can use to cross-reference against what is already on SP. Use the Select action to help you extract just the data from the column that contains your ID. In my case, I have a column named ID. Yours may be something different.
For this, you don't need a key so you can click on the icon to the right of the Map file to switch to text mode. The Select action will return an array. You will need to convert it to a string.
Use a Join action to convert the array to a string. The outputs from the select action will go into the From field. In the Join field, enter a comma and a space.

Tip: Add a Top count with a smaller number so it only returns a small set of data while you are building out the flow. Rather than returning your entire list.

Get SP Data
You will need to mimic the steps above but for SP. Use a Get Items action to get the items from your SP list. Add a Select action to get the same unique ID (you'll need this to compare to the unique IDs from your Excel file). For my SP list, the ID is stored in a column named Email ID.
Add the Join function and use a comma and a space.

Tip: Add a Top count with a smaller number so it only returns a small set of data while you are building out the flow. Rather than returning your entire list.

Run a test.
Your outputs from the Join actions should look like this. Array in the Inputs, a string in the Outputs.

Update/Create/Delete
Depending on your requirements you can then add parallel branches to update, create or delete a SP item. For my example I have two things that can happen.
- If the item in Excel doesn't exist in SP—Create a new item in SP

- If the item in Excel doesn't exist in SP—Delete the item in SP
If the item in Excel doesn't exist in SP
You need a Filter Array action. In the Filter Array action, you have to use the Values returned from the List rows present in a table action in the From field.
In the first Value field, you need to insert the outputs from the Join action with your SharePoint ID string. In the second Value field, you need to insert the dynamic content from the List Rows present in a table action that you want to cross-reference with. In my case, it's the ID column.
Add a Compose action to store the number of items returned from the Filter Array action. This will help with troubleshooting. You can also use the outputs of this compose action to check if your Filter Array action is working correctly.

In the Compose action insert an expression. Use the length() function and insert the body outputs from the Filter Array action above.
Run a test.
Do not add the next actions until you've sorted out the Filter Array action and it's filtering out the correct data.
Add Excel Data to SharePoint
In the branch where you've filtered out the Excel data that needs to be added to SP, you need to add a Condition to check if there are any items returned. If not, nothing happens. If so, you want to add those items to Excel.
In the Condition action, you'll add the Compose action output from above that contains the count of items returned.
I've set my operator to is equal to, and set the value to 0. If no items are returned, nothing happens (YES branch).
In the NO branch, add an Apply to Each action and a Create Item action. For the Apply to Each action, you want to loop through each item returned from the Filter Array action above (in the current branch). T
his will loop through each Excel item that doesn't currently exist in your SP List. You need to insert the Body outputs from that Filter Array action.

Because you are using the Filter Array action to filter out your items. There will not be any dynamic properties that you can select from in order to return values from the Filter Array action.
Note: The screenshot above shows labels that look like I have selected dynamic content from the Filter Array action, but that's just something PA does after the flow is run, it changes the look of the labels.
You need to use an expression to access the values from the Filter Array action. The outputs from the Filter Array action from your last run will display the information you need for the expression. The key for each value is in the red text between the double quotes.

To access each item you need to use the item() function. Each expression will start the same like below:
item()?['']
Between the single quotes is where you want to enter the key—exactly how it's displayed in your outputs.
For example, to return the First Name I would use this expression:
item()?['First Name']

As mentioned earlier, the dynamic content labels will be the Expression Labels (in pink as you see above). However, once you run the flow, they will switch to the Data Operator labels (in purple).
Important: Once the labels switch to the Data Operator labels, you cannot select the label and edit the expression. You'll have to delete the label and re-enter the expression. Not sure why this happens... but it is what it is.
Delete/Update SharePoint Items
I'm not sure what your workflow is and if you need to delete or update the SP item. However, the concept is the same. I'm going to cover how to Delete an item, but you can customize the actions to suit your requirements.
In the branch where you have filtered out the SP items that don't exist in your Excel table, add a Condition. Just as you did previously.
Insert the Compose action that returns the number of SP items that don't exist in your Excel table. I chose the is equal to operator and entered the value of 0.
In the Apply to Each action, insert the Body outputs from the Filter Array action that has filtered out SP items that don't exist in your Excel table.
Add a Delete or Update Item action. Both of these actions requires the ID of the SharePoint item to delete or update.

Just like you've done above, you need to use an expression to access the SP Item ID. Use the item() expression and the ID key which is 'ID' to access the ID value.
item()?['ID']

Hope this helps!
If I helped you solve your problem—please mark my post as a solution ✅. Consider giving me a 👍 if you liked my response!
|