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 / Send the sharepoint li...
Power Automate
Unanswered

Send the sharepoint list as excel attachment without storing the excel file

(0) ShareShare
ReportReport
Posted on by 12

Dear Team,

 

I have a usecase in which I have 2 sharepoint list. I want to read the content of list 1 using a filter from each item of list 2, then attach the content as an excel file to an email and send the emails.

I am doing it this way:

 

  1. read the content of list 2
  2. create a excel file in a sharepoint document library using a template
  3. for each item in list 2
    1. read list 1 with the filter
    2. compose a json
    3. add a row to an excel table using the json
    4. read the file content 
    5. send an email using the file content as attachment

In this approach everything works except the excel file has only 1 entry in the email attachment where as the excel file in the sharepoint document library has more than 1 entry.

 

so I did the other approach

  1. read the content of list 2
  2. create a excel file in a sharepoint document library using a template
  3. for each item in list 2
    1. read list 1 with the filter
    2. compose a json
    3. add a row to an excel table using the json
  4. list all the files in the sharepoint document library folder
  5. apply to each file
    1. fetch the file contents
    2. send email with the email attachment

This approach works !

But in both this approach I am write an excel file which I do not need to, is there any way I can send the email with excel attachment without the need to write the excel file first as I have all the data with me.

 

Thanks a lot in advance!

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @Agrawalramakant ,

     

    If the Excel file is a CSV file ,then it is available. I've made a test for your reference:

     

    1. read the content of list 2
    2. Use a Select action to get the fields that you want
    3. Create CSV Table
    4. Send an Email 

    vbofengmsft_0-1662431228114.png

    Best Regards,

    Bof

     

  • Agrawalramakant Profile Picture
    12 on at

    Thanks @v-bofeng-msft for the response.

     

    But with this solution I am getting a CSV file as an attachment but not xls or xlsx

    Is there a way in which we could send the xlsx attachment without needing to create one?

  • v-bofeng-msft Profile Picture
    on at

    Hi @Agrawalramakant ,

     

    I'm afraid there is no such an OOB function to send a xlsx attachment without create one. But you could use your original plan and add an 'delete file' after send the email.

     

    Best Regards,

    Bof

  • Agrawalramakant Profile Picture
    12 on at

    Thanks for your response. 

     

    I tried yesterday to do it with Excel and it works but I had to give a delay of 2-3 mins. It works find if I have to send 5-10 emails but it would be a problem when I send 40-50 emails or even 100 emails.

     

    I tried to parallelism the apply to each but the content of the email were mixed in these situation plus the excel content was also mixed between different entities and for some the files were not created.
    Could you guide me something there?

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard