cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maniyarsohel
Regular Visitor

Fetch latest record added in Excel and send it to teams channel

I want fetch the latest record added in the Excel and that particular record should sent to teams channel is it possible.Please help me.

1 ACCEPTED SOLUTION

Accepted Solutions
v-peijunz-msft
Microsoft
Microsoft

Hi @maniyarsohel,

 

There is no direct trigger to automatically send a message to Teams when a new record is created in Excel file.

However, a workaround could be achieved through using two flows.

1. The first flow is extracting records from the Excel file to a SharePoint list.

I have a SharePoint list called "App test" with all the records listed here:

vpeijunzmsft_0-1659411945862.png

My excel file has a new record:

vpeijunzmsft_1-1659411945865.png

The first flow is shown here:

 

length(outputs('Get_items')?['body/value'])

 

Then using a Condition action to filter new records added in the Excel file.

vpeijunzmsft_2-1659411945867.png

vpeijunzmsft_3-1659411945870.png

vpeijunzmsft_4-1659411945877.png

After running the first flow, the new record is also added in the SharePoint list:

vpeijunzmsft_5-1659411945878.png

2. Once the new record is uploaded in the SharePoint list, using "When an item is created" trigger to automatically trigger the flow.

Here is the second flow:

vpeijunzmsft_6-1659411945882.png

It is more recommended that to use the SharePoint list as the data source, then you could use  "When an item is created" trigger to automatically trigger the process: send a message to Teams when a new record is created.

 

Best regards,

Sylvia

View solution in original post

3 REPLIES 3
v-peijunz-msft
Microsoft
Microsoft

Hi @maniyarsohel,

 

Based on your description, I have made a simple test for your reference.

1. I have a excel file named App test which is stored in the SharePoint library.

The excel file contains a table (called Table1) that stores all the data records.

The latest record in Table1 is shown here:

vpeijunzmsft_0-1658393186227.png

2. Here is my flow:

last(body('List_rows_present_in_a_table')?['value'])
outputs('Compose')?['YourColumnName']

vpeijunzmsft_1-1658393186229.png

vpeijunzmsft_2-1658393186234.png

3. Result Screenshots:

vpeijunzmsft_3-1658393186236.png

 

Best regards,

Sylvia

hey @v-peijunz-msft thanks for the solution but for this I need to run the flow manually but I want it to be an automatic process eg: whenever a new row is added into the table that record should sent to teams.

Each time whenever the new row is added the new record should sent to teams channel. Is it possible?

 

v-peijunz-msft
Microsoft
Microsoft

Hi @maniyarsohel,

 

There is no direct trigger to automatically send a message to Teams when a new record is created in Excel file.

However, a workaround could be achieved through using two flows.

1. The first flow is extracting records from the Excel file to a SharePoint list.

I have a SharePoint list called "App test" with all the records listed here:

vpeijunzmsft_0-1659411945862.png

My excel file has a new record:

vpeijunzmsft_1-1659411945865.png

The first flow is shown here:

 

length(outputs('Get_items')?['body/value'])

 

Then using a Condition action to filter new records added in the Excel file.

vpeijunzmsft_2-1659411945867.png

vpeijunzmsft_3-1659411945870.png

vpeijunzmsft_4-1659411945877.png

After running the first flow, the new record is also added in the SharePoint list:

vpeijunzmsft_5-1659411945878.png

2. Once the new record is uploaded in the SharePoint list, using "When an item is created" trigger to automatically trigger the flow.

Here is the second flow:

vpeijunzmsft_6-1659411945882.png

It is more recommended that to use the SharePoint list as the data source, then you could use  "When an item is created" trigger to automatically trigger the process: send a message to Teams when a new record is created.

 

Best regards,

Sylvia

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,668)