Skip to content

Approval documents

Turn an approved Lark Approval request into a finished document (a purchase order, a leave letter, a payment voucher) without anyone clicking Generate. When a request is approved, AutomaDoc fills your Word template with the request’s form data and sends the PDF to the person who submitted it.

This works on its own: you do not need a Lark Base or the Base extension.

  • You are a Lark app admin for AutomaDoc.
  • The approval form already exists in Lark Approval, with at least one request submitted in the last 30 days to test with.
  • You have a free template slot. An approval template counts toward the same template limit as your Base templates.

Go to company.automadoc.cc and sign in:

  • Open in Lark: opens the Lark app and signs you in automatically. Recommended.
  • Continue in browser: stay in your browser and sign in with your Lark account.

Then open Approvals in the sidebar, under Documents.

  1. Click Connect an approval. The first time you open the page, the form is already showing.
  2. Click Open Lark Approval admin. In the Lark Approval admin console, click the edit (pencil) icon on the form you want.
  3. Copy the address from your browser, paste it into the portal and click Connect.

AutomaDoc reads the form’s fields and builds a starter template for you, so you can test straight away.

The starter template contains every field of the form, a table for each detail list, any pictures, and the approval history, and it ends with an Approvals table (step, name, action, date and signature) ready to print as a signature block. Required amount fields and formula fields are printed with two decimals. To make it yours:

  1. Under Template file, click Download.
  2. Edit the file in Word: add your letterhead, reorder the fields, remove what you do not need.
  3. Click Upload a file.

Open Variables to see every placeholder the form offers. Click one to copy it, then paste it into your template.

Placeholder What it prints
{Field_Name} A form field. Spaces in the field name become underscores.
{#Details}…{/Details} A detail list: repeats a table row for each line, with the list’s own columns inside.
{DateInterval_Start}, {DateInterval_End}, {DateInterval_Duration} The two dates of a date range field, and its duration. Variables lists them under the labels you gave them in the form. {DateInterval} prints both dates on one line.
{Amount_Currency} The currency of an amount field: add _Currency to the field’s own placeholder. {Amount.Currency} and {Amount.Value} print the currency and the amount too, for templates written that way.
A picture with the Alt Text {Field_Name} An image field: its first picture, at the size of that placeholder picture. To print every picture attached to the request, loop over the field as the starter template does. See Looping over all images.
{Request_No} The request number.
{Approval_Name} The name of the approval form.
{Approval_Status} APPROVED or REJECTED.
{Applicant} The person who submitted the request.
{Submitted_At}, {Completed_At} When the request was submitted and when it was decided.
{Approvers} Everyone who approved, separated by commas.
{Final_Approver}, {Approved_At} Who gave the last approval, and when. Blank unless the request was approved.
{CC_List} Everyone the request was copied to, separated by commas.
{Approval_Link} A link that opens the request in Lark. Put a picture with the Alt Text {QR:Approval_Link} in the template to print it as a QR code.
{Reverted} Yes if Lark reports the request as revoked after it was approved, otherwise blank. Documents are sent when a request is approved or rejected, so a document already sent never shows it; it appears only in a document generated after the revocation, such as a test.
{#Approvals}…{/Approvals} One row per decision, with {Step}, {Name}, {Action}, {Time}, {Comment} and the picture {Signature}. See The approvals block.
{#Approval_History}…{/Approval_History} One row per event on the request, with {Step}, {Person}, {Action}, {Time} and {Comment}. Also {Target} (who a request was transferred or copied to, or the approver added or removed), {Received} and {Decided} (when the step reached that person and when they decided), and the picture {Signature} on approvals and rejections.
{#Comments}…{/Comments} One row per comment, with {Person}, {Comment}, {Time} and {Files} (the names of any files attached to it).

Amounts and quantities are real numbers, so the number, currency and sum filters work on them, for example {Details | sum:"Amount" | currency:"IDR":"id-ID":2} for a total under a detail list. Loops and conditions work exactly as in a Base template.

{#Approvals} repeats a table row for every approval or rejection that stands: one per person per step, the last they made, so an approval given again after a request was returned appears once. A typical signature block:

Step Name Action Date Signature
{#Approvals}{Step} {Name} {Action} {Time} a picture with the Alt Text {Signature} {/Approvals}

The Signature cell holds a picture whose Alt Text is {Signature} (right-click the picture → Edit Alt Text). Each row prints that person’s signature image, sized to the placeholder picture; for someone without one, the picture is left out.

To print one step’s signature on its own (under an “Approved by Finance” line, say), filter the loop with where and put the picture between the tags:

{#Approvals | where:"Step == 'Finance approval'"} a picture with the Alt Text {Signature} {/Approvals}

Use the step name exactly as it appears in your approval flow in Lark, or pick a person instead with where:"Name == 'Budi Santoso'". You can add {Name} and {Time} between the same tags. When no decision matches, nothing is printed. A step that several people decide (countersigning) prints one signature for each of them.

Lark does not share the signatures approvers draw in Lark Approval with apps, not even on a step set to require a handwritten signature. So your company uploads a signature image for each approver once, and every approval template prints it.

  1. On the approval template’s page, go to Signature images. It lists the approvers of the form’s recent requests, and everyone who already has an image. If any step of the form asks for a handwritten signature in Lark, the panel names it.
  2. Click Upload image next to a person and choose a PNG or JPEG of 1 MB or less. A signature on a transparent or white background prints best.
  3. Use Replace or Remove to change it later. Documents generated from then on use the new image; documents already sent are not changed.

A signature image belongs to your company, not to one template: the same image is printed on every form that person approves.

Under When and where:

  • Generate when the request is: Approved (the default), Rejected, or both.
  • Output Format: PDF, or the template’s own format: Word, Excel or PowerPoint (see Excel and PowerPoint templates).
  • Send the document to: the requester, as a message from the AutomaDoc bot. Use Also post to group to send a copy to a group chat, such as a finance archive. Only groups the AutomaDoc bot has been added to are listed, so add the bot to the group first. Choose at least one of the two: an approval with nobody to send to cannot go live.
  • File name: a filename pattern, for example {Approval_Name}-{Request_No}.
  • Time zone for dates: the time zone the dates in the document are printed in.

What people receive shows the message as the requester will see it. Click Save Settings.

Under Test, AutomaDoc lists the form’s ten most recent requests from the last 30 days. Click Generate test next to one, then Download the result and check it.

A test is never sent to anyone. Up to 20 tests a day are free; further tests that day count as one generation each. A free test has a large PREVIEW · AutomaDoc watermark across every page. The documents sent for approved requests do not.

Click Go live. From then on, every request that reaches a status you chose generates a document and sends it as configured. The page shows Live; click Pause to stop at any time.

A message from the AutomaDoc bot in Lark: a card saying the request was approved (or rejected), followed by the document. They do nothing to get it, and they can return to the message whenever they need the file again.

  • Documents lists the 20 most recent documents generated for this form, including any that failed. Download one, or click Regenerate and send to generate it again with the current template and resend it (useful after fixing a template). Regenerate and send is refused for a revoked request.
  • To send a document for a request that was approved before you went live, find it under Test and click Generate and send. Only the requests listed there can be sent this way.

Only a request that has already been approved (or rejected, if you chose that) can be sent, because the message tells the requester the outcome.

Editing the form in Lark does not stop your documents. AutomaDoc keeps generating with the current template file, and every placeholder in it keeps finding its field: a field you renamed in Lark still prints under its old placeholder. A field you deleted and created again is a new field to Lark, though: it prints blank until you click I have checked the template.

When a field is added, removed or changed to another type, AutomaDoc notices on the next document:

  • The admin who set the form up gets one message from the AutomaDoc bot listing what changed.
  • The template’s page shows the same list. Check that your file still fits, then click I have checked the template, or upload an updated file with Upload a file. Variables always lists the form as it is now, so a new field can be copied from there.

Requests submitted before a change get the file that was written for them. Each time you replace the template file, the previous one is kept (the last ten that produced a document), and a request whose fields only an earlier file knows (a field deleted and created again, for example) is generated from that file. Documents marks those with Earlier file (v1). A test always uses the current file.

The requester is never shown an error. The admin who set the form up gets a message from the AutomaDoc bot with the reason: the monthly allowance and any document packs are used up, the template is above your plan’s template limit, or the template file has an error. The failed attempt also appears under Documents: fix the cause, then click Regenerate and send on it.

“AutomaDoc cannot read Lark Approval yet”

Your Lark administrator has not approved AutomaDoc’s updated permissions. Ask them to approve the app’s permission update in the Lark Admin console, then try again.

“No requests in the last 30 days”

Submit a request on the form in Lark, then click Refresh under Test.

A group is missing from “Also post to group”

Add the AutomaDoc bot to the group in Lark, then reload the page.

  • Each request is counted once, however many times its document is sent. Tests are free up to 20 a day, and Regenerate and send is free for a request already counted. With a Business seat, approval documents come out of its 20,000 automated documents a year; otherwise they use the same monthly allowance as documents generated from a Base, then a document pack. See how approval documents are counted.
  • A form with a detail list produces one document per request, with every line in it.
  • Attachments are printed as their file names. To add the files themselves to a PDF, use {ATTACH:Field} (see Attachments inside the PDF). A picture taken in the Lark app can arrive without a name; it is then called “Picture 1”, “Picture 2” and so on.
  • If you also sync the approval to a Base, you can keep generating from the Base; the two do not interfere.