Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Unanswered

Flow with conditions based on content type or custom properties

(2) ShareShare
ReportReport
Posted on by 14

Hello,

 

I am trying to create a Flow that moves a document when a new file is created in a document library where column X has a certain value.

 

When using a custom column (from a custom content type), I get this error:


InvalidTemplate
. Unable to process template language expressions for action 'Condition' at line '1' and column '2024': 'The template language expression 'contains(triggerOutputs()['headers']['TipoWorkFlow'], 'Fax')' cannot be evaluated because property 'TipoWorkFlow' doesn't exist, available properties are 'Pragma, Retry-After, x-ms-file-id, x-ms-file-name, x-ms-file-path, x-ms-file-etag, x-ms-request-id, Cache-Control, Date, Location, Set-Cookie, Server, X-AspNet-Version, X-Powered-By, Content-Length, Content-Disposition, Content-Type, Expires, Last-Modified'. Please see https://aka.ms/logicexpressions for usage details.'.

 

Even knowing the custom column I am using is valid (named "TipoWorkflow"), the flow is unable to validate it.

 

I am getting this error:


InvalidTemplate
. Unable to process template language expressions for action 'Condition' at line '1' and column '2024': 'The template language expression 'contains(triggerOutputs()['headers']['TipoWorkFlow'], 'Fax')' cannot be evaluated because property 'TipoWorkFlow' doesn't exist, available properties are 'Pragma, Retry-After, x-ms-file-id, x-ms-file-name, x-ms-file-path, x-ms-file-etag, x-ms-request-id, Cache-Control, Date, Location, Set-Cookie, Server, X-AspNet-Version, X-Powered-By, Content-Length, Content-Disposition, Content-Type, Expires, Last-Modified'. Please see https://aka.ms/logicexpressions for usage details.'.

 

Flow condition is like this:

 

Flow_CTProp_CustomCT.png

 

After that, I tried using Content Type property of the document both using content type name and content type id and althought I dont get an error anymore, the conditions is not verified,

 

Using content type id:

 

Flow_CTProp_CTID.png

 

Using content type name:

 

Flow_CTProp_CTName.png

 

The only way I got a condition to work was using the File name property.

 

Can anyone help?

 

Thanks,

Miguel

 

 

 

 

  • JimmyW Profile Picture
    2,563 on at
    Re: Flow with conditions based on content type or custom properties

    The solution was much more simple.

    I use for selected Item because i manually trigger the flow, you can use for created or modified item.

     

    2019-04-25 15_45_08-Create your flow _ Microsoft Flow.png

  • JimmyW Profile Picture
    2,563 on at
    Re: Flow with conditions based on content type or custom properties

    Here you go.

     

    • When an item is created or modified
    • Send an HTTP request to SharePoint (Named it SPREST-Versions)
    • Select (Data Operations) from array into new array
    • Create HTML table (Data Operation) I use this just to display the result, not needed but good to see what you fetch.

     

    Result will be the name of the content type and you can then use a condition Content type is equal to "name of your content type"

     

    2019-04-25 10_22_17-Edit your flow _ Microsoft Flow.png2019-04-25 10_25_11-Run History _ Microsoft Flow.png

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow with conditions based on content type or custom properties

    @JimmyWork 

    Can you identify which steps you were using in those screenshots? I was hoping to test this myself.

     

     

  • JimmyW Profile Picture
    2,563 on at
    Re: Flow with conditions based on content type or custom properties

    Using Content type name is equal to Document, this works without any issue just type the name of the content type

  • JimmyW Profile Picture
    2,563 on at
    Re: Flow with conditions based on content type or custom properties

    Seems like a condition works like Content type = Name of content type

     

    2019-04-18 08_26_58-Create your flow _ Microsoft Flow.png

  • JimmyW Profile Picture
    2,563 on at
    Re: Flow with conditions based on content type or custom properties

    We can extract and run a trigger on specific content type name or id using send http request.

    I will update later today again. 

     

    I will just try a simple condition like Content type = Document

     

    2019-04-18 08_09_03-Run History _ Microsoft Flow.png

  • JimmyW Profile Picture
    2,563 on at
    Re: Flow with conditions based on content type or custom properties

    We cannot use the Column Content Type, this is not a column we can lookup, it is generated by SharePoint (CAML)

    You can make a workaround.

     

    Create a choice column that contains the name of each content type, user will have to select this. Then we can lookup that column because it contains data flow can get.

     

    Maybe we can use calculated columns, but even calculated columns cannot read from Content Type column.

    Im struggeling with this myself, maybe we can use the following (Not Tested yet, will test tomorow)

     

    SPREST-Versions (Get the data)

    Select and map the column (Content Type)

    Create HTML table (If we can see the output here we can use it in a condition.

     

    I will type my results tomorow

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow with conditions based on content type or custom properties

    Currently trying to use A custom document set to determine if whether or not a flow should be initiated. Users should not be able to start a flow with a singular document, only when they submit a complete document set.  Does anyone know when Document sets (33761) are going to be modernized?? because it was scheduled for Q1 and we are now in Q2.....  After testing this thoroughly I was able to conclude that we cannot use Content Type as a condition it behaves irregularly.

     

    I've tried the following:

    • Custom Content Document Set Types : Invoice Approval
    • Equals: Invoice Approval, Picture, Document, Document Set for parameters Content Type, Content Type Name, Content ID
    • Used a conditional , and tried a switch statement.
    • Used the GUID ID for the content types with and without the 01xGUID prefix
    • Tried inverse logic "if not equal to" document with only other option as "Invoice Approval"
    • Uploading a document will not work either no option to select a content type.
    • Conclusion: Flow does NOT like Content Type as a control condition AT ALL.

    Resulting in mostly parameters did not meet criteria email being sent. Which means it's most definitely not seeing any of the content type.

     

     

     

  • Ian Bruckner Profile Picture
    4 on at
    Re: Flow with conditions based on content type or custom properties

    seems like content type values (ID/Name) aren't returning... even though such attributes are showing up as selectable.

  • CRM Unified Interface Change on October 16th Profile Picture
    14 on at
    Re: Flow with conditions based on content type or custom properties

    Thansk for the reply and the user idea suggestions, I will take a look.

    The solution based on file type although can be used in some scenarios, can't really be used in enterprise scenarios where what makes sense is to use custom content types to classify information.

     

    Thanks,

    Miguel

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics