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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Field Trip or School T...
Power Automate
Unanswered

Field Trip or School Trip workflow

(0) ShareShare
ReportReport
Posted on by 26

Hello!

I have been tasked with trying to create a field trip workflow to replace our current paper and pencil method. I know this should be possible with the current Microsoft tools but unsure where to start. Here is the basis of what needs to be done. 

1. Instructor decides on the field trip along with date/time of the trip. 

2. All of the students participating in the trip need to acknowledge risks and provide emergency contact info.

3. Instructor then needs to send it to a dean to approve or reject. 
4. When the dean approves it goes to another department head to review and approve or reject. 

5. Instructor receives a notification that it was approved or rejected.

6. Instructor needs a compiled list of emergency contacts once they receive final approval. 

 

Any help or suggestions would be greatly appreciated. 
Thank you!

Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,325 Super User 2025 Season 2 on at

    @wojcika yes this is certainly possible using a combination of Microsoft Forms, a SharePoint list and a flow to request the approvals and update the list. In a separate post I will explain the final point about a list of all contacts where approval has been given as this will already be quite a long post with all the screenshots, although it didn't take long to build the system and is not a particularly complicated flow.

     

    Form. Create a form in Microsoft Forms for the student to confirm that they understand & accept the risks and to give the contact details:

     

    0-Form.png

     

    SharePoint List. Create a SharePoint list with the following columns

    Title: I normally use this for the responder's email address.
    RisksAccepted, Contact, Telephone, Dean, Head and CreateList: all are single line of text columns:
    DeanDate and HeadDate are date/time columns.

    DeanComments and HeadComments are multiple lines of text columns.

    0-SP-List.png

     

    Flow. Don't use the Forms template as it has an error, build the flow from blank. The overall flow looks like this:

    flow-detailed.png

     

    1. The trigger is the Forms "when a new response is submitted" immediately followed by the "get response details" action. 

     

    1-Flow.png

     

    2. Add a SharePoint "create item" action

     

    2-Flow.png

     

    3. Add a Start and wait for an approval action. Add the text you want and select the columns from the dynamic content box. At the end of each line add 2 spaces so in the email it wraps to a new line.

     

    3-Flow.png

     

    4. Add a SharePoint "Update item" action and for the approval or otherwise by the Dean select Outcome, Completion date and Responses comments. When you select the comments you will see that the action gets wrapped in an apply to each. This is expected so just leave it.

    4-Flow.png

     

    5. Add a condition that looks at whether the outcome was Approve. If it is then the next approval will start to the department head, if not we'll get the item and send an email with the decision and comments.

    5-Flow.png

     

    6. So in the red if no channel add a SharePoint "get item" action for for the Id field select ID from the create item section of the dynamic content box. Next, add a "send an email (v2)" action and  enter the text you need and select the details including any comments made by the Dean.

     

    6-Flow-DeanRejects.png

     7. In the green if yes channel add another start and wait for an approval, this time it will be for the department head.

    7-Flow.png

     

    8. Next add a SharePoint Update item action as earlier but this time select the Outcome, Completion Date and Responses Comments from the dynamic content box for the relevant columns in the list.

    8-Flow.png

     

    9.  Next, add a condition to check if the department head's decision (Outcome) was Approve.

     

    9-Flow.png

     

    10. In the same way as before, in the red if no channel add get item and send an email (v2) actions.

     

    10-Flow-HeadRejected.png

     

    11. Do the same for the green if yes channel but, obviously, with different working in the email.

     

    11-Flow.png

     

    Make sure you save your flow regularly as you are building it.

     

    12. When the form is submitted the flow will run and will send an approval email to the Dean. This is in the form of an adaptive card which means that the Dean can approve or reject and add any comments directly in the email. When this is done the adaptive card will close so it can only be approved or rejected once.

     

    12-DeanEmail.png

     13. The flow will wait until the Dean has submitted the decision and,  if it's Approve, the next approval email to the Department Head will be sent. In the example below the department head is rejecting it.

    13-HeadEmail.png

     

    The demail with the decision will then be sent to the Instructor.

    14-FinalEmail.png

     

    15. The Create item and the subsequent update item actions save it all into the correct item in the SharePoint list.

    15-SP-List.png

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

     

  • RobElliott Profile Picture
    10,325 Super User 2025 Season 2 on at

    @wojcika the second part of your request was "6. Instructor needs a compiled list of emergency contacts once they receive final approval."

     

    This needs a second flow and is triggered from the CreateList column where each item will have a JSON formatted button (the instructor can click any of the buttons to run the flow). The overall flow looks like this:

     

    0-Flow-Overall.png

     

    1.  The trigger is For a selected item

     

     

    1-Flow.png

     

    2. The first action is the SharePoint "get items" but we only want to bring back the ones where both the Dean and Department Head have approved. So in the Filter Query field enter 
    Dean eq 'Approve' and Head eq 'Approve'

     

    2-Flow.png

     

    3. We don't want an email for each person, we want them all in the same table on 1 email. So to do this add a Select action, select value from the dynamic content box, type in the columns you want in the left hand column and for the right hand column select them from the dynamic content box.

    Next, a  create html table action and select the outputs from the select action above.

     

    Next, add a Compose action and paste in the html in the spolier below, changing whatever you need to:

    Spoiler (Highlight to read)
    <style>
    table {
    border: 1px solid #1C6EA4;
    background-color: #EEEEEE;
    width: 50%;
    text-align: left;
    border-collapse: collapse;
    }
    table td, table th {
    border: 1px solid #AAAAAA;
    padding: 3px 2px;
    }
    table tbody td {
    font-size: 13px;
    }
    table thead {
    background: #1C6EA4;
    border-bottom: 2px solid #444444;
    }
    table thead th {
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
    border-left: 2px solid #D0E4F5;
    }
    table thead th:first-child {
    border-left: none;
    }
    </style>
    <style>table {border: 1px solid #1C6EA4;background-color: #EEEEEE;width: 50%;text-align: left;border-collapse: collapse;}table td, table th {border: 1px solid #AAAAAA;padding: 3px 2px;}table tbody td {font-size: 13px;}table thead {background: #1C6EA4;border-bottom: 2px solid #444444;}table thead th {font-size: 15px;font-weight: bold;color: #FFFFFF;border-left: 2px solid #D0E4F5;}table thead th:first-child {border-left: none;}</style>

    The below the </style> select the outputs of the create html table action.

    3-Flow.png

     

    Finally for the flow, add a send an email action and in the body field select the outputs of the compose formatted table.

    4-Flow.png

     

    JSON-Formatted Button. In the SharePoint list there is a column called CreateList. Click on the column header, select column settings then format this column. In the pane that appears click advanced mode and paste in the following JSON code and save:

    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
     "elmType": "button",
     "txtContent": "Generate Contact List",
     "customRowAction": {
     "action": "executeFlow",
     "actionParams": "{\"id\": \"e40ca797-366e-431e-be78-31e56e8e23ce\"}"
     },
     "style": {
     "background-color": "#e9a33a",
     "color": "white"
     }
    }

     

    You will then need to change the id of the flow to your flow's ID which you get from the address bar at the top of your flow And you can change the text on the button as well.

    5-Flow-ID.png

     

    Once you've saved the JSON code the button will look like this (of course you can add or change styling elements as you wish):

    6-Button.png

     

    As I mentioned at the beginning of the post the instructor can click any button and the same flow will run, it really doesn't matter which button they click. A panel will open for them to run the flow. As one of the students above was rejected we only want the 2 which have been approved by both the Dean and Department Head to appear in the table, and this is the resulting email.

    7-Email-Result.png

     

    If you have any questions about anything in my 2 posts then do ask again here (not by PM please, I don't usually respond to private messages).

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

     

     

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard