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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Email attachments when...
Power Automate
Answered

Email attachments when working with several SP-list items at once

(2) ShareShare
ReportReport
Posted on by 442
When an item in the Sharepont list "Users" is created/modified, the flow gets all the items from the list "Emails" and sends the text in each item as separate emails. Item 1 is one email, item 2 is another email, and so on.
Some of the items in "Emails" have attachments, that are sent with the email.
 
Usually, when working with email attachments in list items, I use an array variable to collect and attach the files. But in this case, this will not work as desired. Since the flow gets several list items at once, the array variable would add attachments to emails that should not have emails. Example: item 1 has one attachmant, and item 2 has no attachment. The loop will collect the attachment from item 1 and also attach it to 2 and the following items.
 
What is the correct approach to achieve what I want?
 
Categories:
I have the same question (0)
  • Verified answer
    CFernandes Profile Picture
    8,504 Most Valuable Professional on at
     
    Your Flow look visually correct, so I wanted to clarify
    1. Item A -> Email A + Attachments A
    2. Item B -> Email B + Attachments B
     
    I think what you need to do is reset the AttachmentsArray after the End Email... 
    Set variable AttachmentsArray = [] Can you give it a try?
     
    If it helped you, please click "Does this answer your question?" and give it a like or mark it as Solution, it helps others in the community find answers more easily!
    Connect With Me:
    💼 LinkedIn: Clavin Fernandes
    📺 YouTube: Clavin Fernandes
    📝 Blog: clavinfernandes.wordpress.com
    🌐 Community Website: PPUG.org
    👥 Join our Community: Power Platform User Group
  • MM-05080756-0 Profile Picture
    442 on at
    @CFernandes thank you, I had no idea one could set the array with that "[]"! That worked perfect :)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard