This integration allows you to select a template from PandaDoc and then create a document from it for the new hire. It also adds the manager to sign this document.
{ "form": [ { "id": "TEMPLATE_ID", "url": "https://api.pandadoc.com/public/v1/templates", "name": "Select template to use to create document for new hire", "type": "choice", "method": "GET", "data_from": "results", "choice_name": "name", "choice_value": "id" } ], "execute": [ { "url": "https://api.pandadoc.com/public/v1/documents", "data": { "name": "Document between new hire {{ first_name }} {{ last_name }} and {{ manager}}", "recipients": [ { "role": "New hire", "email": "{{ email }}", "last_name": "{{ last_name }}", "first_name": "{{ first_name }}" }, { "role": "Manager", "email": "{{ manager_email }}" } ], "template_uuid": "{{ TEMPLATE_ID }}" }, "method": "POST", "store_data": { "PANDADOC_DOCUMENT_ID": "id" } }, { "url": "https://api.pandadoc.com/public/v1/documents/{{PANDADOC_DOCUMENT_ID}}", "method": "GET", "polling": { "amount": 10, "interval": 5 }, "continue_if": { "value": "document.draft", "response_notation": "status" } }, { "url": "https://api.pandadoc.com/public/v1/documents/{{PANDADOC_DOCUMENT_ID}}/send", "data": { "subject": "Please sign this new document" }, "method": "POST" } ], "headers": { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "API-Key {{KEY}}" }, "initial_data_form": [ { "id": "KEY", "name": "The PandaDoc api key", "description": "Go to: https://app.pandadoc.com/a/#/api-dashboard/configuration to get one" } ] }
What it will do:
Create the document from the template
Wait for it to be completed (this can take up to 5 seconds according to PandaDoc, but we will wait for a maximum of 50 seconds)
Send the document over email to the recipients.