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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / I think I got myself i...
Power Automate
Unanswered

I think I got myself in over my head.

(0) ShareShare
ReportReport
Posted on by
I am working building a couple flows for work but I am getting stuck.  Is there a place I can upload my document, or would someone be willing to look this over and help me out.  Copilot has helped me out tremendously but im still having issues.  
This is what I am trying to do.    I am really stuck on the email ingestion flow
  1. Email ingestion
    1. When an email arrives in the email escalation folder,
      1.  the email should be added to the Email escalation tracker sharepoint list after the list is check to see if the thread already exists.
        1.  If the thread already exists on the list, the new email should be appended to the current item. And a copy of the email added to the email document library.
        2.  If the thread does not exist, a new item should be created, with the status of “Not Assigned”, and the email added to the email document library.
        3.  The email threads need to be linked by Conversastion ID 
    2. query the subject and the body of the email to locate the Service Branch (SB) and the therapy. 
      1. The therapies can be references from the AT Therapy Type list
        1. There will be no reference to therapy in the email other than the abbreviation
          1. How do I look for and match the therapy from another list.
  2. Assignment and Acknowledgement Logic
    1. Trigger when item has been modified
      1. Trigger condition
        1. The status must be ‘Assigned’
        2. The AssignedFlag must be empty
        3. The ProcessCompleted field must be ‘No’
 
    1. When the AssignedTo filed has been populated and the status has changed to “Assigned”,
      1. Check the value of the IsBeingProcessed Column.  If yes terminate flow. If No continue on
      2.  lock the item by changing the IsBeingProcessesd column to YES
      3.  send the Assignment & Acknowledgement email template to the AssignedToEmail and the sender of the triggering email. (template below).
      4.   Once the email is sent, change the EmailSend_Assigned field to Yes, and populate the ‘AssignedFlag’ with Assigned Email Sent, the timestamp and the user that modified the item. To prevent an infinite email loop
      5. Unlock the item by changing the IsBeingProcessed to ‘No’
  1. Completion Logic
    1. Trigger – When Item is modified
      1. Trigger conditions
        1. The status must be completed
        2. The AssignedFlag must be populated
        3. The value of  EmailSent_Assigned must be yes
        4. The value of EmailSent_Completed must me ‘No’
        5. The CompletedFlag field must be empty
        6. The PrecessCompleted Field must be ‘No’
    2. When the status is updated to ‘completed’
      1. Check the value of the IsBeingProcessed Column.  If yes terminate flow. If No continue on
      2. Lock the item by changing the IsBeingProcessed field to ‘Yes’
      3. Reply to the original email that triggeres the task using  the completed email template. (template below)
      4. Once the email is sent, change the EmailSent_Completed field to Yes, and populate the ‘CompletedFlag’ with Completed Email Sent, the timestamp and the user that modified the item. To prevent an infinite email loop
      5. Unlock the item by changing the IsBeingProcessed to ‘No’
      6. Change the ProcessCompleted field to ‘yes’
  2. Completed Task Handling
    1. If the status is ‘Not For Ship Clearance’, Copy the item to the Emails not for Ship Clearance List
    2. If the status is ‘Future Shipment’ copy item to the Future Shipment Emails list
  3. Status Change Log
    1. Anytime that there is a change in the status, there needs to be a timestamp and the name of the user that changed the status.  This should be a running list in the StatusChangeLog Field
  4. Error handling and logging
    1. There needs to be robust error logging, using minimal variables, capturing the following fields
      1. Title: outputs('Compose_-_Build_Log')?['flowName']
      2. Timestamp: outputs('Compose_-_Build_Log')?['timestampUtc']
      3. Severity: outputs('Compose_-_Build_Log')?['severity']
      4. Message: outputs('Compose_-_Build_Log')?['message']
      5. CurrentStep: outputs('Compose_-_Build_Log')?['currentStep']
      6. Entity: outputs('Compose_-_Build_Log')?['entity']
      7. EntityId: string(outputs('Compose_-_Build_Log')?['entityId'])
      8. TrackingId: outputs('Compose_-_Build_Log')?['trackingId']
      9. CorrelationId: outputs('Compose_-_Build_Log')?['correlationId']
      10. ErrorJson: string(outputs('Compose_-_Build_Log')?['error'])
      11. ContextJson: string(outputs('Compose_-_Build_Log')?['context'])
      12. RunId: outputs('Compose_-_Build_Log')?['runId']
 

 
Categories:
I have the same question (0)
  • Suggested answer
    Power Robo Profile Picture
    17 on at
    I think I got myself in over my head.
    You can absolutely build this end to end in Power Automate, but it helps to split the work into clear parts so the logic doesn’t get overwhelming. Here’s a simple way to approach it based on what you described.
    For the email ingestion, the key is the Conversation ID. When the email arrives, get the items from the SharePoint tracker list and filter on the Conversation ID. If you find a match, update the same item and add the new email into your document library. If nothing matches, create a new list item with the status set to Not Assigned and save the email into the library. For finding the therapy, pull the therapy list into a collection, then check each therapy abbreviation against the subject and body. A simple contains check usually works well.
    For the assignment flow, you can rely on trigger conditions to make sure it only runs when the status becomes Assigned and no previous email has been sent. Before doing anything, check the lock field. If it is already set, end the flow. If it is not set, switch the lock on, send your assignment email, update your flags, then switch the lock off again. This avoids loops and duplicate notifications.
    The completion flow follows the same pattern. Only trigger when the right flags are in place, check if the item is locked, lock it, send the completion message, update the flags, unlock the item, and finally mark the process as completed. After that you can handle the branching logic for Not For Ship Clearance or Future Shipment by adding the item to the correct lists.
    For the status log, use an append to string or append to array, depending on how you store it. Each time the status changes, add the username and timestamp into the log field.
    For error logging, build one compose at the start of the flow with your log values and call it whenever an error happens. This keeps the logging consistent without needing to create a lot of variables.
    The main thing is to keep each flow focused on a single purpose. One flow handles emails, one handles assignment, and one handles completion. Once you break it down this way, it becomes a lot easier to manage and test each part.
    If you want, you can post screenshots of your current build and the community can help you fix the parts that are giving you trouble.

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 532 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 461 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 256

Last 30 days Overall leaderboard