Create Lead Using TypeForm

Hi,

I want to create leads in ErpNext using TypeForm. I already integrated it with my system as you can see here.

But now I want to generate leads based on TypeForm response.

In the second approach, because I have already integrated it into the ErpNext, Is there any way or workflow that I can use to generate leads automatically when I receive a response here?

Thanks!

Hi:

You can use Typeform webhooks, and create leads via ERPNext API.
https://frappeframework.com/docs/v14/user/en/api/rest#create

Using N8N, Zapier, etc … you can automate it without coding.

Hope this helps.

1 Like

I know this can be done, but can you share a tutorial or guide to explain this in detail?

One more question, can I automate leads from the response.

https://tppr.me/dWXLL

For example, when I got a Typeform response in ErpNext, it create the lead auto.

Is there any internal way in the ErpNext that I can create a lead from type response (which is already created in the response card)?

Thanks!

Hi:

I don’t really know how Typeform responses are being created in ERPNext … manually? I assume that you are using ERPNext API to do that … As Typeform seems to have an static webhook data structure, have you created a specific API method that receives Typeform data and insert records in your doctype? If you are doing it, you can insert doc in lead doctype too …
Maybe I missunderstood your requirement.

To create leads automatically:

Create a server script
Type: Doctype Event
Reference Doctype: Typeform responses
Event: after_insert

On code type:

doc = frappe.new_doc('Lead')
doc.first_name = 'Your data'
doc.status = 'Lead'
...
...
doc.insert()

This creates a lead every time a Typeform response get inserted … Note that this approach maybe won’t work, depending how typeform responses are being managed … You can make this using several ways.

There is a lot of docs about it:
https://frappeframework.com/docs/v14/user/en/api/document#frappenew_doc
https://frappeframework.com/docs/v14/user/en/api/rest

Hope this helps.

1 Like