How to export data using Webhooks (Example Zapier)

You can export data after documents are approved in formats such as csv and excel or json using api or webhooks.

In this article, we are going to talk about webhooks. We'll be using zapier for this example but you can use any Webhooks service or create your own.

1. Make new zap

2. Choose Webhooks

3. Choose catch hooks

4. Copy and update Webhooks in Docsumo

You can add your Webhooks url by going to the 'Setting' page of Docsumo or from download popup from document types.

5. Approve sample document from review screen

When you click approve, POST request is send to Webhooks with following payload:-

{
"doc_id": "f22ffbc0453b46d2b4c837ac5193cf85",
"meta_data": {
"type": "invoice",
"title": "d4f1f8afa50349f395ebffacf153de47.jpg",
"created_at": "2019-07-31T05:48:12+00:00",
"uploaded_from": "web"
},
"data": {
"Basic Information": {
"Invoice Number": "#123",
"Issue Date": "2017-03-22",
"Terms": "04/22/17",
"Order Id/Tracking No": ""
},
"Seller Detail": {
"Name": "Your name",
"Address": "Your fancy street,",
"GST/ VAT Number": ""
},
"Buyer Detail": {
"Name": "Awesome client",
"Address": "Your fancy street,",
"GST/ VAT Number": ""
},
"GST & Amount": {
"Subtotal": "",
"Tax Rate": "",
"Tax Total": 62.7,
"Total Due": 1500
},
"Line Items": [
{
"Description": "",
"HSN": "",
"Quantity": "",
"Unit Price": "",
"Tax Rate Line": "",
"Subtotal Line": ""
}
],
"Table Extract": [
{
"Description": "Wireframes for Landing Page",
"HSN": "",
"Quantity": "02",
"Unit Price": "500",
"Tax Rate Line": "",
"Subtotal Line": "1000"
},
{
"Description": "Logo design",
"HSN": "",
"Quantity": "01",
"Unit Price": "500",
"Tax Rate Line": "",
"Subtotal Line": "500"
}
]
}
}

6. Add a step

7. Select from next set of steps

8. Add more step, otherwise give a name to the zap and turn it on.

Congrats, you have setup Webhooks!