-
Notifications
You must be signed in to change notification settings - Fork 0
/
notionUtil.py
54 lines (48 loc) · 1.26 KB
/
notionUtil.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from notion_client import Client
notion = Client(auth = os.environ["CLIENT_SECRET"])
def writeToNotion(data):
for i in range(0, len(job_company)): # Writing to notion Database - no primary keys
notion.pages.create(
**{
"parent":{
"database_id": os.environ["DATABASE_ID"]
},
"properties":{
"Company":{
"title": [{
"text":{
"content": job_company[i]
}
}]
},
"Job Location":{
"rich_text": [{
"text":{
"content": job_location[i]
}
}]
},
"Job Description":{
"rich_text": [{
"text":{
"content": job_description[i]
}
}]
},
"Posting Date":{
"rich_text": [{
"text":{
"content": job_posting_date[i]
}
}]
},
"Application Link":{
"rich_text": [{
"text":{
"content": job_app_link[i]
}
}]
}
}
}
)