Chubb script

This commit is contained in:
Norm Rasmussen
2024-09-09 18:11:27 -04:00
parent 400af7ba31
commit 1739cacd10
2 changed files with 24 additions and 19 deletions

View File

@ -7,13 +7,13 @@ import Apikeys
import time
pp = pprint.PrettyPrinter(indent=4)
APIKEY = Apikeys.BLOOMERANG
APIKEY = Apikeys.CHUBB
HEADERS = {
"accept": "application/json",
"X-Api-Key": APIKEY,
}
BASEURL = "https://api.northpass.com/v2/"
IMPORTFILE = "/Users/normrasmussen/Downloads/bloomberg-vms-invite.csv"
IMPORTFILE = "/Users/normrasmussen/Downloads/cisa-092024.csv"
def bulk_invite_and_group():
@ -60,9 +60,9 @@ def bulk_invite_and_group():
response = requests.post(url, headers=HEADERS, json=payload)
print(f"Completed. Status code is {response.status_code}")
print(response.text)
# print("Running add props from func...")
# time.sleep(3)
# add_props_from_func(people, data, group)
print("Running add props from func...")
time.sleep(3)
add_props_from_func(people, data, group)
def add_props_from_func(people, data, group):

33
tmp.md
View File

@ -1,17 +1,22 @@
Message 1 for Austin:
Oh! Something else for this week... Anthology has been having a few issues this week with the Workato flows. I had to update a few flows. It appears everything has been working since I updated it, but.... it's Anthology. I've asked them to try their best to not reach out to you but if it's preventing their clients from seeing content and accessing courses, I told them to be _very clear_ and share _a lot_ of details if they do have to reach out to you. You know how this whole thing works; nothing has really changed. And I don't trust any of the new support guys. Heck, idk how Brian would help with this... he would just escalate to you. Here are the relevant links and reminder of the flow:
1. Amit formats a CSV with column A being the domain and all the other columns being the groups that domain should be associated with.
2. He Submits the CSV via [Google Form](https://docs.google.com/forms/d/11cDnam9-rPfQN2VpAdQzqK8MbjFEqjuGrpM3rEMx3KM/edit).
3. The Google Form places the CSV in [this drive directory](https://drive.google.com/drive/folders/1hAz7O-eoxFUk4YW7FoHr4uNJmPs7CiV5BjBNTLtMJzXwY0CbpykYgSAkFR5Quy_MPdn3e_5j).
4. A [Google App Script](https://script.google.com/macros/u/0/start?mid=ACjPJvFGVPGTFsTgKy2Q6AvciyfFgXq0BcoXTjfvQkM9NB5TPkS82MTFlTbYhu7ECjjwtSUw7CQMzKPDOW1uQa0Gs8j7nn7fddpAb4rH0GCBW69Kvzc_LbLcbz7J7SFewq_cfnoQah8kPGCe&uiv=2) associated with the form runs and does a few things: a. finds the newer file, b. compares it against the older file, c. finds only changed rows, d. the changed rows are in an array and switches the group names for group UUIDs, e. sends a webhook to [this workato endpoint](https://app.workato.com/recipes/44069920-update-user-groups-by-domain#recipe), f. updates a [master google sheet with all domains and group uuids](https://docs.google.com/spreadsheets/d/1Kck1UUOkVIU4kbBC8b_bl77fNaCTSFStiv0I5Gg-kIc/edit?gid=0#gid=0), g. moves the older csv file to another directory, and sends an email to me and amit with all the updated domains and groups along with any errors that it encountered.
5. Then, when someone new activates in the academy, [this workato recipe](https://app.workato.com/recipes/31333960-activation-mapping-via-sheets#jobs) runs by searching the google sheet for the domain, grabbing all the uuids, and making an API call to add them.
Notes from Emergency Options meeting:
* Gainsight will continue to integrate CE data sources and alert into NOC - Network Operations Center. This will always be the first line of defense for Walmart.
* For additional coverage, urgent@northpass.com will ping and wake up all necessary parties for all hands on deck.
* Slack is also always available for the team.
If Amit comes to you with any issues, I _usually_ find something wrong with a recipe execution on the activation mapping. You can also check the google apps script executions. Google will tell you if it failed along with any log statements - I logged a lot so I can find the error. Most of the time, Amit has done something odd or incorrect, but sometimes it's also just our systems.
* Formal procedure: Email the NOC (email address tbd) and await their reply.
* Informal procedure: Slack/Email Gil and Norm.
In the event of a P0 - Global issue, RC unavailable for multiple people in Spark app, degradation of services:
* Email urgent@northpass.com and send a Slack message to the #walmart-northpass channel.
* Please include any relevant screenshots and/or videos of the issue and incident.
* Ping the following people from Gainsight:
* Gil Michlin, SVP of Engineering
* Norm Rasmussen, Enterprise CSM
* Mateusz Kuchniak, TechOps
* The three above people will be available via Slack and help coordinate additional engineering resources and personnel to communicate with Walmart engineering.
* From Walmart engineering, Sanjeev will be main point of contact for the Spark Application.
Message 2 for Austin:
heyo. i hope cohesion was good! i am out starting today so I can't remind you of anthology things. Please make sure you help take care of these minor design changes rachel is asking for. I've attached screenshots of the email. I've also attached the hero image without the "Get Started" link - the [Figma](https://www.figma.com/design/vbDR3ItJTg2NZtCIDeEkXV/Anthology-Academy?m=auto&t=v82sLUuxZurgJaRS-6) has the one with the getting starting link and it may have it in SVG if that's easier. I'm not sure how you want to configure that button - either a div over that section of the image, or if you want to draw it out yourself in HTML. When someone clicks that, it should land on the search results page with "Anthology 101" pre-filtered. Please just read through all the comments in the Figma.
I think they are about ready for moving the search bar; I would just confirm after you finish the minor design changes.
I'd rather you push changes and make mistakes rather than not do anything because I'm not around to answer any questions. I trust you! Just make sure you let Katie/Rachel know when changes are pushed.
In the event of P1 and below - Regional issue, only affects some users, is not a degradation of services to drivers:
* Screenshot, record, and capture as much of the issues as possible.
* Send email and/or Slack message in #walmart-northpass channel and tag Norm
* Norm will assess and bring in appropriate engineering or professional services resources to help fix the issue.