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?
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.
For some reason I am not seeing that in the options showing within the webhook. Am I missing something? Or is it named something different? I would assume that post number would work for this, but it appears to count an edit as a new post number. Here is the list of webhook titles available to me:
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?