I am trying to use the workflow creation API, /automation/v3/workflows/, to create a workflow. I would like to branch on the Last Activity Date property being greater than 7 days. My JSON contains this:
…
“type”: “BRANCH”,
“filters”: [
[
{
“operator”: “GT”,
“value”: “7 Days”,
“name”: “Last activity date”,
“property”: “last_activity_date”,
“type”: “date”
}
]
],
“acceptActions”: [],
“rejectActions”: []
…,
but this always leads to an error containing this: “branchErrors”:{“22811467”:[“BRANCH_WITHOUT_FILTERS”]}.
Is there a way to branch on the Last activity date?
Hey @EBHamer,
Are you looking to create a workflow with branch like this:
If so, I believe the format of the branch will be something like this:
actions:[
{
type:"BRANCH",
actionId:169706893,
filtersListId:513,
filters:[
[
{
filterFamily:"PropertyValue",
withinLastTime:7,
withinLastTimeUnit:"DAYS",
reverseWithinTimeWindow:true,
withinLastDays:7,
withinTimeMode:"PAST",
operator:"WITHIN_TIME",
property:"notes_last_updated",
type:"datetime"}]],
acceptActions:[ ],
rejectActions:[ ]}],
It looks like you might be missing out a couple of things such as: filterFamily, withinLastTime, withinLastTimeUnit.
Could you try adding these information in and see if it works?
Wendy,
Thank you very much for your help. This did work.
Where could I have looked to learn this for myself?
Thanks again,
Eric
Hey @EBHamer,
Generally, what I’d recommend is to create a workflow of your team desire and use the Get workflows API to retrieve the specific parameter(s) needed for a particular action.