---
title: "Sending data from a webcaptioner.com channel webhook to Google Sheets with Google Apps Script "
author: "Martin Hawksey"
date: 2020-11-17T21:31:47+00:00
modified: 2020-11-17T21:33:51+00:00
canonical_url: https://pulse.appsscript.info/p/2020/11/sending-data-from-a-webcaptioner-com-channel-webhook-to-google-sheets-with-google-apps-script/
markdown_url: https://pulse.appsscript.info/p/2020/11/sending-data-from-a-webcaptioner-com-channel-webhook-to-google-sheets-with-google-apps-script.md
categories:
  - "Beginner"
  - "Sheets"
  - "Solutions"
tags:
  - "@schoraria911"
  - "script.gs"
featured_image: https://pulse.appsscript.info/files/2020/11/Web-Captioner.png
description: "Sourabh Choraria kindly helped me solve an issue I was having passing data from webcaptioner.com to Google Sheets. Click through to the source link for the full explanation from Sourabh, but in essence the problem was I was losing data because I wasn't using the LockService."
---

# Sending data from a webcaptioner.com channel webhook to Google Sheets with Google Apps Script 

![Sending data from a webcaptioner.com channel webhook to Google Sheets with Google Apps Script ](https://pulse.appsscript.info/files/2020/11/Web-Captioner.png)

> [https://script.gs/web-captioner-webhooks-and-google-apps-script/](https://script.gs/web-captioner-webhooks-and-google-apps-script/)push data from web captioner to google sheets via webhooks built using apps script.the problem – playing with webcaptioner.com which lets you specify a webhook url. i was experimenting with adding captions to a google doc in realtime but apps script couldn’t keep up dropping ~20% of the captions sent via the hook

Sourabh Choraria kindly helped me solve an issue I was having passing data from [webcaptioner.com**](http://webcaptioner.com) to Google Sheets. Click through to the source link for the full explanation from Sourabh, but in essence the problem was I was losing data because I wasn’t using the `LockService`.

In the meantime webcaptioner.com have also updated there channel webhooks so you can set a data chuck size so if you are looking to capture a transcript in Google Docs you can use the following published as a container bound web app:

```
// @OnlyCurrentDoc
function doPost(e) {
 const params = JSON.parse(e.postData.contents);
 DocumentApp.getActiveDocument()
 .getBody()
 .appendParagraph(Utilities.formatDate(new Date(), "GMT", "HH:mm:ss")+': ' + params.transcript);
}
```

Source: *[web captioner, webhooks and google apps script*](https://script.gs/web-captioner-webhooks-and-google-apps-script/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2020/11/sending-data-from-a-webcaptioner-com-channel-webhook-to-google-sheets-with-google-apps-script/](https://pulse.appsscript.info/p/2020/11/sending-data-from-a-webcaptioner-com-channel-webhook-to-google-sheets-with-google-apps-script/)*
