@assinafy/piece-assinafy 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +262 -58
- package/README.pt-BR.md +286 -82
- package/package.json +1 -1
- package/src/index.js +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- OAuth: the connection dialog and READMEs describe Assinafy's sliding refresh (each renewal keeps a connection valid for another 30 days; it expires only after 30 days without use) instead of a monthly reconnect.
|
|
6
|
+
- OAuth: the authorization request names the Assinafy API as the token's resource (`resource=https://api.assinafy.com.br`).
|
|
7
|
+
- Redirects to an address without HTTPS are no longer followed.
|
|
8
|
+
- Connection errors include their reason, for example a TLS handshake failure, and an HTTP 403 error lists its possible causes.
|
|
9
|
+
|
|
3
10
|
## 0.1.1
|
|
4
11
|
|
|
5
12
|
- The package's homepage, repository and issue links point to https://github.com/assinafy/activepieces.
|
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ Send documents for legally valid electronic signature with [Assinafy](https://ww
|
|
|
6
6
|
|
|
7
7
|
- Package: `@assinafy/piece-assinafy`
|
|
8
8
|
- Requires Activepieces 0.88.2 or later
|
|
9
|
+
- Assinafy accepts only HTTPS with TLS 1.2 or higher, which the Node.js runtime of Activepieces uses by default
|
|
9
10
|
- API reference: <https://api.assinafy.com.br/v1/docs>
|
|
10
11
|
|
|
11
12
|
## Install
|
|
@@ -31,7 +32,7 @@ The piece offers two connection types. Use **API Key** to automate your own work
|
|
|
31
32
|
- **Environment**: **Production**, or **Sandbox** for keys created in the sandbox.
|
|
32
33
|
- **Workspace ID**: only needed when your user belongs to more than one workspace. Copy it from **My Account → Workspaces**.
|
|
33
34
|
|
|
34
|
-
The connection is checked when you save it, and it is labelled with the workspace name.
|
|
35
|
+
The connection is checked against `GET /v1/accounts` when you save it, and it is labelled with the workspace name.
|
|
35
36
|
|
|
36
37
|
### Assinafy Account (OAuth)
|
|
37
38
|
|
|
@@ -43,78 +44,252 @@ An owner of the Assinafy workspace registers an OAuth application once, under **
|
|
|
43
44
|
| Type | Confidential |
|
|
44
45
|
| Permissions | `documents:read`, `documents:write`, `templates:read`, `templates:write`, `account:read`, `webhooks:write`, `offline_access` |
|
|
45
46
|
|
|
46
|
-
Enter the application's Client ID and Client Secret in Activepieces, then sign in and choose the workspace to connect. Each OAuth connection works with exactly one workspace. OAuth always uses the production environment; use an API key for the sandbox.
|
|
47
|
+
Enter the application's Client ID and Client Secret in Activepieces, then sign in and choose the workspace to connect. Save the connection within a minute of approving: the approval code expires after 60 seconds. Each OAuth connection works with exactly one workspace. OAuth always uses the production environment; use an API key for the sandbox.
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
Activepieces renews the access automatically when flows use the connection, and each renewal keeps the connection valid for another 30 days. A connection only expires after 30 days without use, for example when its flows are off or run less than once every 30 days; reconnect it then. Deleting the connection in Activepieces does not revoke its access in Assinafy; revoke it under **Connected apps** in your Assinafy profile.
|
|
49
50
|
|
|
50
|
-
##
|
|
51
|
+
## The document flow
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
Every Assinafy flow moves a document through the same stages. The piece has one action per stage:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Upload ──► Send ──► Track ──► Sign ──► Collect
|
|
57
|
+
Document Request Get/Find (in Download
|
|
58
|
+
Document Signatures Documents Assinafy) Document
|
|
59
|
+
│ │ ▲ │ │
|
|
60
|
+
└─ Create from Template ┘ └── Store ──┘
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
1. **Upload**: [Upload Document](#upload-document) sends a PDF to `POST /v1/accounts/{accountId}/documents`, or [Create Document from Template](#create-document-from-template) generates the document from a ready template and sends it in one step.
|
|
64
|
+
2. **Send**: [Request Signatures](#request-signatures) creates the signature request with `POST /v1/documents/{documentId}/assignments`. Assinafy then emails or messages each signer.
|
|
65
|
+
3. **Track**: [Get Document](#get-document) and [Find Documents](#find-documents) read the status and signing progress; [Update Signing Deadline](#update-signing-deadline) and [Resend Signature Request](#resend-signature-request) nudge an in-flight request.
|
|
66
|
+
4. **Sign**: signers open the signing link and sign in Assinafy, with a one-time code by email or WhatsApp or an ICP-Brasil A1/A3 certificate.
|
|
67
|
+
5. **Collect**: [Download Document](#download-document) saves the signed PDF with its signature certificate so later steps can store it.
|
|
68
|
+
|
|
69
|
+
Triggers fire at the moments that matter: **Document Signed** when the signed PDF is ready, or **New Event (Instant)** for each signing event as it happens.
|
|
70
|
+
|
|
71
|
+
### Flow recipe: send a PDF for signature
|
|
53
72
|
|
|
54
73
|
1. Any trigger that provides a file (a form, an email attachment, a CRM record).
|
|
55
74
|
2. **Upload Document** with that file.
|
|
56
75
|
3. **Request Signatures** on the uploaded document, with each signer's name and email or WhatsApp number.
|
|
76
|
+
4. **Document Signed** trigger (in another flow) or a delay loop with **Get Document** until `status` is `certificated`.
|
|
77
|
+
5. **Download Document** with **File** set to *Signed PDF*, then upload the file to your storage (Google Drive, SharePoint, S3…).
|
|
57
78
|
|
|
58
|
-
|
|
79
|
+
### Flow recipe: generate a contract from a template
|
|
59
80
|
|
|
60
|
-
1.
|
|
61
|
-
2. **
|
|
62
|
-
3. Upload the file to your storage (Google Drive, SharePoint, S3…).
|
|
81
|
+
1. Any trigger with the customer's details.
|
|
82
|
+
2. **Create Document from Template**: pick the template, fill the signer for each role and the template fields. The document is created and sent in one step.
|
|
63
83
|
|
|
64
|
-
|
|
84
|
+
### Flow recipe: react the instant something happens
|
|
65
85
|
|
|
66
|
-
1.
|
|
67
|
-
2.
|
|
86
|
+
1. **New Event (Instant)** with the events you care about, for example *Document signed by all signers* and *Signer declined the document*.
|
|
87
|
+
2. A Router step that branches on `event`: store the signed PDF on `document_ready`, notify the owner on `signer_rejected_document`.
|
|
68
88
|
|
|
69
89
|
## Actions
|
|
70
90
|
|
|
71
|
-
|
|
72
|
-
|---|---|---|---|
|
|
73
|
-
| Upload Document | Uploads a PDF (up to 25 MB) | File, optional name | Document |
|
|
74
|
-
| Request Signatures | Sends a document for signature; waits up to 30 seconds while the file of a fresh upload is still being received | Document, signers (name, email or WhatsApp, verification, CPF/CNPJ, signing order), message, deadline, copy recipients | Signature request |
|
|
75
|
-
| Create Document from Template | Creates a document from a ready template and sends it | Template, a signer per role, template fields, name, message, deadline, tags | Document |
|
|
76
|
-
| Get Document | Reads a document and its signing progress | Document | Document |
|
|
77
|
-
| Find Documents | Searches documents, newest update first | Search text, status, maximum results (1–100) | List of documents |
|
|
78
|
-
| Download Document | Saves a document file for later steps; waits up to a minute while certification finishes | Document, file (signed PDF, original, certificate page, ZIP bundle, PAdES), file name | File |
|
|
79
|
-
| Resend Signature Request | Sends the invitation to a signer again | Document, signer | Send result |
|
|
80
|
-
| Update Signing Deadline | Sets a new deadline on the signature request | Document, new deadline | Signature request |
|
|
81
|
-
| Delete Document | Permanently deletes a document that is not signed | Document | Confirmation |
|
|
82
|
-
| Find Signers | Searches saved signers | Search text, maximum results (1–100) | List of signers |
|
|
83
|
-
| Create Signer | Saves a signer | Full name, email, WhatsApp, CPF/CNPJ | Signer |
|
|
84
|
-
| Update Signer | Changes a saved signer | Signer, fields to change | Signer |
|
|
85
|
-
| Custom API Call | Calls any endpoint of the Assinafy API with the connection's credentials, which are sent only to the connection's Assinafy address (so **Follow redirects** must stay off) | Method, URL, headers, query, body | Raw API response |
|
|
86
|
-
|
|
87
|
-
Every document, signer and template input is a dropdown, searchable except for the signer in **Resend Signature Request**, which lists the signers of the chosen document. You can also map an ID from a previous step.
|
|
88
|
-
|
|
89
|
-
### Signers
|
|
91
|
+
Each action below lists the Assinafy API endpoint it calls and an example of the data it returns. All outputs use flat fields, except `signers`, which lists one record per signer so flows can loop over them. See [Output fields](#output-fields) for the full field list.
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
### Upload Document
|
|
92
94
|
|
|
93
|
-
|
|
94
|
-
- If nobody matches, a signer is created, which requires a full name.
|
|
95
|
-
- A missing WhatsApp number is added to an existing signer. A WhatsApp number that differs from the saved one stops the step with an error instead of using the saved value.
|
|
96
|
-
- A CPF/CNPJ is saved only when the signer is created. Assinafy does not show saved CPFs, so the step cannot compare them and never changes the CPF of an existing signer.
|
|
97
|
-
- Change saved details with **Update Signer**; changing a channel invalidates invitations that were already sent.
|
|
98
|
-
- Every signer and copy recipient row is checked, and every one of them is looked up, before any signer is created or changed: a contact for the chosen channel, a valid CPF or CNPJ (including its check digits), no repeated email or WhatsApp number, no person reached twice through different details, and the signing order rules below.
|
|
95
|
+
Uploads a PDF (up to 25 MB) so you can request signatures on it. Each call creates a new document, so retries create duplicates.
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
- Endpoint: `POST /v1/accounts/{accountId}/documents` (multipart file upload)
|
|
98
|
+
- Inputs: **File** (required), **Document Name** (optional, defaults to the file name)
|
|
101
99
|
|
|
102
|
-
|
|
103
|
-
|---|---|---|
|
|
104
|
-
| Email code (default) | Email | Free |
|
|
105
|
-
| WhatsApp code | WhatsApp | 0.45 credit (paid plans) |
|
|
106
|
-
| ICP-Brasil digital certificate | Email | 2 credits |
|
|
107
|
-
| ICP-Brasil digital certificate | WhatsApp | 2.45 credits |
|
|
100
|
+
Returns the document, for example:
|
|
108
101
|
|
|
109
|
-
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"id": "615601fab04c0a3147bb1246",
|
|
105
|
+
"name": "Service agreement.pdf",
|
|
106
|
+
"status": "uploading",
|
|
107
|
+
"status_label": "Uploading",
|
|
108
|
+
"is_closed": false,
|
|
109
|
+
"account_id": "d199996981dbd199996981db",
|
|
110
|
+
"page_count": null,
|
|
111
|
+
"available_files": null,
|
|
112
|
+
"created_at": "2026-09-01T12:00:00.000Z",
|
|
113
|
+
"updated_at": "2026-09-01T12:00:00.000Z"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
110
116
|
|
|
111
|
-
|
|
117
|
+
### Request Signatures
|
|
118
|
+
|
|
119
|
+
Sends a document to one or more people to sign. Existing signers are matched by email (or by name and WhatsApp number); missing signers are created, which requires a full name. Assinafy notifies signers right away, or by signing order when steps are set. Each call creates a new signature request, so do not retry blindly.
|
|
120
|
+
|
|
121
|
+
- Endpoint: `POST /v1/documents/{documentId}/assignments`
|
|
122
|
+
- Inputs: **Document** (required), **Signers** (required), **Message**, **Deadline**, **Send Copy To**
|
|
123
|
+
|
|
124
|
+
Example request body sent to Assinafy:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"method": "virtual",
|
|
129
|
+
"signers": [
|
|
130
|
+
{
|
|
131
|
+
"id": "62d6ee35c7741ca4006b9e11",
|
|
132
|
+
"verification_method": "Email",
|
|
133
|
+
"notification_methods": ["Email"],
|
|
134
|
+
"step": 1
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"message": "Please sign the service agreement by Friday.",
|
|
138
|
+
"expires_at": "2026-12-31T21:00:00.000Z",
|
|
139
|
+
"copy_receivers": ["62d6ee35c7741ca4006b9e12"]
|
|
140
|
+
}
|
|
141
|
+
```
|
|
112
142
|
|
|
113
|
-
|
|
143
|
+
Returns the signature request:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"document_id": "615601fab04c0a3147bb1246",
|
|
148
|
+
"message": "Please sign the service agreement by Friday.",
|
|
149
|
+
"sender_email": "sender@example.com",
|
|
150
|
+
"assignment_id": "615606ef81d199996981dbce",
|
|
151
|
+
"signature_method": "virtual",
|
|
152
|
+
"expires_at": "2026-12-31T21:00:00.000Z",
|
|
153
|
+
"signer_count": 1,
|
|
154
|
+
"signed_count": 0,
|
|
155
|
+
"signer_emails": "maria@example.com",
|
|
156
|
+
"signers": [
|
|
157
|
+
{
|
|
158
|
+
"id": "62d6ee35c7741ca4006b9e11",
|
|
159
|
+
"full_name": "Maria Silva",
|
|
160
|
+
"email": "maria@example.com",
|
|
161
|
+
"whatsapp_phone_number": null,
|
|
162
|
+
"step": 1,
|
|
163
|
+
"verification_method": "Email",
|
|
164
|
+
"notification_method": "Email",
|
|
165
|
+
"signed": false,
|
|
166
|
+
"signing_url": "https://api.assinafy.com.br/v1/sign/615601fab04c0a3147bb1246?email=maria@example.com"
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
```
|
|
114
171
|
|
|
115
|
-
|
|
172
|
+
A fresh upload can still be receiving its file; the step waits up to 30 seconds for processing before sending. Copy recipients may not be available on every plan: when Assinafy does not keep a requested copy recipient, the step fails after sending and reports the signature request ID, so you do not invite the signers twice.
|
|
173
|
+
|
|
174
|
+
### Create Document from Template
|
|
175
|
+
|
|
176
|
+
Creates a document from a ready template and sends it for signature in one step. Each template signer role gets its own email, WhatsApp number, full name, CPF/CNPJ, verification and signing order inputs; editor roles are not signers, and their fields appear under **Template Fields** to pre-fill the document. Each call creates and sends a new document, so do not retry blindly.
|
|
177
|
+
|
|
178
|
+
- Endpoint: `POST /v1/accounts/{accountId}/templates/{templateId}/documents`
|
|
179
|
+
- Inputs: **Template** (required), **Signers** (one entry per template role, required), **Template Fields**, **Document Name**, **Message**, **Deadline**, **Tags**
|
|
180
|
+
|
|
181
|
+
Returns the document (same shape as **Upload Document**) with `template_id` set.
|
|
182
|
+
|
|
183
|
+
### Get Document
|
|
184
|
+
|
|
185
|
+
Gets one document with its status, signers and signing progress.
|
|
186
|
+
|
|
187
|
+
- Endpoint: `GET /v1/documents/{documentId}`
|
|
188
|
+
- Inputs: **Document** (required)
|
|
189
|
+
|
|
190
|
+
Returns the document shape shown in [Request Signatures](#request-signatures).
|
|
191
|
+
|
|
192
|
+
### Find Documents
|
|
193
|
+
|
|
194
|
+
Finds documents by name, signer or status, most recently updated first. Returns an empty list when nothing matches.
|
|
195
|
+
|
|
196
|
+
- Endpoint: `GET /v1/accounts/{accountId}/documents` with `search`, `status` and `sort=-updated_at`
|
|
197
|
+
- Inputs: **Search**, **Status**, **Maximum Results** (1–100, default 25)
|
|
198
|
+
|
|
199
|
+
Returns a list of documents.
|
|
200
|
+
|
|
201
|
+
### Download Document
|
|
202
|
+
|
|
203
|
+
Downloads a file of a document as a file for later steps. The signed PDF exists only after every signer has signed; while certification is still running the step waits up to a minute.
|
|
204
|
+
|
|
205
|
+
- Endpoint: `GET /v1/documents/{documentId}/download/{artifactName}`
|
|
206
|
+
- Inputs: **Document** (required), **File** (required: signed PDF, original, certificate page, ZIP bundle or PAdES), **File Name**
|
|
207
|
+
|
|
208
|
+
Returns:
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"file": "https://files.example.com/service-agreement-certificated.pdf",
|
|
213
|
+
"file_name": "service-agreement-certificated.pdf",
|
|
214
|
+
"file_type": "certificated",
|
|
215
|
+
"size_bytes": 48213,
|
|
216
|
+
"document_id": "615601fab04c0a3147bb1246",
|
|
217
|
+
"document_name": "Service agreement.pdf",
|
|
218
|
+
"document_status": "certificated"
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Resend Signature Request
|
|
223
|
+
|
|
224
|
+
Sends the signing invitation to one signer again, using the signer's original channel. WhatsApp resends consume credits. Each call sends another notification.
|
|
225
|
+
|
|
226
|
+
- Endpoint: `PUT /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/resend`
|
|
227
|
+
- Inputs: **Document** (required), **Signer** (required, the signers of the chosen document)
|
|
228
|
+
|
|
229
|
+
Returns `{ "sent": true, "document_id": "…", "assignment_id": "…", "signer_id": "…" }`.
|
|
230
|
+
|
|
231
|
+
### Update Signing Deadline
|
|
116
232
|
|
|
117
|
-
|
|
233
|
+
Sets a new deadline on the signature request of a document. The new deadline must be at least one hour in the future. Setting the same deadline again is safe.
|
|
234
|
+
|
|
235
|
+
- Endpoint: `PUT /v1/documents/{documentId}/assignments/{assignmentId}/reset-expiration`
|
|
236
|
+
- Inputs: **Document** (required), **New Deadline** (required)
|
|
237
|
+
|
|
238
|
+
Returns the signature request shape shown in [Request Signatures](#request-signatures).
|
|
239
|
+
|
|
240
|
+
### Delete Document
|
|
241
|
+
|
|
242
|
+
Permanently deletes a document. Only documents that are ready to send, waiting for signatures, declined, cancelled, expired or failed can be deleted; signed documents are kept. This cannot be undone, and a retry fails because the document is gone.
|
|
243
|
+
|
|
244
|
+
- Endpoint: `DELETE /v1/documents/{documentId}`
|
|
245
|
+
- Inputs: **Document** (required)
|
|
246
|
+
|
|
247
|
+
Returns `{ "deleted": true, "document_id": "…" }`.
|
|
248
|
+
|
|
249
|
+
### Find Signers
|
|
250
|
+
|
|
251
|
+
Finds the signers saved in the workspace by partial name or email. Returns an empty list when nothing matches.
|
|
252
|
+
|
|
253
|
+
- Endpoint: `GET /v1/accounts/{accountId}/signers` with `search`
|
|
254
|
+
- Inputs: **Search** (required), **Maximum Results** (1–100, default 25)
|
|
255
|
+
|
|
256
|
+
Returns a list of signers:
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
[
|
|
260
|
+
{
|
|
261
|
+
"id": "62d6ee35c7741ca4006b9e11",
|
|
262
|
+
"full_name": "Maria Silva",
|
|
263
|
+
"email": "maria@example.com",
|
|
264
|
+
"whatsapp_phone_number": null,
|
|
265
|
+
"has_accepted_terms": false
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Create Signer
|
|
271
|
+
|
|
272
|
+
Saves a new signer in the workspace. **Request Signatures** creates missing signers on its own, so use this only to register people ahead of time. It fails when a signer with the same email already exists.
|
|
273
|
+
|
|
274
|
+
- Endpoint: `POST /v1/accounts/{accountId}/signers`, then `PUT /v1/accounts/{accountId}/signers/{signerId}` when a CPF/CNPJ is given (the create endpoint does not accept it)
|
|
275
|
+
- Inputs: **Full Name** (required), **Email**, **WhatsApp Number**, **CPF or CNPJ**
|
|
276
|
+
|
|
277
|
+
Returns the signer shape shown in [Find Signers](#find-signers).
|
|
278
|
+
|
|
279
|
+
### Update Signer
|
|
280
|
+
|
|
281
|
+
Changes the name, contact details or CPF/CNPJ of a saved signer; only the fields you fill in change. Email and WhatsApp cannot change while the signer has verified that channel on a document still being signed, and changing an unverified channel invalidates invitations already sent.
|
|
282
|
+
|
|
283
|
+
- Endpoint: `PUT /v1/accounts/{accountId}/signers/{signerId}`
|
|
284
|
+
- Inputs: **Signer** (required), **Full Name**, **Email**, **WhatsApp Number**, **CPF or CNPJ**
|
|
285
|
+
|
|
286
|
+
Returns the signer shape shown in [Find Signers](#find-signers).
|
|
287
|
+
|
|
288
|
+
### Custom API Call
|
|
289
|
+
|
|
290
|
+
Calls any endpoint of the Assinafy API with the connection's credentials, for endpoints the piece does not cover. The credentials are sent only to the connection's Assinafy address, so **Follow redirects** must stay off. Workspace-scoped paths such as `/accounts/{accountId}/signers` need your workspace ID, which the piece resolves for you on its own actions.
|
|
291
|
+
|
|
292
|
+
Every document, signer and template input in the actions above is a dropdown, searchable except for the signer in **Resend Signature Request**, which lists the signers of the chosen document. You can also map an ID from a previous step.
|
|
118
293
|
|
|
119
294
|
## Triggers
|
|
120
295
|
|
|
@@ -123,7 +298,7 @@ In **Create Document from Template**, each signer role of the template has its o
|
|
|
123
298
|
| Document Signed | Every signer has signed and the signed PDF is ready, for signings completed after the flow was turned on | Checked every few minutes. Any number of flows can use it. |
|
|
124
299
|
| New Event (Instant) | The selected Assinafy events happen: document signed by all, signer signed, signer declined, document cancelled, and more | Instant, through the workspace webhook |
|
|
125
300
|
|
|
126
|
-
**New Event (Instant)** uses the workspace webhook, and Assinafy delivers each workspace's events to a single address:
|
|
301
|
+
**New Event (Instant)** uses the workspace webhook (`GET/PUT /v1/accounts/{accountId}/webhooks/subscriptions`), and Assinafy delivers each workspace's events to a single address:
|
|
127
302
|
|
|
128
303
|
- Use it in only one active flow per workspace; add a Router step to handle several event types.
|
|
129
304
|
- If the workspace already delivers events to another system, the flow does not start unless **Replace Existing Webhook** is turned on.
|
|
@@ -135,13 +310,39 @@ In **Create Document from Template**, each signer role of the template has its o
|
|
|
135
310
|
|
|
136
311
|
The document is signed as soon as the last signer signs, but the signed PDF is available only after certification finishes. **Document Signed** fires after certification; **Download Document** also waits up to a minute while certification is still running.
|
|
137
312
|
|
|
138
|
-
**Document Signed** fires once per document whose signing completed after the flow was turned on. It reads each new signed document's activity log for the completion time, so documents signed earlier and edited later (for example tagged) do not fire it. Each check looks back ten minutes to tolerate clock differences. After downtime it catches up on the backlog over several checks, without skipping or repeating any.
|
|
313
|
+
**Document Signed** fires once per document whose signing completed after the flow was turned on. It reads each new signed document's activity log (`GET /v1/documents/{documentId}/activities`) for the completion time, so documents signed earlier and edited later (for example tagged) do not fire it. Each check looks back ten minutes to tolerate clock differences. After downtime it catches up on the backlog over several checks, without skipping or repeating any.
|
|
139
314
|
|
|
140
|
-
##
|
|
315
|
+
## Signers
|
|
316
|
+
|
|
317
|
+
**Request Signatures** and **Create Document from Template** take contact details, not Assinafy signer IDs:
|
|
318
|
+
|
|
319
|
+
- A signer is matched by email, or by name and WhatsApp number when there is no email, so give the full name of a signer who has only a WhatsApp number. WhatsApp numbers match regardless of formatting, and a number without the country code matches the saved international number.
|
|
320
|
+
- If nobody matches, a signer is created, which requires a full name.
|
|
321
|
+
- A missing WhatsApp number is added to an existing signer. A WhatsApp number that differs from the saved one stops the step with an error instead of using the saved value.
|
|
322
|
+
- A CPF/CNPJ is saved only when the signer is created. Assinafy does not show saved CPFs, so the step never changes the CPF of an existing signer; use **Update Signer** for that.
|
|
323
|
+
- Change saved details with **Update Signer**; changing a channel invalidates invitations that were already sent.
|
|
324
|
+
- Every signer and copy recipient row is checked, and every one of them is looked up, before any signer is created or changed: a contact for the chosen channel, a valid CPF or CNPJ (including its check digits), no repeated email or WhatsApp number, no person reached twice through different details, and the signing order rules below.
|
|
141
325
|
|
|
142
|
-
|
|
326
|
+
## Verification and costs
|
|
143
327
|
|
|
144
|
-
|
|
328
|
+
Signers prove their identity while signing with one of four methods; A1 and A3 ICP-Brasil certificates both use the digital certificate method:
|
|
329
|
+
|
|
330
|
+
| Verification | Invitation | Cost per signer |
|
|
331
|
+
|---|---|---|
|
|
332
|
+
| Email code (default) | Email | Free |
|
|
333
|
+
| WhatsApp code | WhatsApp | 0.45 credit (paid plans) |
|
|
334
|
+
| ICP-Brasil digital certificate (A1 or A3) | Email | 2 credits |
|
|
335
|
+
| ICP-Brasil digital certificate (A1 or A3) | WhatsApp | 2.45 credits |
|
|
336
|
+
|
|
337
|
+
When **Verification** is empty, it is email, or WhatsApp when the signer has only a WhatsApp number. Digital certificate signing needs the Digital Certificate feature on the Assinafy plan, the signer's CPF or CNPJ saved in Assinafy (given in the step when the signer is new, or set with **Update Signer**), and the signer alone in their signing order step. Every signature request also uses one document from the plan, or one credit when the allowance is used up.
|
|
338
|
+
|
|
339
|
+
## Signing order
|
|
340
|
+
|
|
341
|
+
Leave **Signing Order** empty for everyone to sign at the same time. To sign in sequence, set it on every signer: all signers with `1` are invited first, `2` after all of them sign, and so on. The numbers must start at 1 without gaps, and a digital certificate signer cannot share a number with anyone.
|
|
342
|
+
|
|
343
|
+
## Output fields
|
|
344
|
+
|
|
345
|
+
Document and signature request outputs:
|
|
145
346
|
|
|
146
347
|
| Field | Description |
|
|
147
348
|
|---|---|
|
|
@@ -153,9 +354,12 @@ Document outputs:
|
|
|
153
354
|
| `signer_count`, `signed_count`, `signer_emails` | Signing progress |
|
|
154
355
|
| `signers` | One entry per signer: name, email, WhatsApp, step, verification, whether they signed, signing link |
|
|
155
356
|
| `assignment_id`, `signature_method`, `expires_at` | The signature request and its deadline |
|
|
357
|
+
| `message`, `sender_email`, `document_id` | Signature request only: invitation text, sender, document |
|
|
156
358
|
| `decline_reason`, `declined_by_name`, `declined_by_email` | Filled when a signer declines |
|
|
157
359
|
| `tags`, `page_count`, `template_id`, `created_at`, `updated_at` | Other document details |
|
|
158
360
|
|
|
361
|
+
Signer outputs: `id`, `full_name`, `email`, `whatsapp_phone_number`, `has_accepted_terms`.
|
|
362
|
+
|
|
159
363
|
**New Event (Instant)** outputs:
|
|
160
364
|
|
|
161
365
|
| Field | Description |
|
|
@@ -175,8 +379,8 @@ Document outputs:
|
|
|
175
379
|
| `This API key can access N workspaces` | Set **Workspace ID** on the connection. |
|
|
176
380
|
| `… is not available for this document yet` | The file does not exist yet, for example the signed PDF before everyone signs. |
|
|
177
381
|
| `This Assinafy workspace already sends its webhooks to …` | Another system receives the workspace events. Turn on **Replace Existing Webhook** only if that system no longer needs them, or use **Document Signed**. |
|
|
178
|
-
| `HTTP 403 … approved permissions` | The OAuth connection
|
|
179
|
-
| `HTTP 401` on an OAuth connection that used to work | OAuth
|
|
382
|
+
| `HTTP 403 … approved permissions` | The item belongs to another workspace or needs a different Assinafy role. On an OAuth connection, a missing permission also causes it: add the permission to the OAuth application and reconnect. Billing, members and credentials are never available to OAuth connections. |
|
|
383
|
+
| `HTTP 401` on an OAuth connection that used to work | The access was revoked under **Connected apps** in Assinafy, the OAuth application was deleted or disabled, the app was approved again with different permissions, or the connection went 30 days without use. Reconnect. |
|
|
180
384
|
| `… is saved in Assinafy with a different WhatsApp number` | Update the signer with **Update Signer**, or leave WhatsApp Number empty to use the saved number. |
|
|
181
385
|
| `… must be the only signer in their signing order step` | Give the digital certificate signer a signing order number of their own. |
|
|
182
386
|
| `Assinafy is still receiving the file of this document` | The upload was still in progress after 30 seconds. Run the step again, or add a Delay step after **Upload Document**. |
|
|
@@ -201,7 +405,7 @@ Unit tests mock the HTTP client and block any real network request. One upload t
|
|
|
201
405
|
|
|
202
406
|
- Requests made by triggers time out after 15 seconds, well within the time Activepieces gives a trigger run; actions allow 120 seconds.
|
|
203
407
|
- When two runs create the same new signer at the same moment, the run that loses reuses the signer the other one created.
|
|
204
|
-
- Requests do not follow redirects automatically. A redirect is followed only for reads and downloads, and the credentials are left out when it points outside the Assinafy address, for example to file storage.
|
|
408
|
+
- Requests do not follow redirects automatically. A redirect is followed only for reads and downloads and only to an `https://` address, and the credentials are left out when it points outside the Assinafy address, for example to file storage.
|
|
205
409
|
- Uploads use the `form-data` package. The Activepieces HTTP client sets the multipart content type and boundary only for `form-data` bodies; a global `FormData` body would be sent as JSON.
|
|
206
410
|
- Assinafy's create-signer endpoint does not accept a CPF/CNPJ, so it is set with a follow-up update.
|
|
207
411
|
- Assinafy returns at most 50 items per list page, and repeats the last page when asked for a page beyond the end. List reads follow the `X-Pagination-Page-Count` header and stop at a short or repeated page.
|