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 / Share Attachments via ...
Power Automate
Answered

Share Attachments via email when you change Project Status column to Complete.

(0) ShareShare
ReportReport
Posted on by 70

I have created a flow that when an item is created or modified, it sends the attachments via email to our finance team. BUT I only want it to do that process when the project information in the entry is complete (or marked as complete) not EVERY TIME we modify the entry information.  Does anyone know how to do this? 

 

Current List:

Capture.JPG

 

Current Flow: 

Capture2.JPG

Categories:
I have the same question (0)
  • Craig Stewart ABZ Profile Picture
    959 Super User 2024 Season 1 on at

    Hi

     

    If you go into settings (...) on your trigger then add a trigger condition at the bottom of there

    @equals(triggerBody()?['COLUMNNAME']?['Value'], 'Complete')

     

    That should trigger only when your column is set to complete.

     

     

  • tinalamkey Profile Picture
    70 on at

    Thanks, Craig - Should the code look like this: @equals(triggerBody()?['PKO Status']?['Value'], 'Complete'  - I just got an 'invalid expression' error....

  • Craig Stewart ABZ Profile Picture
    959 Super User 2024 Season 1 on at

    Sorry need a closing bracket on that 

    @equals(triggerBody()?['Status']?['Value'], 'Complete')

  • tinalamkey Profile Picture
    70 on at

    Unfortunately, when I test it, it just spins for a long time and nothing is happening.  It then times out.

    tinalamkey_0-1654177637957.png

     

  • Craig Stewart ABZ Profile Picture
    959 Super User 2024 Season 1 on at

    Hi 

     

    Check your column name in SharePoint, it's likely to be PKOStatus without the space.

     

    You can double check that by ordering your sharepoint like Z to A with that column and check in the browser for the name in the url after &sortField=

  • tinalamkey Profile Picture
    70 on at

    Ok!  This is working - Column was named 'status' .  FINAL question (I think).  If a column is marked complete and I edit a different column, it is still sending off an email.  Is there a way for it to send an email when JUST the Status column is changed, but when other columns are changed, it does not send an email?

  • Craig Stewart ABZ Profile Picture
    959 Super User 2024 Season 1 on at

    Ah ok, so you're making changes after the status is amended.
    You can add a condition to check for changes

    Add  the Get Changes for an item or file action as below

    You should be able to select the start and end tokens, if not the expressions are here

    triggerOutputs()?['body/{TriggerWindowStartToken}']

    triggerOutputs()?['body/{TriggerWindowEndToken}']

     

     

    CraigStewart_1-1654179818851.png

     

    In your condition you can select which fields you want to target, in your case 'status'

    CraigStewart_2-1654180124380.png

     

    So your condition will be 

    Has column changed: Status 

    is equal to

    true

     

    Then add the rest of your flow inside the yes section.

     

    When you change another field while the column is set to complete the flow will still trigger, but if it's any other field it should flow down the NO path.

     

    Inside No I would add a Terminate action and set it to cancelled so I could see the runs that irrelevant more easily.

     

     

  • tinalamkey Profile Picture
    70 on at

    Starting to get it set-up.  Under "yes" it's not allowing me to choose 'initialize variable' - only allowing Append to array variable and then not sure what to plug-in.  

    tinalamkey_0-1654181100425.png

    I am trying to do an Attachement Array.

    tinalamkey_1-1654181176447.png

     

     

  • Craig Stewart ABZ Profile Picture
    959 Super User 2024 Season 1 on at

    You need to initialise the variable at the top level before the condition. What is this variable?

     

    You'd use append to variable if you were looking to add data to it.

  • tinalamkey Profile Picture
    70 on at

    I feel like I am really close!  Something is occurring at the condition when I test it. 

     

    Capture_1.pngCapture_2.png

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard