+1 to trying to figure this out too.
I tried creating a new record in the Target Record field with
env['crm.lead'].create({'name': payload['name': 'foo']})
but it looks like this happens in a safety evaluation here. I'm not sure what that entails yet but that throws many errors I haven't decided to look into yet.
It also looks like it's not bringing in the env variable like it says it is right above it or I'm not accessing it correctly. I feel like env['crm.leads']
shouldn't come back with an error that env is undefined.
I tried selecting a dummy record statically and then creating it in my Execute Code block too but that's causing all kinds of 500 page dead errors:
env['crm.lead'].create({
'name': "FooBar",
"user_id": 2
})
But this kicks back a 'dict' object has no attribute 'name'
error from ir.logging when I wrap it in an except block.
To create new record using webhook: https://www.youtube.com/watch?v=D3urHJ9rB2o