Share via

How can Logic Apps avoid repeatedly ingesting previous Excel data when triggered by new entries for SQL Server integration?

Ceeeee-8261 100 Reputation points
2023-09-04T07:59:02.73+00:00

How can Logic Apps be configured to trigger only for new row entries from an Excel file and then ingest them into SQL Server? Currently, when someone modifies the Excel file in SharePoint, Logic Apps repeatedly ingests other data from previous dates into SQL Server. Is there any possible solution, to read only the new added rows?

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

Answer accepted by question author

MayankBargali-MSFT 71,016 Reputation points Moderator
2023-09-04T14:15:55.75+00:00

@Ceeeee-8261 Thanks for reaching out.

Only actions are listed as documented in the Excel connector for logic app.

There are two workarounds to handle this in logic app.

  • Delete all the existing rows or drop the table if you are storing the same excel sheet data for the same table. You can use sql connector to perform this operation.
  • In case your table has other data, and you cannot delete all the rows/drop the table then you need to leverage the SQL connector to first to validate whether the row exists. You can use Execute a SQL query (V2) action with where condition to match all your column with the current row in the table. Using condition statement if it returns a single row then skipped it else use the Insert Row (V2) action to insert the data.

Let me know if you have any queries or concerns.

Was this answer helpful?

2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.