Skip to content

Uncanny Automator — Triggers

Every WPsigner trigger can be limited to Any template or a specific WPsigner template. Matching uses the wps_document_created_from_template hook (WPsigner 3.x+) plus a local option map (wpsua_document_sources) maintained by the addon. Documents not created from a template still fire when the trigger is set to Any.

Most triggers are Everyone (anonymous) recipes. Only A WordPress user signs a document is a logged-in recipe.


Trigger (recipe sentence)CodeWordPress hookSigner tokens
A document is created from a templateWPS_DOCUMENT_CREATEDwps_document_createdNo
A document from a template is sentWPS_DOCUMENT_SENTwps_document_sentNo
A document from a template is viewedWPS_DOCUMENT_VIEWEDwps_document_viewedYes
A document from a template is signedWPS_DOCUMENT_SIGNEDwps_after_document_signedYes
A document from a template is completedWPS_DOCUMENT_COMPLETEDwps_document_completedNo
A document from a template is declinedWPS_DOCUMENT_DECLINEDwps_document_declinedYes + decline reason
A document from a template expiresWPS_DOCUMENT_EXPIREDwps_document_expiredNo
A document from a template is cancelledWPS_DOCUMENT_CANCELLEDwps_document_status_changed (cancelled)No
A document from a template is updatedWPS_DOCUMENT_UPDATEDwps_document_updatedNo
A document from a template is moved to trashWPS_DOCUMENT_SOFT_DELETEDwps_document_soft_deletedNo
A document from a template is permanently deletedWPS_DOCUMENT_DELETEDwps_document_deletedNo
A reminder is sent for a document from a templateWPS_REMINDER_SENTwps_reminder_sentYes
The completed PDF is generatedWPS_PDF_COMPLETEDwps_pdf_completedNo

Deleted triggers still receive a document snapshot from the hook when the row is already gone. Template matching uses the stored source map.


Requires the Stripe integration in WPsigner so PaymentIntents include document_id metadata.

TriggerCodeHookExtra tokens
A payment succeedsWPS_PAYMENT_SUCCEEDEDwps_stripe_payment_succeededAmount, currency, PaymentIntent ID
A payment failsWPS_PAYMENT_FAILEDwps_stripe_payment_failedAmount, currency, intent, error message
A payment is refundedWPS_PAYMENT_REFUNDEDwps_stripe_payment_refundedRefunded amount, currency, intent

Amount tokens are major units (cents ÷ 100). Refunded events resolve the document from charge metadata or WPsigner’s payment row.


TriggerCodeHooks
A completed PDF is uploaded to cloud storageWPS_CLOUD_UPLOADEDwps_google_drive_uploaded, wps_dropbox_uploaded, wps_onedrive_uploaded, wps_s3_uploaded

Filter by Any connected provider, Google Drive, Dropbox, OneDrive, or S3-compatible storage.

Tokens: Cloud provider, Cloud file reference, Cloud file URL. The URL is included only when it is already a public https link (Drive viewer, Dropbox/OneDrive share, or WPsigner backup metadata). The addon never exposes a local filesystem path.

Configure storage first: Google Drive, Dropbox, OneDrive, Amazon S3.


TriggerCodeHook
A WordPress user signs a document from a templateWPS_USER_SIGNEDwps_after_document_signed

This trigger does not fire for guest signers. The signer email must match a WordPress user. Use it for membership, LMS, or role recipes. For mixed guest + user traffic, use A document is signed (Everyone) instead.


Recipe optionBehavior
Any template (-1)All documents
Specific template IDOnly documents created from that template (source map)

Documents created in the WPsigner UI from a template are recorded automatically. Documents created by this addon’s create action are recorded the same way.


When a trigger runs, the addon sets Automator’s user ID if:

  1. The signer email matches a WordPress account, or
  2. The document owner (user_id) is a WordPress user

Everyone recipes can still run without a user. Logged-in recipes require a bound user (the user-signed trigger enforces the email match).