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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compose multiple inputs
Power Automate
Answered

Compose multiple inputs

(0) ShareShare
ReportReport
Posted on by 18

Hi Experts,

I am trying to create flow which will delete items from recycle bin of sharepoint after 7 days. I have attached the photo below.

1st i will do Http request to filter required directory file and to select ID and deleted date.

2nd I used Apply for each with Body.D.Result from json

3rd Compose with item()?['DeletedDate'], item()?['id']

4th I compare Deleted date with formatdatetime and I get output if the argument is true or false

5th If the argument is true I want to delete the item.

Jay14_0-1684791293361.pngJay14_1-1684791392291.png

Please give me suggestion to improve the flow anddelete the item which is more then 7 days

 

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Jay14 

     

    In compose action, you have placed multiple expression which would create two values get concatenated together and that would be coming in outputs.

     

    One more thing, you can directly write the expression within the action where you need to use

     

    like below

     

    Instead of Outputs, use the expression to replace it

    Nived_Nambiar_0-1684808986925.png

     

    item()?['id']

     

     

    Simmilarly for date, we need to delete a file if it is greater than 7 days, did you meant days with respect to current date the flow is running ?

     

    Kindly let me know 🙂

     

  • Jay14 Profile Picture
    18 on at

    Hi Nived,

    That was really eye opener. Output part is fixed. 

    Yes, when file enters the recycle bin it stamps a date for example. 15th May, and today that is 23rd May when the flow runs it should delete only files which are above 7 days in recycle bin.

     

    for example there are 3 files of 15th 

    and 5 files of 20th. 

     

    flow should be able to check every files recycle date (deleted and landed on recycle bin) and only delete which is more than 7 days. 

    So once the flow completes 5 files from 20th should be there in recycle bin.

     

    Open to new suggestions

  • Jay14 Profile Picture
    18 on at

    Currently I have made below changes:

    Jay14_0-1684857684021.png

    formatDateTime(item()?['DeletedDate'],'dd-mm-yyyy')
     
    for condition : 
    formatDateTime(addDays(utcnow(),-7),'dd-MM-yyyy')
  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Jay14 

     

    to compare dates try this way:

    Nived_Nambiar_0-1684889506064.png

     

    expression: 

    div(sub(ticks(utcNow()),ticks(formatDateTime(item()?['DeletedDate'],'dd-mm-yyyy'))),864000000000)
     
    It checks difference between dates whether or not it is 7 days or more 🙂
     
     
  • Verified answer
    Jay14 Profile Picture
    18 on at

    Hi Nived,

     

    Thanks for the superb ideas. I have never used tick function before. It was new and good to learn from you. I tried to apply what you suggested but got below error

    "Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'In function 'ticks', the value provided for date time string '17-22-2023' was not valid. The datetime string must match ISO 8601 format.'."

     

    Then I read about this and understood it will only take ISO format. So i made few changes 

    div(sub(ticks(utcNow()),ticks(item()?['DeletedDate'])),864000000000) I removed formatting since Ticks dont like one. And also removed compose since we were already getting what we wanted.

     

    Final flow looks like this 

    Jay14_0-1684934399033.png

     

    And the flow works like a charm.

     

    I have one doubt, why this number ,864000000000 ? Can you help me with calculation ?

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Jay14 

     

    tick function returns a numbers corresponds to a interval of 100 nanoseconds from January 001, so what we are taking here is difference b/w ticks of current date and that of deleted date,  since it givves us the number of interval each of 100 nanoseconds, so we need to convert to number of days , so we use that number 864000000000 which helps to convert to days b/w the dates.

     

    Refer the below link for more details 

    https://manueltgomes.com/reference/powerautomate-function-reference/power-automate-ticks-function/

     

    Hope it helps !

    Mark it as solution if it resolves your query !

     

  • Jay14 Profile Picture
    18 on at

    Thanks you are awesome..

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard