I thought I had it, I was confident it was going to work, I even saw an issue and fixed it, but did not work.
Here is the code - tried it with the webhook as a variable and without
I als had to update the variable as it just keeps “data”:= data as an option, so needed to update to the variables I am using.
Cannot get the webhook to fire
the error is
I attempted to trigger the webhook to retrieve Iain Munro’s LinkedIn profile data, but there was an error due to an unexpected indent in the code. Unfortunately, I’m unable to retrieve the data directly.
import os
import requests
def summarise_linkedin_profile(name: str, linkedin_profile_url: str):
“”"
After getting the name and the linkedin profile URL of the person, the action will send a basic request to a make.com webhook
Args:
name (string): Name of the person
linkedin_profile_url (string): the persone LinkedIn Profile URL
"""
make_url = os.environ["https://hook.us1.make.com/ev81wc7lbeetans1nugynhd2l1a0jldj"]
data_to_send = {"name": name, "linkedin_profile_url": linkedin_profile_url}
}
try:
response = requests.post(make_url, json=data_to_send)
# Check for successful response
if response.status_code == 200:
return f"Successfully sent data. Result: {response.text}"
else:
return f"Failed to send data to Make. Status code: {response.status_code}, Response: {response.text}"
except Exception as e:
return f"An error occurred: {str(e)}"
Any help would be appreciated.