Skip to main content الرئيسية المنشئون jeremylongshore tons-of-skills-marketplace documenso-core-workflow-a
documenso-core-workflow-a Implement Documenso document creation and recipient management workflows.
Use when creating documents, managing recipients, adding signature fields,
or building signing workflows with Documenso.
Trigger with phrases like "documenso document", "create document",
"add recipient", "documenso signer", "signature field".
الانتقال إلى التثبيت سوق المهارات اكتشف واستكشف مهارات الذكاء الاصطناعي التي بناها المجتمع.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
نسخ Promptعرض تفاصيل Prompt يتجاوز الأمر المباشر Prompt المخصّص للمراجعة. افحص المصدر قبل تشغيله.
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace --skill documenso-core-workflow-aيبقى الأمر في سطر واحد. مرّر أفقيًا لمراجعته كاملًا قبل النسخ.
تفضّل نسخة محلية؟ نزّل الملفات المتاحة حاليًا لدى SkillsMP.
تحميل Zip جاري التحميل... المزيد من هذا المستودع langchain-deploy-integration Deploy a LangChain 1.0 / LangGraph 1.0 app to Cloud Run, Vercel, or LangServe correctly — with timeouts sized for chain length, cold-start mitigation, SSE anti-buffering headers, and Secret Manager over .env. Use when prepping a first production deploy, debugging a stream that hangs behind a proxy, or diagnosing p99 latency spikes. Trigger with "langchain deploy", "langchain cloud run", "langchain vercel python", "langchain langserve", or "langchain docker".
langchain-langgraph-agents Build a correct LangGraph 1.0 ReAct agent with create_react_agent — typed tools, error propagation, recursion caps, and stop conditions that actually stop. Use when writing a first tool-calling agent, migrating from AgentExecutor or initialize_agent, or diagnosing an agent that loops on vague prompts. Trigger with "langgraph agent", "create_react_agent", "langgraph tool calling", "AgentExecutor migration", or "agent loop cost".
langchain-langgraph-human-in-loop Build LangGraph 1.0 human-in-the-loop approval flows with interrupt_before /
interrupt_after and Command(resume=...) — JSON-serializable state, clean
resume semantics, and UI wiring for approval decisions. Use when adding an
approval gate before an expensive tool call, wiring a Slack/web UI for agent
approvals, or debugging a graph that crashes on interrupt.
Trigger with "langgraph human in loop", "langgraph interrupt_before",
"langgraph approval flow", "Command resume", "langgraph HITL".
name documenso-core-workflow-a description Implement Documenso document creation and recipient management workflows.
Use when creating documents, managing recipients, adding signature fields,
or building signing workflows with Documenso.
Trigger with phrases like "documenso document", "create document",
"add recipient", "documenso signer", "signature field".
allowed-tools Read, Write, Edit version 1.13.0 license MIT author Jeremy Longshore <jeremy@intentsolutions.io> tags ["saas","documenso","workflow"] compatibility Designed for Claude Code
Documenso Core Workflow A: Document Creation & Recipients
Overview
Complete workflow for creating documents, managing recipients with different roles, positioning fields, and controlling signing order. Covers both the SDK and v1 REST API for document-centric operations.
Prerequisites
Completed documenso-install-auth setup
Understanding of documenso-sdk-patterns
PDF file ready for signing
Instructions
Step 1: Create a Document with the SDK
import { Documenso } from "@documenso/sdk-typescript" ;
import { readFileSync } from "fs" ;
const client = new Documenso ({ apiKey : process.env .DOCUMENSO_API_KEY ! });
const doc = await client.documents .createV0 ({
title : "Service Agreement — Q1 2026" ,
});
const pdf = readFileSync ("./contracts/service-agreement.pdf" );
await client.documents .setFileV0 (doc.documentId , {
file : new Blob ([pdf], { type : "application/pdf" }),
});
Step 2: Recipient Roles
Documenso supports these recipient roles:
Must complete all assigned fields to finish
VIEWERReceives a copy but takes no action
APPROVERMust approve before signers can proceed
CCReceives a completed copy after all signatures
const signer = await client.documentsRecipients .createV0 (doc.documentId , {
email : "ceo@acme.com" ,
name : "Alice CEO" ,
role : "SIGNER" ,
});
const approver = await client.documentsRecipients .createV0 (doc.documentId , {
email : "legal@acme.com" ,
name : "Legal Team" ,
role : "APPROVER" ,
});
const cc = await client.documentsRecipients .createV0 (doc.documentId , {
email : "records@acme.com" ,
name : "Records" ,
role : "CC" ,
});
Step 3: Signing Order Control the sequence in which recipients act. Lower numbers go first.
await client.documentsRecipients .createV0 (doc.documentId , {
email : "legal@acme.com" ,
name : "Legal" ,
role : "APPROVER" ,
signingOrder : 1 ,
});
await client.documentsRecipients .createV0 (doc.documentId , {
email : "ceo@acme.com" ,
name : "CEO" ,
role : "SIGNER" ,
signingOrder : 2 ,
});
Step 4: Add Fields to Document Field coordinates use percentage-based positioning (0-100 for both X and Y axes). The origin is the top-left corner of the page.
await client.documentsFields .createV0 (doc.documentId , {
recipientId : signer.recipientId ,
type : "SIGNATURE" ,
pageNumber : 1 ,
pageX : 10 ,
pageY : 85 ,
pageWidth : 30 ,
pageHeight : 5 ,
});
await client.documentsFields .createV0 (doc.documentId , {
recipientId : signer.recipientId ,
type : "DATE" ,
pageNumber : 1 ,
pageX : 60 ,
pageY : 85 ,
pageWidth : 20 ,
pageHeight : 3 ,
});
await client.documentsFields .createV0 (doc.documentId , {
recipientId : signer.recipientId ,
type : "NAME" ,
pageNumber : 1 ,
pageX : 10 ,
pageY : 78 ,
pageWidth : 30 ,
pageHeight : 3 ,
});
await client.documentsFields .createV0 (doc.documentId , {
recipientId : signer.recipientId ,
type : "TEXT" ,
pageNumber : 1 ,
pageX : 60 ,
pageY : 78 ,
pageWidth : 30 ,
pageHeight : 3 ,
});
Step 5: Multi-Page Document with Multiple Signers async function createMultiSignerContract (
pdfPath : string ,
signers : Array <{ email: string ; name: string ; signPage: number }>
) {
const client = new Documenso ({ apiKey : process.env .DOCUMENSO_API_KEY ! });
const doc = await client.documents .createV0 ({ title : "Multi-Party Agreement" });
const pdf = readFileSync (pdfPath);
await client.documents .setFileV0 (doc.documentId , {
file : new Blob ([pdf], { type : "application/pdf" }),
});
for (let i = 0 ; i < signers.length ; i++) {
const s = signers[i];
const recip = await client.documentsRecipients .createV0 (doc.documentId , {
email : s.email ,
name : s.name ,
role : "SIGNER" ,
signingOrder : i + 1 ,
});
await client.documentsFields .createV0 (doc.documentId , {
recipientId : recip.recipientId ,
type : "SIGNATURE" ,
pageNumber : s.signPage ,
pageX : 10 , pageY : 80 , pageWidth : 30 , pageHeight : 5 ,
});
await client.documentsFields .createV0 (doc.documentId , {
recipientId : recip.recipientId ,
type : "DATE" ,
pageNumber : s.signPage ,
pageX : 60 , pageY : 80 , pageWidth : 20 , pageHeight : 3 ,
});
}
await client.documents .sendV0 (doc.documentId );
return doc.documentId ;
}
Step 6: Document Metadata and Settings
const res = await fetch ("https://app.documenso.com/api/v1/documents" , {
method : "POST" ,
headers : {
Authorization : `Bearer ${process.env.DOCUMENSO_API_KEY} ` ,
},
body : (() => {
const form = new FormData ();
form.append ("title" , "NDA — Confidential" );
form.append ("file" , new Blob ([pdf], { type : "application/pdf" }));
return form;
})(),
});
const document = await res.json ();
Step 7: Query and Filter Documents
const { documents } = await client.documents .findV0 ({
page : 1 ,
perPage : 20 ,
orderByColumn : "createdAt" ,
orderByDirection : "desc" ,
});
const detail = await client.documents .getV0 (documentId);
console .log (`Status: ${detail.status} ` );
console .log (`Recipients: ${detail.recipients.length} ` );
console .log (`Fields: ${detail.fields.length} ` );
Document Status Flow DRAFT ──send()──→ PENDING ──all sign──→ COMPLETED
│
├──reject()──→ REJECTED
└──cancel()──→ CANCELLED
Only DRAFT documents can be modified (add recipients, fields, change PDF).
Error Handling Error HTTP Cause Solution Document not found 404 Invalid document ID Verify ID with findV0() Recipient exists 400 Duplicate email on same doc Update existing with updateV0() Invalid field position 400 pageX/pageY > 100 or < 0 Use percentage values 0-100 Cannot modify sent doc 400 Document status is PENDING Create new document or cancel first File too large 413 PDF exceeds plan limit Compress PDF (plan limits vary)
Resources
Next Steps For template-based workflows and direct signing links, see documenso-core-workflow-b.