Hi @Oleg ,
Sorry for the delay in getting back to you. Yes, I am building an automation script action. The action is triggered whenever a “Task” entity is created and it parses the name of the entity, looking for predefined tags enclosed in []
. So I would create an entity called:
Complete the review of the specifications [to me ] [by 0 aft ] [tags i u ]
The automation script would take each of the items enclosed by []
and using the first word, prepares an object to update the entity:
[to me/Contact Name]: assigns the task to the entity’s creator (me) or a Contact entity with the given name (if multiple Contacts are found, it adds a note to the task to double check the name
[by #days morn/aft/eod]: assigns the deadline by setting the date to today+#days and the time based on predefined value of what morn/aft/eod means
[tags u i]: sets the task priority with u=urgent and i=important. none/one/all of these could be selected as Priority
is a multi-select field
I collect the updates in the entUpdates
object, which looks like:
{
Name: 'Test task',
Assignee: 'bae5f000-5af9-11eb-bced-bb2f3ecffbc1',
Status: 'Assigned',
Priority: [ 'Important', 'Urgent' ]
}
And then try to update the entity:
await fibery.updateEntity(entity.type, entity.id, entUpdates);
This is where I get the error.
This sounds a bit crazy but it is the best solution that I could come up with to set of the parameters for tasks without leaving the writing context.
I hope that makes sense. I can post the entire script if that is helpful.