Add document resource to n8n node and MCP sendSigningNotifications tool
Add a complete document resource to the n8n node with 21 operations covering documents, versions, and signatures — matching the MCP specification. Also add the sendSigningNotifications tool to the MCP API for triggering pending signature reminders. n8n operations: create, get, getAll, update, delete, archive, unarchive, getVersion, getAllVersions, createDraftVersion, updateVersion, deleteDraftVersion, publishMajorVersion, publishMinorVersion, requestApproval, voidApproval, getSignature, getAllSignatures, requestSignature, cancelSignature, sendSigningNotifications. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -3956,3 +3956,18 @@ func (r *Resolver) VoidDocumentVersionApprovalTool(ctx context.Context, req *mcp
|
||||
DocumentVersion: types.NewDocumentVersion(documentVersion),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r *Resolver) SendSigningNotificationsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.SendSigningNotificationsInput) (*mcp.CallToolResult, types.SendSigningNotificationsOutput, error) {
|
||||
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionDocumentSendSigningNotifications)
|
||||
|
||||
svc := r.ProboService(ctx, input.OrganizationID)
|
||||
|
||||
err := svc.Documents.SendSigningNotifications(ctx, input.OrganizationID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot send signing notifications: %w", err))
|
||||
}
|
||||
|
||||
return nil, types.SendSigningNotificationsOutput{
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user