How to push order data to a Google Sheet via Pabbly using EComOrderJson global variable?
This is a quick guide on how to push the data of an order to the Google Sheet using an E-Com global variable #EComOrderJson#.
Step 1: Connect Pabbly to Botbaba using Webhook
Check out the article on connecting Pabbly through webhook from here.
Step 2: Open the last block in your block flow
Click on the edit button on the last block of the bot flow.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-105914.png)
Step 3: Click on HTTP-Request
You’ll find the HTTP-Request option at the top right of the page, click on the checkbox.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-110130.png)
![This image has an empty alt attribute; its file name is kk.png](https://kb.botbaba.io/wp-content/uploads/2021/02/kk.png)
Step 4: Paste the Webhook URL
On clicking on the HTTP-Request, a panel for making HTTP-request will appear.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-112723.png)
The HTTP-request panel provides sections for choosing HTTP method and Request Endpoint URL
- Click on GET and select the POST option.
- Paste the Web-hook from Pabbly to Request Endpoint URL. For the first time, clicking on the copy will make the webhook wait for the webhook response.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-105755.png)
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-121105.png)
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-121610.png)
Step 5: Add Header in the HTTP Request
Click on Header Button, which will open the Header panel. Click on “+ Add Headers”. This will open two input boxes in a row. In the first input, paste “content-type”, and in the second input box, paste “application/json”.
![This image has an empty alt attribute; its file name is image-17.png](https://kb.botbaba.io/wp-content/uploads/2021/03/image-17.png)
Step 6: Select Body as JSON and enter #EComOrderJson#
Click on the Body button, and place #EComOrderJson# in body panel.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-115821.png)
Step 9: Click on Save & Publish the Bot
Click on the Save Button of the Block, and publish the bot by clicking on Publish Button.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-120300-2.png)
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-120444-2.png)
Step 10: Go to Pabbly & Capture Webhook Response.
Run the bot till the block in which the webhook was implemented. This capture the response in the webhook of Pabbly.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-122925.png)
Step 11: Save Data to Google Sheet.
The process of pushing data from Pabbly to Google Sheets is explained below.
Step 11.1: Create a Google Sheet
Create a Google Sheet and Add Headers for each respective Field.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-130426.png)
Step 11.2: Create an Action Step in Pabbly
Add a new Action Step in Pabbly by clicking on the + (Add Action Step) button. It will open the add new action panel.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-133214-1.png)
Step 11.3: Add Google Sheet in Action Step
Click on the Google sheet icon.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-134025.png)
This will open the panel for Google Sheet action selection.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-161521.png)
Step 11.4: Choose action for Google Sheet
Click on Action Event’s selection Box, this opens the options panel for the sheets action.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-161521-1.png)
Choose the Add New Rows option from the options.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-163425.png)
It will select the Add New Row Action.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-163636.png)
Step 11.5: Integrate a Google account with Pabbly
Click on Connect Button, it will open Connect Google Sheets Account panel.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-164029-1024x491.png)
On this panel,
1. Select Add New Connection
2. Provide a name for the connection in New Connection Name’s input Box
3. Click on Connect With Google Sheets, and provide access to Google Sheets to Pabbly.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-164029-1-1024x491.png)
when the integration of Google Sheets is successful, it will return to the action panel.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220712-164727.png)
Step 11.6: Map webhook data with Google Sheets
Click on Name’s input field. This will provide you the option to search the data field, and get data from webhook.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220713-103057-1.png)
Click on webhook, this will open webhook fields, scroll down and select the Name field.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220713-124505.png)
Similarly, map the phone field as well. Alternatively, a search for the Phone field will provide the phone field.
![](https://kb.botbaba.io/wp-content/uploads/2022/07/EComOrderJson_20220713-124603.png)
Click on the Save button, this saves the flow. This also completes the process to push data to Google Sheet via Pabbly.