Small tweak needed in code for action

@admin_mike , I think I’m close! Can you help me tweak this a touch?

1 Like

Hi @chadvmm,

I think the problem in this case is that the response is plain text, not JSON, so using response_data = response.json() results in an error.

Try this code (inside the if statement if response.status_code in range(200, 300):)

# Capture response data
response_data = response.text
print("Email has been confirmed as sent correctly.")

For future webhook endpoints:
To confirm if its returning a valid json or not, try using https://www.postman.com/ to test.

Boom! you’re a beast. I don’t quite understand that section of the actionable code quite yet… but it seems depending upon the type of Bot, that a slightly different response query is required…