Friday Email Guest Post

Contents

    A small blurb (2-3 sentences) about one thing you’re working on this week. As a general format:

    1. What is a key project/task you are working on this week
    2. Why is this work important to NSWERS and our partners

    The Teamhood item is automatically rotated every week via a logic app.

    To update the userlist/order:

    1. Open the logic app.
    2. Click on [@] Parameters in the toolbar at the top
    3. Expand “userList”
      • This is a JavaScript array of Teamhood user IDs in the order in which we rotate through them.

    Current User Rotation as of 1/16/2026

    ID Name Email Order
    e77797e7-b82b-47c4-9be8-4bf153386230 Alex Brodersen alexbrodersen@nebraska.edu 1
    3c87262c-24eb-4960-b405-2a8ea7f7f9a7 Akshdeep Singh Rajawat arajawat@nebraska.edu 2
    38ae3f32-4afd-4450-8470-b941370882be David Nguyen dnguyen88@nebraska.edu 3
    b80f3d11-21e1-46a5-93fa-6d312dedaae1 Katie Bieber katie.bieber@nebraska.edu 4
    fa161e13-2978-405a-b5a1-b7284cde15b5 TOM CHOI tomchoi@nebraska.edu 5
    e09d39c1-6aa2-43df-9cb6-5b274ef2d336 Scott Jonker sjonker@nebraska.edu 6
    87fc2d4b-c70f-4f94-85ca-be7fce073651 David Hefley davidhefley@nebraska.edu 7
    466bc025-0f44-424e-9dd1-89992cbafa8e Michael Grantham mgrantham@nebraska.edu 8
    e312c124-0eaa-4f44-9a82-9b9e0183de25 Atwell Mukusha amukusha@nebraska.edu 10
    33d399ea-38a0-4f0f-9066-ddbb400768d8 Cody Henseler chenseler@nebraska.edu 11
    9a142582-2604-458b-9331-2a1445d11c6c Amelia Miramonti amiramonti@nebraska.edu Not Scheduled
    8e2b7dc2-2f49-4efc-889c-30a59ff758ab Jennifer Schrodt jschrodt@nebraska.edu Not Scheduled
    2935e3a2-4418-4d42-be2c-869dbd6b013b Jay Jeffries jayjeffries@nebraska.edu Not Scheduled

    Teamhood API Request

    URL: https://api-nswers.teamhood.com//api/v1/users

    Authentication:

    • Header API Key: X-ApiKey
    • Header API Value: (in Bitwardent)

    const currentRotation = ["e77797e7-b82b-47c4-9be8-4bf153386230","3c87262c-24eb-4960-b405-2a8ea7f7f9a7","38ae3f32-4afd-4450-8470-b941370882be","b80f3d11-21e1-46a5-93fa-6d312dedaae1","fa161e13-2978-405a-b5a1-b7284cde15b5","e09d39c1-6aa2-43df-9cb6-5b274ef2d336","87fc2d4b-c70f-4f94-85ca-be7fce073651","466bc025-0f44-424e-9dd1-89992cbafa8e"];
    
    // Tests
    pm.test("Response status is 200", function () {
        pm.response.to.have.status(200);
    });
    
    pm.test("Response users is an array", function () {
        var jsonData = pm.response.json();
        pm.expect(jsonData.users).to.be.an('array');
    });
    
    // Visualization - Users Table
    var template = `
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
            font-family: Arial, sans-serif;
            font-size: 14px;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 10px;
            text-align: left;
        }
        th {
            background-color: #4CAF50;
            color: white;
        }
        tr:nth-child(even) {
            background-color: #f2f2f2;
        }
        tr:hover {
            background-color: #ddd;
        }
        .status-active {
            color: green;
            font-weight: bold;
        }
        .status-disabled {
            color: red;
            font-weight: bold;
        }
    </style>
    <table>
        <thead>
            <tr>
                <th>ID</th>
                <th>Name</th>            
                <th>Email</th>            
                <th>Order</th>            
            </tr>
        </thead>
        <tbody>
            {{#each response.users}}
            <tr>
                <td>{{id}}</td>
                <td>{{firstName}} {{lastName}}</td>            
                <td>{{email}}</td>            
                <td>{{orderText}}</td>       
            </tr>
            {{/each}}
        </tbody>
    </table>
    `;
    
    function constructVisualizerPayload() {
        var jsonData = pm.response.json();
        // Pre-process to convert accessibleWorkspaces array to comma-separated string
        var users = jsonData.users.filter(user=>user.status !== 'Disabled' && user.id!=='0a2199e6-06b6-435c-bce5-dd8ebefe8659').map(function(user) {        
    
            const myOrder = currentRotation.indexOf(user.id) + 1;
    
            return {
                id: user.id,
                firstName: user.firstName,
                lastName: user.lastName,
                email: user.email,
                status: user.status,
                lastActivityDate: user.lastActivityDate,
                workspaces: user.accessibleWorkspaces.join(", "),
                order: myOrder === 0 ? 99 : myOrder, // Add order based on currentRotation array
                orderText: myOrder === 0 ? 'Not Scheduled' : myOrder, // Add order based on currentRotation array
            };
        });
    
    
        users.sort( (a,b)=>{
              
              if (a.order < b.order) {
                return -1;
              }
              if (a.order > b.order) {
                return 1;
              }
      
            return 0;
        });
    
    
    
    
        return { response: { users: users } };
    }
    
    pm.visualizer.set(template, constructVisualizerPayload());

    Updated on May 22, 2026

    Leave a Reply

    Your email address will not be published. Required fields are marked *