From fc4fa8e65dd74f06d9ea88a272446db5b820aa2e Mon Sep 17 00:00:00 2001 From: Pkatiyar30 <102517223+Pkatiyar30@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:38:05 +0000 Subject: [PATCH] usecase docusign (#488) * Add files via upload * Add files via upload * Update template-metadata.json * Update Download an employee file in BambooHR and send the report to the manager for approval via DocuSign_instructions.md * Update Download an employee file in BambooHR and send the report to the manager for approval via DocuSign_instructions.md * Update template-metadata.json * Update template-metadata.json * Update template-metadata.json * Delete resources/Download an employee file in BambooHR and send the report to the manager for approval via DocuSign.yaml * Delete resources/markdown/Download an employee file in BambooHR and send the report to the manager for approval via DocuSign_instructions.md * Update template-metadata.json * Add files via upload * Add files via upload * Update Download an employee file in BambooHR and send the report for approval to DocuSign_instructions.md * Update template-metadata.json * Update Download an employee file in BambooHR and send the report for approval to DocuSign_instructions.md * Update template-metadata.json * Update template-metadata.json --------- Co-authored-by: ireneapeter <158272585+ireneapeter@users.noreply.github.com> Co-authored-by: Deepak Ayilliath <87267785+Deepak-Ayilliath@users.noreply.github.com> --- ...d the report for approval to DocuSign.yaml | 184 ++++++++++++++++++ ...t for approval to DocuSign_instructions.md | 11 ++ resources/template-metadata.json | 12 +- 3 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 resources/Download an employee file in BambooHR and send the report for approval to DocuSign.yaml create mode 100644 resources/markdown/Download an employee file in BambooHR and send the report for approval to DocuSign_instructions.md diff --git a/resources/Download an employee file in BambooHR and send the report for approval to DocuSign.yaml b/resources/Download an employee file in BambooHR and send the report for approval to DocuSign.yaml new file mode 100644 index 000000000..501b1db77 --- /dev/null +++ b/resources/Download an employee file in BambooHR and send the report for approval to DocuSign.yaml @@ -0,0 +1,184 @@ +$integration: http://ibm.com/appconnect/integration/v2/integrationFile +integration: + type: api + trigger-interfaces: + trigger-interface-1: + triggers: + createCreate_report_upload: + assembly: + $ref: '#/integration/assemblies/assembly-1' + input-context: + data: create_report_upload + output-context: + data: create_report_upload + options: + resources: + - business-object: create_report_upload + model: + $ref: '#/models/create_report_upload' + triggers: + create: createCreate_report_upload + type: api-trigger + action-interfaces: + action-interface-2: + type: api-action + business-object: envelope + connector-type: docusign + actions: + CREATE: {} + action-interface-1: + type: api-action + business-object: employeefiles + connector-type: bamboohr + actions: + DOWNLOADFILE: {} + assemblies: + assembly-1: + assembly: + execute: + - custom-action: + name: BambooHR Download employee file content + target: + $ref: '#/integration/action-interfaces/action-interface-1' + action: DOWNLOADFILE + map: + mappings: + - fileId: + template: '{{$Request.file_ID}}' + - id: + template: '{{$Request.Employee_ID}}' + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: Request + $ref: '#/trigger/payload' + - variable: flowDetails + $ref: '#/flowDetails' + - create-action: + name: DocuSign Create envelope + target: + $ref: '#/integration/action-interfaces/action-interface-2' + map: + mappings: + - accountId: + template: 3915355d-2e46-41d5-945c-d03f40b218ef + - documents: + foreach: + input: '$Request.documents ' + iterator: documentsItem + mappings: + - documentBase64: + template: >- + {{$BambooHRDownloademployeefilecontent.fileContent}} + - documentId: + template: '{{$documentsItem.document_id}}' + - fileExtension: + template: pdf + - name: + template: '{{$documentsItem.document_name}}' + - emailSubject: + template: '{{$Request.Email_subject}}' + - recipients: + mappings: + - signers: + foreach: + mappings: + - email: + template: '{{$Request.recipients.recipient_email}}' + - name: + template: '{{$Request.recipients.recipient_name}}' + - recipientId: + template: '{{$Request.recipients.recipient_id}}' + input: '$Request.recipients ' + iterator: signersItem + - status: + template: sent + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: Request + $ref: '#/trigger/payload' + - variable: BambooHRDownloademployeefilecontent + $ref: >- + #/node-output/BambooHR Download employee file + content/response/payload + - variable: flowDetails + $ref: '#/flowDetails' + - response: + name: response-1 + reply-maps: + - title: create_report_upload successfully created + status-code: 201 + map: + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: Request + $ref: '#/trigger/payload' + - variable: BambooHRDownloademployeefilecontent + $ref: >- + #/node-output/BambooHR Download employee file + content/response/payload + - variable: DocuSignCreateenvelope + $ref: >- + #/node-output/DocuSign Create + envelope/response/payload + - variable: flowDetails + $ref: '#/flowDetails' + mappings: + - Envelope_ID: + template: '{{$DocuSignCreateenvelope.envelopeId}}' + input: [] + name: >- + Download an employee file in BambooHR and send the report for approval to DocuSign +models: + create_report_upload: + name: create_report_upload + properties: + documents: + required: false + id: false + type: + - type: + document_id: + required: false + id: false + type: string + document_name: + required: false + id: false + type: string + recipients: + required: false + id: false + type: + - type: + recipient_name: + required: false + id: false + type: string + recipient_email: + required: false + id: false + type: string + recipient_id: + required: false + id: false + type: string + file_ID: + required: false + id: false + type: number + Employee_ID: + required: false + id: false + type: number + Envelope_ID: + required: false + id: true + type: string + Email_subject: + required: false + id: false + type: string + plural: create_report_upload + description: ' ' + operations: + create: '#/integration/assemblies/assembly-1' diff --git a/resources/markdown/Download an employee file in BambooHR and send the report for approval to DocuSign_instructions.md b/resources/markdown/Download an employee file in BambooHR and send the report for approval to DocuSign_instructions.md new file mode 100644 index 000000000..77e6a3ce1 --- /dev/null +++ b/resources/markdown/Download an employee file in BambooHR and send the report for approval to DocuSign_instructions.md @@ -0,0 +1,11 @@ +To refer to these instructions while editing the flow, open [the GitHub page](https://github.com/ot4i/app-connect-templates/blob/main/resources/markdown/Download%20an%20employee%20file%20in%20BambooHR%20and%20send%20the%20report%20for%20approval%20to%20Docusign_instructions.md) (opens in a new window). + +1. Click **Use this template** to start using the template. +2. Connect to the following accounts by using your credentials: + - [Docusign](https://ibm.biz/docusign) + - [BambooHR](https://ibm.biz/acbamboohr) + +3. To start the flow, in the banner click **Start flow**. + +Use this template to download an employee file in BambooHR and send the report for approval to DocuSign. +For more information about using an API flow, see the tutorial [Creating flows for an API](https://www.ibm.com/docs/en/app-connect/saas?topic=designer-introduction-creating-flows-api-part-1). diff --git a/resources/template-metadata.json b/resources/template-metadata.json index 518050c21..41a49fb5f 100644 --- a/resources/template-metadata.json +++ b/resources/template-metadata.json @@ -3688,6 +3688,16 @@ "targetApps": ["zohorecruit", "gmail"], "tags": ["foreach", "if", "wufoo", "zohorecruit", "gmail"], "offerings": ["app connect professional"] - } +}, +{ + "name": "Download an employee file in BambooHR and send the report for approval to DocuSign", + "description": "Use this template to download an employee file in BambooHR and send the report for approval to DocuSign.", + "summary": "1 flow using 2 applications", + "sourceApp": "api", + "targetApps": ["docusign", "bamboohr"], + "targetApps": ["bamboohr", "docusign"], + "tags": ["bamboohr", "docusign", "api"], + "offerings": ["app connect professional"] + } ] }