I created a setup where each time a post is created in a specific category a Jira ticket is also created using Zapier. The issue I am running into is that each time someone edits a post and publishes it again another Jira ticket is created (it’s seeing it as a new post again). Is there any way to prevent this? I am not sure if there is some kind of unique identifier that says a post is original and has not been edited before that I can reference to prevent this from happening?
AI-generated summary
Kyle_Selby is trying to limit a Discourse-Zapier integration to only trigger on the first post of a topic, not on edits. The issue is that Zapier treats edited posts as new posts, creating duplicate Jira tickets. Falco suggests using the X-Discourse-Event header to distinguish between new posts and edits, but Kyle_Selby cannot see this header in the webhook options. Simon explains that accessing the header requires using the ‘Catch Raw Hook’ option in Zapier, referencing a guide for similar setups. Pfaffman notes that this approach may be inefficient due to processing unwanted events. Kyle_Selby confirms he’s using the ‘New Topic’ event and is seeking a field to filter out subsequent posts and edits. Kyle_Selby, Falco, simon, pfaffman, Kyle_Selby, Kyle_Selby
There is a header in the webhook request named X-Discourse-Event which should indicate if the post is a new one or an edit.
To get access to the webhook headers on Zapier, I think you will need to use the ‘Catch Raw Hook’ option for the webhook on Zapier. This topic gives an example of how to do that for a User Event webhook: Create a Salesforce lead via Zapier when a user signs up on Discourse. Setting up a Zap to listen for a Post Event webhook and filter out all requests where the X-Discourse-Event is set to post_edited will be quite similar.
The down side of that approach is that you have to process a whole bunch of topic events that you know that you don’t want, so it ends up being expensive.
Having a New Topic event seems like a good idea.
Hi @pfaffman! Yep I currently have it set up as a new topic event, I just can’t figure out which of those fields to filter out to get rid of any posts after the original one (including any edits). Any ideas on how to do that?
Anyone have ideas on what field I can use to prevent the duplicate posts from being referenced?
