• Resolved sandeld

    (@sandeld)


    Hello,

    I’m using the free version of your plugin so maybe what I’m trying to do isn’t possible.

    I have a Zap setup to watch for a Contact Property change in Hubspot. Once Zapier receives it, I want to send the email address of the contact into my site so that I can cancel their payment subscription (non-woocommerce plugin).

    As far as I can tell, I’ve been able to send the webhook to the site and had the success message returned.

    Zap setup:

    Success message:

    But what I can’t find in any of the documentation is how (or if) I can pass the email address of the contact in with the webhook in order to execute the custom PHP code. Without the email address, I can’t do anything, and then I don’t even need the plugin at all.

    Also, as an FYI, your Zapier extension doesn’t appear to be available anymore. (Or again, maybe it’s not for ‘free’ people.) When you click the ‘Accept’ button, it opens the Zapier dashboard and nothing else.

    Any help would be amazing, or I’ll be stuck sending cancellation notifications instead of automating and fool-proofing it. Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ironikus

    (@ironikus)

    Hey @sandeld – Thanks for reaching out!

    You can simply define another row within the “Data” settings item inside of the Zap you use (Webhooks by Zapier app).

    On the left (below the wpwh_identifier), you can add the argument (in your case you can use “email”, but it can be anything), and on the right you can add the email you’d like to send over.

    Once that’s done, you can accept the email within the code callback (The one you can copy from the description of the action) as follows:

    $email = WPWHPRO()->helpers->validate_request_value( $response_body['content'], 'email' );

    This snipped of code will locate the “email” argument from your request, which you set earlier, and make it accessible within the $email variable. This variable can then be used within your other custom code.

    As for the Zapier integration: Since we have quite some issues with Zapier and the way they deal with partners, I suggest using the “Webhooks by Zapier” app as our plugin works with webhooks and API standards anyways.

    Thanks, and feel free to reach out again in case you have any further questions.

    Thread Starter sandeld

    (@sandeld)

    Thanks, that all worked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Send data to “Custom PHP action” & Zapier extension not available’ is closed to new replies.