Update #3
Another Modular piece we have here , all the information regarding the form is received via webhook in URL Logger, once we make the OFFER letter, appointment letter IN PDF format , we upload it to Gdrive , the outgoing webhook must have the information of the newly uploaded file.
Which means JSON received from URL logger has to appended , currently as my information
this can only be done with script (team ETL let me know if I am wrong), since I am a chatgpt programmer , here's the script we will use in all of our cases
Code:
import etltools
import json
try:
# Retrieve JSON and gdrive values
xjson = etltools.GetVariable('<json_variable>')
gdrive_value = etltools.GetVariable('gdrive_value')
# Update JSON with gdrive link
xjson_value = json.loads(xjson)
xjson_value["{{g_link}}"] = f"https://drive.google.com/file/d/{gdrive_value}/view?usp=drive_link"
etltools.SetVariable('updated_json', json.dumps(xjson_value))
Above code changes the JSON like below
{
"{{mobile}}": "09562312563",
"{{candidate_id}}": "372",
"{{candidate_name}}": "Tanvi_Musk",
"{{candidate_position}}": "HR manager",
"{{candidate_ctc}}": "540000",
"{{join_date}}": "2024-05-08",
"{{candidate_address}}": "yo mama my address is here",
"{{company_logo}}": "firkee_logo.png",
"{{letter_type}}": "04-Appointment_Letter",
"{{filename}}": "Tanvi_Musk_ID_372-Letter_Type_04-Appointment_Letter",
"{{gdrive_link}}":"mygdrive_link"
}