Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created July 9, 2025 00:30
Show Gist options
  • Select an option

  • Save KyMidd/8b70098675e8ecf2037119ed3dacf71d to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/8b70098675e8ecf2037119ed3dacf71d to your computer and use it in GitHub Desktop.
# Main lambda handler
def lambda_handler(event, context):
# Check if the event POSTED to URI /callback
if event.get("rawPath") == "/callback":
# ...
# Check if channelData top level key is present. If yes, this is a Teams event
if 'channelData' in body:
# Debug
if os.environ.get("VERA_DEBUG") == "True":
print("🟢 Event body:", body)
try:
print("🟢 Teams event detected")
# Handle the teams event
handle_teams_event(body, event)
except Exception as error:
print("🚫 Error handling Teams event: %s", str(error))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment