Models the entire organization a tree and saves to JSON file. Includes name, title, location and email of each person.
Copy .env.example
to .env
- Open developer tools to the Network tab.
- Sign in to Workday and navigate to the graphical Org Chart view.
- The URL should look like this:
https://www.myworkday.com/ORG_NAME/d/inst/ID_1/rel-task/ID_2.htmld
. Copy ORG_NAME from the URL into your.env
file - Scroll to the top node of the org tree. This should be the CEO/President/Founder of the company.
- Filter Network requests for
navigable
. You should see a POST request to a URL that looks like this:https://www.myworkday.com/ORG_NAME/navigable/ID.htmld
- Inspect the request and find the Form Data that was sent. Copy the values to your
.env
file, mapping as follows:
- navigable-instance-iid => ROOT_NODE_ID
- navigable-instance-did => ROOT_NODE_NAME
- initial-step => INITIAL_STEP_ID
- sessionSecureToken => SECURE_SESSION_TOKEN
- navigable-instance-set-id => INITIAL_STEP_ID
- Copy the
Cookie
request header to your.env
file and name itCOOKIE
Start Redis on localhost port 6379
redis-server
This will write a JSON tree representation to disk at get-org/data/tree.json
. The first run could take several minutes, depending on the size of your organization. You can exit the process and restart anytime.
node get-org
After generating the tree.json
file, you can perform a breadth-first search of the tree to filter the data or otherwise make use of it.
node get-org/traverse.js
Process each node using the handleNode
function.
{
"id": "123$4567",
"name": "Jennifer Doe",
"location": "123 Sesame St",
"title": "VP, Marketing",
"personId": "123$4567",
"email": "jenniferdoe@acme.org",
"children": [
{
"id": "123$4567",
"name": "Michael Doe",
"location": "123 Sesame St",
"title": "Director, Marketing",
"personId": "123$4567",
"email": "michaeldoe@acme.org",
"children": [
{
"id": "123$4567",
"name": "Jim Doe",
"location": "123 Sesame St",
"title": "Senior Manager, Marketing",
"personId": "123$4567",
"email": "jimdoe@acme.org",
"children": [
{
"id": "123$4567",
"name": "Matt Doe",
"location": "123 Sesame St",
"title": "Manager, Marketing",
"personId": "123$4567",
"email": "mattdoe@acme.org",
"children": []
}
]
}
]
}
]
}