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 / Add a Function/conditi...
Power Automate
Suggested Answer

Add a Function/condition to check if the file exists to trigger an action based on a value

(1) ShareShare
ReportReport
Posted on by 121
Hi everyone, 
I need to check on sftp if a file exists after a deletion , i'd like to use a function based on the ID of the file or an another Value


Could you try to help me ? 

If you need more information don't hesitate to ask 

Thanks in advance for help that you could provide to me 
Categories:
I have the same question (0)
  • Altharus Profile Picture
    121 on at
    No one could help me on this demand ? please
     
  • Padmashri Raj Profile Picture
    2 on at
    Hi, 

    I assume in the "List files and check if deleted" action you are checking the file existence using the "Get file metadata using Path" action. If that is so , you can use "Status code" property in the condition to send mail.

    If status code = 200 , file exists , if not it is otherwise.

    Hope this helps.
  • Altharus Profile Picture
    121 on at
    HI , I had tested your solution but I have a Status code 404 ( normal because the file was deleted above ) .
    as "Get file metadata using path" failed my flow can't continu , that's not work on my side.




  • Suggested answer
    CA1105 Profile Picture
    545 Super User 2025 Season 2 on at
     
    I'm assuming because you have deleted the file so the action won't be able to retrive the file from sftp location, so if that's the case then you can send email when your action i.e Get file metadata using path is failed means you can configure the run after property of send an email when your stfp actions gets failed.
  • Altharus Profile Picture
    121 on at
    Hi @CA1105
    Yes , I already did this but it didin't work .

    I don't have any ideas at this time , all help is welcome ! ;)

     

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard