Skip to main content

Notifications

Power Automate - General Discussion
Suggested answer

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

Posted on by 119
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:
  • Suggested answer
    CA1105 Profile Picture
    CA1105 101 on at
    Add a Function/condition to check if the file exists to trigger an action based on a value
     
    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
    Altharus 119 on at
    Add a Function/condition to check if the file exists to trigger an action based on a value
    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.




  • Padmashri Raj Profile Picture
    Padmashri Raj 2 on at
    Add a Function/condition to check if the file exists to trigger an action based on a value
    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
    Altharus 119 on at
    Add a Function/condition to check if the file exists to trigger an action based on a value
    No one could help me on this demand ? please
     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,719

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard

Featured topics