Skip to main content

I am trying to use this Lu.ma api code to create an event in Zapier using the Run Python in Code by Zapier.

 

Zapier is returning a success screen too me however my event itself isn’t appearing. Any help or insights into how I should modify the code? Sorry not a Python coder.

 

import requests

url = "https://api.lu.ma/public/v1/event/create"

return {'name': input_data a'name']}
return {'start_at': input_data a'start_at']}
return {'timezone': input_data a'timezone']}
return {'end_at': input_data a'end_at']}
return {'require_rsvp_approval': input_data a'require_rsvp_approval']}
return {'meeting_url': input_data a'meeting_url']}

payload = {
"name": 'name',
"start_at": 'start_at',
"timezone": 'timezone',
"end_at": 'end_at',
"require_rsvp_approval": 'require_rsvp_approval',
"meeting_url": 'meeting_url'
}

headers = {
"accept": "application/json",
"content-type": "application/json",
"x-luma-api-key": "REMOVED FOR SHARING"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

 

 

 

Hi @Dan_GRHF 

Good question.

Why not try to use the Webhooks app to make the API request?

 

 


I didn’t know that existed. Let me try to see if that works. Thanks @Troy Tessalone !

 


@Troy Tessalone I have not used this one before and definetly not a developer so maybe you can help me out as the zapier documentation was confusing me.

 

This is the API code itself. https://docs.lu.ma/reference/create-event-1

Based on how the webhooks by zapier works for the data section would I be inserting my data based on the fields of this code?

 

So in the sample they have the below. I assume I could make a data field then called name and have data from my zap where it says enter text or insert data?

"name": "New Yeork Party",
  "start_at": "2023-12-31T23:59:00Z",
  "timezone": "America/New_York",
  "end_at": "2024-01-01T00:01:00Z",
  "require_rsvp_approval": false,
  "geo_address_json": {
    "type": "google",
    "place_id": "ChIJmQJIxlVYwokRLgeuocVOGVU",
    "description": "Let's meet by the hot dog stand!"

 

 


@Dan_GRHF 

Left side would be the name and right side would be the value.


@Troy Tessalone this totally solved my problem thank you!