In a discussion titled ‘Smart use of Zapier’ under the Support category, verilog15 seeks help automating Facebook posts from specific Discourse categories using Zapier. They initially consider using code via webhooks but note Zapier’s webhooks may require a premium plan. simon suggests using Zapier’s Filter Step to limit posts by category ID, noting that filters may also be premium-only and that webhooks are more cost-effective if already on a premium plan. verilog15 then switches to Integromat and asks about webhook JSON structure, noting they only see {"ping": "OK"} when testing. simon clarifies that this is from the Ping button, and actual topic creation triggers richer data. verilog15 asks if it’s possible to simulate post data without creating real threads — perhaps via a dev mode — but no solution is provided in the thread.
Hello,
Having some questions on Zapier. Hope that experienced users can help
I have managed to create my first Zap. It basically publish a link with a title on the Facebook page, every time user have posted some new topic in the Discourse forum. I’m trying to figure out how to make it smarter. For example, I want to publish posts only from a specific category or set a timer between the posts.
The first idea that came to my mind was to use a third tool - code (JS, python or any other PL). I saw that there is integration between discourse and code but I can’t understand how how can I do the following logic:
New post in Discourse community.
Run some code that do stuff (like set image, check category and so on).
Publish the post on the Facebook page if needed.
Is it possible to achieve this with Zapier? If so, how can I do this?
Yes, you can add a Filter Step on Zapier to filter posts by their category id. I am not sure if Zapier filters are only available on premium plans though. Have a look at the ’ Configuring which posts the Zap will retrieve’ and ’ Adding a filter step for finer control over posts’ sections of this topic: Use the Zapier Discourse Zap Templates.
If you are on a Zapier premium plan, it will be cheaper to use a Discourse webhook than a Zapier filter to control which posts trigger the Zap. If a Zap is stopped with a filter, it is still counted as a task on Zapier.
Thank you but I think I’ll try my luck with integromat. Small Webhook question
I have created a webhook that sends a POST request every time user opened a new topic. But I don’t understand how the JSON looks like. In the events I have:
{
"ping": "OK"
}
How can I expand the JSON to contain all the needed data?
The JSON you posted is the JSON that is generated when you click the webhook’s Ping button. Try creating a new topic on your site and then look at the request data for that event. You should see a lot more data there.