Discourse Webhooks and Zapier

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

5 Likes

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

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

1 Like

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

7 Likes

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

5 Likes

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?

1 Like

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

What do you mean by “customized code”?

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

1 Like

Yes, you can (JavaScript and Python): https://zapier.com/zapbook/code/

But I can’t…

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

5 Likes

Okay, that would be great!

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

https://github.com/fantasticfears/discourse-user-created-webhook

7 Likes

Hey, @fantasticfears. I’ve a client who wants to email new users, so this seems to fit the bill.

Does this plugin still work? I see that the user created webhook is added, but it doesnt’ seem to be getting triggered.

I invited a couple users on a closed site and it didn’t get triggered when they logged in with an invite URL nor when they clicked the activation link in email or the activate account button.

3 Likes

The plugin isn’t updated for a long time but it should. I didn’t verify that. Perhaps you can find clues in /logs. It should be triggered when they clicked the invite link.

4 Likes

the plugin (user created webhook) doesn’t work currently. there is no trigger for new registered users and nothing in the /log.

2 Likes

Man, this is a real disappointment. I thought I’d found the solution to my email problems. Anybody able to figure out what’s going on with the plugin and get it fixed?

Ok. That’s a really simple plugin. Unfortunately I don’t know Ruby or how Discourse works under the hood, so I can’t fix it, but I imagine that somebody who does could find the issue and fix it in less than 15 minutes, assuming Discourse didn’t make some major changes.

Do you check the user created type in the configuration panel?

I guess you mean something like this:

yes, it has been checked.

2 Likes

Please try the new build.

3 Likes