Workflow: webhook -> create a task

Hi. I'm evaluating Twenty CRM, and wondering about the Workflow. My workflow starts with a Webhook as a trigger, then I want to use the data sent to the webhook, to create a task record. But I failed to extract the data from webhook post payload. I tried using code to extract. So I'm wondering if this is possible right now (v1.1.1)? If it is, how can I extract the data from the webhook payload
No description
5 Replies
Prastoin
Prastoin2mo ago
Hey @thomast could you please give this a look when you have some free time ?
thomast
thomast2mo ago
1. Define the payload you are expecting to receive in the webhook step 2. Use the webhook output variables as input of your code step
No description
No description
Sid Manat
Sid ManatOP2mo ago
Thank you. I think that explain things. However, I still can't make it though creating a Task record. I tried 2 versions of it (as attached). But I always got Task records with title as "New Record - undefined". Why did data1 in the Create Record keeps getting undefined? How should I pass this?
No description
No description
thomast
thomast2mo ago
you return data1: a in your code action but you did not put any variable into a. You need to set a variable in the input of your function. As I did in my second screenshot
Sid Manat
Sid ManatOP2mo ago
Thank you for the suggestion. It works now. In my case, I don’t even require the code to extract the data. I can directly use the value from the webhook to create a record.

Did you find this page helpful?