'Flow will Create File in Sharepoint from an Outlook attachment but will not complete Update Files Property action

I am new to Flow but have created one that works well but would like it to do more. I have created a Flow that pulls any attachment from emails that land in my subfolder ('Reports') in my Inbox, and creates a file in a folder in Sharepoint. This works fine, the problem is when i try to add in the Update File Properties, which i placed right after the Create File actions so they I can auto update their Region ID and Document ID. Once I added the Update File Properties action, the files get uploaded as usual but nothing gets updated.

My Flow:

  1. On new email with attachment (webhook)

  2. Initialize IsSubjectFilterApplied variable(Type: Boolean, Value: true)

  3. Get Email (Message Id: Message Id, Include Attachments: yes

  4. Condition (IsSubjectFilterApplied is equal to true)

  X.Check From email address (Subject contains Report)
    XX.Apply to each attachment on the email (Output: Attachments)
     XXX.Create file (File Name: Attachments Name, File Content: Attachment     Content
     YXX. Update file properties(Id: Current item, Title: Attachments Name, Region Id: K&B - Americas, Document Type Id: Tracker  

When i add in step 4YXX -- it does not update the region ID and document type. What am i missing?



Solution 1:[1]

Two ideas you might not have thought about:

  1. Creating a file in a SharePoint document libary will cause that file to have the default content type "Document". If you use your "Create file" action make sure, you create it with the right content type, that includes your properties (Region id...)
  2. Try storing the properties each in a variable beforehand and read out what´s inside while running the Flow.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jirayia