Webhooks are a simple paradigm for developing instant notifications and mash ups based on simple HTTP requests. With WPDM WebHook you can set up webhooks so that a specified URL (a public service or something you set up) is requested when certain WordPress actions occur. Possible uses include generating push notifications or using non-PHP web technology to extend WordPress.
Installing WPDM WebHook Plugin
- Download the WPDM WebHook plugin. Unzip plugin zip file and then upload the plugin folder and files via FTP Client like FileZilla to your wp-content/plugins folder OR upload the plugin zip file via the "Add New" plugin menu in WordPress.
- Activate the "WPDM - WebHook" plugin you just installed.
Using WPDM WebHook With Download Manager Zapier App
In order to use the Download Manager Zapier App you must have a Zapier account. Zapier is a paid service and pricing is based on volume and usage. You can find more about Zapier pricing here
Visibility for Download Manager Zapier App is now set to Invite-Only mood. Use this
link to invite yourself. Otherwise, you will not able to see Download Manager Zapier App under Zapier Trigger Apps list.
In this example we will use Download Manager's wpdm_before_email_download_link hook as a trigger to get subscriber Email address and Name. We will use MailChimp as Action app.
- Login to your Zapier account. Under Zapier Dashboard either click Make A Zap! located in menu bar or click Make a New Zap located in right sidebar.
- Choose a trigger and action:
- Choose a Trigger app: Click Choose a Trigger app.. select box, you will see a list of available apps that you can use as a Trigger app. Search by typing Download Manager and select Download Manager App as shown below picture:
- Choose a Trigger: Click Choose a Trigger select box, you will see available Download Manager hooks. Select New wpdm_before_email_download_link Hook.
- Choose an Action app: Select Choose an Action app select box, you will see a list of available list of apps which you can use as Action app. Search for MailChimp and select MailChimp as Action app.
- Choose an Action: Click Choose an Action select box and select Add Subscriber action.
- Now click Continue button to go to next step.
- Select a Download Manager account:
- Copy Given URL to clipboard.
- Goto your WordPress Admin panel. Goto Downloads --> WebHook and click Add New button.
- Paste Copied URL (From Zapier Step 2) in the URL field and click Add button.
- Now goto Zapier window and click Continue button.
- Select a MailChimp account: If you already setup a MailChimp account select that account or Connect a new MailChimp account. Click Test This Account.
Click Continue button.
- Filter Download Manager Tiggers: If you want to add any custom filter Click Add a custom filter button otherwise click Continue button.
- Match up Download Manager wpdm_before_email_download_linl hook to MailChimp Subscriber:
In this step we will fetch Download Manager app data to Zapier. Below is the step by step procedure to do so:
- List: Click List select box, you will see available MailChimp Subscriber list here. Select your desired list, which you want to add automatic subscriber.
- Email: Click Insert fields button right side of the Email field.
- Step 1: If you previously copied this url to your WPDM WebHook plugin, you can skip this step. Click Ok, I did this button.
- Step 2:
Now go to your WordPress site, make a test download with Email Lock option. After successful download go back to Zapier site.
Click Ok, I did this button.
- Step 3: If you successfully done above steps, Zapier will show success message.
- Click All Done! button.
- Now Find Email Field from the dropdown list and select this field.
- Double Opt-In: Select yes if you want to enable Double Opt-in feature of MailChimp, otherwise select no.
- Send Welcome Email: If you want to send welcome email to your subscriber select yes otherwise select no.
- Update Existing:
Yes or No. NOTE: Selecting Yes will overwrite existing Groups a subscriber belongs to.
- First Name: Click Insert fields button. Search for Custom Form Filed Name as First Name.
- Test This Zap: Here you can test your trigger. Click Test Download Manager trigger button to test this Zap.
- Name and turn this Zap on Enter a name in Name this Zap: text field and click Turn Zap on button.