Skip to main content
POST
/
createDocument
Create Document from Google Sheets
curl --request POST \
  --url https://api.docsautomator.co/createDocument \
  --header 'Content-Type: application/json' \
  --data '
{
  "docId": "<string>",
  "rowNumber": 123,
  "async": true,
  "webhookParams": {},
  "docTemplateLink": "<string>"
}
'
When your automation’s data source is set to Google Sheets, you only need to pass the row number. All field mapping, line items, and output settings are pulled from the DocsAutomator app automatically.
For setup instructions on connecting Google Sheets to DocsAutomator, see the Google Sheets integration guide.

Endpoint

POST https://api.docsautomator.co/createDocument

Request Body

docId
string
required
The automation ID. Find it on the automation’s settings page or via GET /automations.
rowNumber
integer
required
The row number in the Google Sheet to generate a document from (e.g., 2 for the first data row, assuming row 1 is the header).
async
boolean
default:"false"
When true, returns immediately with a jobId (HTTP 202). Poll GET /job/{jobId} for the result.
webhookParams
object
Custom parameters passed through to webhook notifications as additionalParams.
Override the automation’s Google Doc template URL for this request only.

Example

curl -X POST https://api.docsautomator.co/createDocument \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "docId": "YOUR_AUTOMATION_ID",
    "rowNumber": 2
  }'

Response

{
  "message": "success",
  "pdfUrl": "https://files.docsautomator.co/..."
}
Additional fields like googleDocUrl, savePdfGoogleDriveUrl, and e-signature fields are included depending on your automation’s configuration. See the API data source page for the full list.
Last modified on April 7, 2026