[Marketing] Use ETL-Tools as your JSON/API Enabled -Document Generation Software

More
2 years 1 month ago #24070 by prashant
Hi, 
I have managed to get the entire webhook moving to end point !
Code:
{ "{{mobile}}": "981110981110", "{{candidate_id}}": "00324", "{{candidate_name}}": "Chade Chivalry", "{{position}}": "Master Trainer of Assassins", "{{ctc}}": "54000000", "{{join_date}}": "2024-07-31", "{{join_company}}": "Firkee Accessories", "{{referral_type}}": "Portal Hiring", "{{referral_by}}": "Robin Hobb The Master", "{{offer_id}}": "00012", "{{g_link}}": "https://drive.google.com/file/d/1L-Q8oL-SKIbxihWOBNTFL5FhVlzubuYB/view?usp=drive_link" }
It required to run another script , so I could append the incoming json from URL LOGGER with Gdrive file link using python . Is there any other way to achieve this to append to JSON ? 


Code:
import etltools import json def main():     try:         xjson = etltools.GetVariable('<json_variable>')         gdrive_value = etltools.GetVariable('gdrive_value')         # Convert JSON string to dictionary to ensure it's valid JSON         xjson_value = json.loads(xjson)         # Add the gdrive link to the JSON dictionary         gdrive_link = {"{{g_link}}": f"https://drive.google.com/file/d/{gdrive_value}/view?usp=drive_link"}         xjson_value.update(gdrive_link)         # Convert the updated dictionary back to a JSON string         updated_json_value_str = json.dumps(xjson_value)         # Set the updated JSON string as a variable in ETL tools         etltools.SetVariable('updated_json', updated_json_value_str)         # Indicate success         Result.Value = 1     except Exception as e:         # Log the error message in ETL tools         # etltools.SetVariable('error_message', str(e))         # Indicate failure         Result.Value = 0 if __name__ == "__main__":     main()
The following user(s) said Thank You: Peter.Jonson

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save