Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': ' Action 'Compose' failed

(0) ShareShare
ReportReport
Posted on by 14

Hi all,

Hello, so I´m stuck, basically, I created a form with different class options, but every class just has 3 seats so the first 3 people who answer the form get the seat, I don't know how to define the variable in power automate to automatically decrease the number every time a person registers into a class.

 

I am getting error message in "Action 'Compose' failed"

 

Error Details

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'length' expects one parameter: an array or a string the length of which is returned. The function was invoked with '0' parameters. Please see https://aka.ms/logicexpressions#length for usage details.'.

 

Power_Automate5_0-1698240991335.pngPower_Automate5_1-1698241112670.png

 

This is the form used

Power_Automate5_2-1698241380262.png

 And this is the SharePoint site used

Power_Automate5_3-1698241443221.png

 

 

  • Power_Automate5 Profile Picture
    14 on at
    Re: Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': ' Action 'Compose' failed

    Thank you very much for your help in resolving the issue. I really appreciate it, and now the flow is running perfectly!

  • Power_Automate5 Profile Picture
    14 on at
    Re: Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': ' Action 'Compose' failed

    Thanks for all the answers. The error is fixed now. But the logic is wrong for to restrict the booking for each class to a maximum of 3 participants and fail any additional booking attempts when the class is already full. 

  • Verified answer
    v-bofeng-msft Profile Picture
    on at
    Re: Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': ' Action 'Compose' failed

    Hi @Power_Automate5 ,

     

    Please try:

    vbofengmsft_0-1698285577702.png

    length(outputs('Get_items')?['body/value'])

     

    Best Regards,
    Bof

     

  • Michael E. Gernaey Profile Picture
    43,378 Super User 2025 Season 1 on at
    Re: Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': ' Action 'Compose' failed

    Hi @Power_Automate5 

     

    The error itself is straight forward. You didn't share the code, but simply put, you are putting a blank or non-array value in the length expression.

     

    Also, adding a variable into Power Automate as a counter will not work. 

     

    What you really need to do is write these to SharePoint or somewhere, based on their incoming Time, so that you can easily sort them and figure out who the Top 3 are.

     

    Since these can fire near simultaneously,, trying to figure out who is the to 3 within the context of the flows themselves, really isn't ideal.


    Just capture them all that come in and you can easily tell who wins the 3 seats based on when they come in.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492

Featured topics