I am trying to set up an automation to create the next activity whenever a previous activity is marked done.
I have configured the Pipedrive Trigger to pick up updates to Activity.
Even if I add an IF condition to check if the value of ‘done’ is ‘true’, when I make changes to a done activity, I will have the risk of running this automation again.
So is there a way to execute the workflow ONLY WHEN the status of an activity is updated to Done?
Hi @amit, I hope you’re having a good day thus far?
Our trigger nodes are essentially wrappers around the webhooks from Pipedrive. While these webhooks from Pipedrive don’t tell us what exactly has changed, they do sent through the previous state of the object in question (in this case the activity).
So you can use a simple IF node to check whether the value of a specific field has changed. This example flow demonstrates how to check the
done field, but can easily adjusted to check other fields as well:
Hope this helps! Let me know if you need any help with this
This is great. It worked. Thank you so much.
I am new to n8n, so sorry for my ignorance, but how can I use the code you shared with the solution?
Sorry for not being clearer on that - you can essentially just copy the JSON code block I have shared and then paste it right into your n8n workflow (described in more detail at Workflow | Docs).
You then wouldn’t have to build it yourself, just pick the right credentials on the Pipedrive Trigger node and you’re good to do. Hope this makes sense!
Thank you so much.
I was able to implement the complex workflow that I had set out to do when trying out n8n.
I used @MutedJam’s suggestion to compare previous versus current data to see which field was updated.
A majority of tasks fail the first condition (Activity Marked Done? → Do nothing), where the activity is updated, but the update is not in the form of activity done status. This works fine, but my query is about what counts as a workflow execution. Because in this case, even if the rest of the flow, which this is designed to do, doesn’t execute, it is still counted as execution and towards the quota of my plan.
Am I doing something wrong? Or is my expectation to not count this as an execution unfair?