Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
yanokwa committed Apr 18, 2024
1 parent 371a740 commit 47a7f61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file removed docs/examples/mail_merge/input.docx
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/examples/mail_merge/mail_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
# customize these settings to your environment
PROJECT_ID = 1
FORM_ID = "my_form"
INPUT_DOCUMENT = "input.docx"
OUTPUT_FOLDER = "output"
TEMPLATE_DOCUMENT = "template.docx"
OUTPUT_FOLDER = "merged"

with Client(project_id=PROJECT_ID) as client:
submissions = client.submissions.get_table(form_id=FORM_ID)
for submission in submissions["value"]:
# only include approved submisisons
if submission["__system"]["reviewState"] == "approved":
with MailMerge(INPUT_DOCUMENT) as document:
with MailMerge(TEMPLATE_DOCUMENT) as document:
coordinates = submission["age_location"]["location"]["coordinates"]
location = f"{coordinates[1]}, {coordinates[0]}"
generation_date = datetime.now().strftime("%m-%d-%Y %H:%M:%S.%f")
Expand Down

0 comments on commit 47a7f61

Please sign in to comment.