Create a Link to trigger the Zapier action

Formidable Forms
29 January, 2023 16:07:48
Topics: 11
Messages: 30
Hi,
I have setup zapier to save file to dropbox folder via a webhook, it works great. However I noticed it if I place this shortcode into the success message that it does it automatically. without having to click a button like the download shortcode.
I'd like to create a formidable view that has the various created pdfs displayed, which I already know how to do, but to then have a button/link that if clicked will trigger the zapier function to save to dropbox. Is there a way to wrap the zapier shortcode into a href link? or something like that, itd be helpful to label the link as well.
30 January, 2023 02:38:24
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Unfortunately, E2Pdf doesn't have such functionality. We currently moved it to "Support Request" to review the possibility to add its support.

For now, If you have enough knowledge of WordPress and PHP, you can try to create an ajax URL, which will send an Entry ID for which it must be fired "zapier" shortcode, and fire shortcode via PHP as:

do_shortcode('[e2pdf-zapier id="1" dataset="' . $entry_id . '" webhook="https://hooks.zapier.com/hooks/catch/1234567/ocfuhfo/"]');

* where "1" is the ID of E2Pdf Template
** $entry_id is the dynamic Formidable Forms Entry ID

We remain at your service.
We would really appreciate your feedback at WordPress.org!
5 February, 2023 17:43:40
Topics: 11
Messages: 30
Thats awesome!
I found a way around the issue for now, but will refer to this for the future.
15 February, 2024 01:29:31
E2Pdf
Support
Topics: 7
Messages: 3163
Hello,

We can see a mistake in the code. You have "dataset2" in the shortcode, which is incorrect. It must be "dataset=":

do_shortcode('[e2pdf-zapier id="17" dataset="' . $entry_id . '" webhook="https://hooks.zapier.com/hooks/catch/*********/********/"]');

However, from your code, we also do not see that you are sending the Entry ID via Ajax...

P.S. You can try to use the current js code https://codefile.io/f/fG6YXJolVV But you still must get the Entry ID via jQuery / JavaScript and assign it to the function above.

We would really appreciate your feedback at WordPress.org!