Talkspace script for emails into props, G2, and Wild Health Notes.
This commit is contained in:
@ -409,3 +409,26 @@ TODO: Discuss in Dec/Jan - how to measure success in G2U? What metrics are impor
|
||||
* She's creating a Learning Path for onboarding next, is thinking of using a badge for that completion instead of a
|
||||
cert.
|
||||
* Erin accepted the invitation to join the CE Advisory Board.
|
||||
|
||||
## 10/02/2023
|
||||
|
||||
### Sync with Erin
|
||||
|
||||
Questions about Erin's flow:
|
||||
|
||||
* Erin doesn't touch Northpass until she's done with all the videos.
|
||||
* Completes one chunk at a time
|
||||
|
||||
Other Items:
|
||||
|
||||
* Design team: October 12th due date. Launch on the 19th.
|
||||
* Norm to submit ticket as soon as badges come in.
|
||||
* Erin requested that name of course will be on badge
|
||||
* If no badge, leave div blank.
|
||||
* If course is completed and they have a badge, show badge under sub nav.
|
||||
|
||||
Erin to put in fast lane request to switch Cert name from G2 Core to G2 Fundamentals.
|
||||
|
||||
House keeping:
|
||||
|
||||
* Erin in Boston - October 17th & 18th.
|
||||
|
||||
@ -253,3 +253,4 @@ Not sure why, PALs might say one thing.
|
||||
Implementation call for 60 minutes, 2nd week of January.
|
||||
9-13th
|
||||
Ask who else should be on the call.
|
||||
|
||||
|
||||
@ -228,3 +228,15 @@ DONE: Create Assignments Analytics for Google Sheets.
|
||||
## 09/25/2023
|
||||
|
||||
- custom learning path flows
|
||||
|
||||
## 10/02/2023
|
||||
|
||||
### New Learning Path Flows
|
||||
|
||||
Kaitlyn confirmed we can run the flows the way they would like. She would just "hide" or make the LP course non-clickable
|
||||
until the date arrives where they can access the course.
|
||||
|
||||
- Abby to send list of product IDs, Learning Path name, Course names, etc.
|
||||
- Abby to create group and send Norm name.
|
||||
- Bailey asked if she could add more courses to the group and get the person access - yes!
|
||||
- Get this done sooner than later! Confirm with Kaitlyn how to make it "live" without giving access.
|
||||
|
||||
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
import Apikeys
|
||||
import os
|
||||
|
||||
basefile = "/Users/normrasmussen/Downloads/MizunoAug_Completions.csv"
|
||||
basefile = "/Users/normrasmussen/Downloads/Mizuno-September23-Completions.csv"
|
||||
api_key = Apikeys.mizuno
|
||||
uuid_url = "https://api.northpass.com/v2/people?filter[email][eq]="
|
||||
prop_url = "https://api.northpass.com/v2/properties/people/"
|
||||
@ -51,7 +51,7 @@ def load_file(basefile):
|
||||
# completions = completions.iloc[:, 0:]
|
||||
print(completions)
|
||||
completions.to_csv(
|
||||
"/Users/normrasmussen/Downloads/MizunoCompletions_with_PGAIDs.csv",
|
||||
"/Users/normrasmussen/Downloads/Mizuno-09.23-Completions_with_PGAIDs.csv",
|
||||
index=False,
|
||||
)
|
||||
|
||||
|
||||
@ -4,8 +4,8 @@ from pathlib import Path
|
||||
import Apikeys
|
||||
import os
|
||||
|
||||
basefile = "/Users/normrasmussen/Downloads/client-learners.csv"
|
||||
api_key = Apikeys.wildhealth_edportal
|
||||
basefile = "/Users/normrasmussen/Downloads/talkspace-paid-learners.csv"
|
||||
api_key = Apikeys.talkspace_1099
|
||||
prop_url = "https://api.northpass.com/v2/properties/people/"
|
||||
headers = {
|
||||
"accept": "*/*",
|
||||
|
||||
55
Scripts/API_Tests/update_prop_from_email.py
Normal file
55
Scripts/API_Tests/update_prop_from_email.py
Normal file
@ -0,0 +1,55 @@
|
||||
import requests
|
||||
import Apikeys
|
||||
import csv
|
||||
|
||||
apikey = Apikeys.talkspace_1099
|
||||
url_email = "https://api.northpass.com/v2/people?filter[email][eq]="
|
||||
import_list = "/Users/normrasmussen/Downloads/Talkspace-bulk.csv"
|
||||
|
||||
def getfromEmail(url_email, apikey, import_list):
|
||||
uuid = ""
|
||||
with open(import_list, newline='') as csvfile:
|
||||
file = csv.reader(csvfile, delimiter=',')
|
||||
for items in file:
|
||||
email = items[0]
|
||||
url = url_email + f"{email}"
|
||||
headers = {
|
||||
"accept": "*/*",
|
||||
"x-api-key": apikey,
|
||||
"content-type": "application/json",
|
||||
}
|
||||
response = requests.get(url, headers=headers)
|
||||
if response.status_code == 200:
|
||||
response = response.json()
|
||||
for data in response["data"]:
|
||||
uuid = data["id"]
|
||||
items.append(uuid)
|
||||
# print(uuid)
|
||||
add_multi_prop(uuid)
|
||||
else:
|
||||
print("Another Error!")
|
||||
|
||||
def add_multi_prop(uuid):
|
||||
url = "https://api.northpass.com/v2/properties/people/bulk"
|
||||
payload = {"data": [
|
||||
{
|
||||
"type": "person_properties",
|
||||
"attributes": {"properties": {
|
||||
"paid": "true",
|
||||
}},
|
||||
"id": uuid
|
||||
}
|
||||
]}
|
||||
headers = {
|
||||
"accept": "application/json",
|
||||
"content-type": "application/json",
|
||||
"X-Api-Key": apikey}
|
||||
response = requests.post(url, json=payload, headers=headers)
|
||||
|
||||
if response.status_code == 404 or response.status_code == 403:
|
||||
print(f"Error {response.status_code} with user {uuid}")
|
||||
else:
|
||||
print(f"Successfully Added props for {uuid}!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
getfromEmail(url_email, apikey, import_list)
|
||||
Reference in New Issue
Block a user