Discourse Webhooks and Zapier


(Arpit Jalan) #1

Want to use Discourse Webhooks to trigger a task via Zapier? Let’s get started!

Zapier requires a trigger and an action. In this howto the trigger will be a Discourse Webhook and the action will be to send an email.

Send an Email on User event

We will now set up a Zap to send email on user event (i.e when a user is created, approved or updated).

Create a Discourse Webhook

Create a new Zap

Look for this button on Zapier dashboard:

Set up Trigger

Set up Action on Zapier

Turn on the Zap

That’s it, now you will receive an email for every new user event (i.e when a user is created, approved or updated). :tada:


Zapier or another IFTTT service
Put in a vote for Discourse in Zapier apps
How to get email notifications when new users have signed up?
Infusionsoft marketing for new users?
Problems with the new-user webhook
Has anyone tried this RSS poster?
Notification of new users joining
Automatic Facebook (or other social) sharing of topics / posts to a FB page
Send email to new users 24 hours after joining
Auto Post New Topics to Social Media
Can we output a post to a text file?
How to differentiate webhooks for created, approved or updated
How to differentiate webhooks for created, approved or updated
(Aryo) #2

Is this method applicable for posting discourse content to facebook page automatically? Say every new topic that is created, posted to facebook page automatically.

Thanks…!!:smiley:


(Dog2puppy) #3

Yes. You’ll need to connect Facebook and Zapier first.


(Mittineague) #4

Does the existing “share to Facebook” feature not work for you?


(Dog2puppy) #5

They want it to be automated.


(Aryo) #6

I just tried it using RSS via Zapier + Facebook. It seems working! Every new topic posted in discourse is automatically posted to my facebook page. Nice nice!


(James) #7

Can I use this to add the email address of the new user to a list?


#8

Not possible as of yet but has been requested to be added


(Jesse Plautz) #9

Can you elaborate on that? I’d like to implement this for my FB page. Is it just the discourse RSS feed > Zapier > Facebook?


#10

It would be a new post webhook from your admin api page into zapier and then to Facebook

See the first post for an example


(Jesse Plautz) #11

Actually I just figured out how to do it using the RSS feed from discourse. Worked perfectly.


(Jesse Plautz) #12

Hey if you’d like to see a working example of this, I feel like I have a pretty slick setup and I’m really happy with it.

I have zapier setup to take all new discourse posts, parse the title and content, then post it on my Facebook page with a custom picture I designed.

My forum is here: community.vapementors.com
My FB page is here: /vapementors
Here is an example post taken from my Zapier integration: VapeMentors - @JesseVapeMentors wrote: Scott Gottlieb... | Facebook


(Christoph) #13

I understand that the user event webhook is triggered whenever a user is created, approved or updated. Does the payload include any indication which of the three events triggered hook?

I would like to trigger my zap only in the case of a new user being created, not in the other cases…

Is there any way of achieving this?

UPDATE: I now understand that the user event is provided in the webhook header:

X-Discourse-Event-Type: user
X-Discourse-Event: user_created

But Zapier does not seem to give me access to header information (only payload). Is there any way to filter by event nonetheless? @fantasticfears or @techAPJ, could you point me in the right direction?


I can't get the welcome message to display
Setting up webhooks
(Erick Guan) #14

I think Zapier offers customized code somehow. If so, you can use that!


(Christoph) #15

What do you mean by “customized code”?


(Erick Guan) #16

Can you write code in Zapier? You might want to ask them about it!


(Christoph) #17

Yes, you can (JavaScript and Python): Code by Zapier Integrations | Zapier

But I can’t…


(Erick Guan) #18

Pretty sure it can be done in $20. If you can wait for a few days, I am for the job


(Christoph) #19

Okay, that would be great!


(Erick Guan) #20

The result of this work is public here. Install this plugin and you will find user_created event in the webhook panel.


Email Newsletter For Forum Members
Webhook for new users
Setting up webhooks
How to collect user emails when they sign up
Send email to new users 24 hours after joining