I try to build a workflow for a sendgrid webhook to receive email feedback.
I run into the main issue that Sendgrid sends not one event but a list of events. So, I need to break up the events to manage 1 by 1. Use pyhon code what does not work.
Currently I try the following:
From startTrigger, I pass on the data to python code.
for item in startTrigger.data: # breaking up the items
xid = item['sg_message_id'].split('.') # getting the xid out from the event
id = function1(xid) # getting the user based on the xid
function2(id, item) # writing an event to DB
function1 and function2 are two queries against the DB - function1 (select id from ..) and function2 (insert into ...)
Surprisingly, I receive an: Object is not callable. Why? How can solve that?
Thanks a million.