Sendgrid webhook

Hi guys,

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.

In python:

for item in # breaking up the items
xid = item['sg_message_id'].split('.')[0] # 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.


Hi @Robert_M can you share some screenshots?

Without seeing more details of the workflow, it sounds like a loop block could be helpful for looping through the full list of events.