diff --git a/resources/Create a new form entry in Wufoo from BambooHR.yaml b/resources/Create a new form entry in Wufoo from BambooHR.yaml new file mode 100644 index 000000000..5814fe19a --- /dev/null +++ b/resources/Create a new form entry in Wufoo from BambooHR.yaml @@ -0,0 +1,184 @@ +$integration: http://ibm.com/appconnect/integration/v2/integrationFile +integration: + type: api + trigger-interfaces: + trigger-interface-1: + triggers: + createEmployeeReports: + assembly: + $ref: '#/integration/assemblies/assembly-1' + input-context: + data: EmployeeReports + output-context: + data: EmployeeReports + options: + resources: + - business-object: EmployeeReports + model: + $ref: '#/models/EmployeeReports' + triggers: + create: createEmployeeReports + type: api-trigger + action-interfaces: + action-interface-1: + type: api-action + business-object: reports + connector-type: bamboohr + actions: + CREATEREPORT: {} + action-interface-2: + type: api-action + business-object: FormEntry + connector-type: wufoo + actions: + CREATE: {} + assemblies: + assembly-1: + assembly: + execute: + - custom-action: + name: bambooHR Request a custom report + target: + $ref: '#/integration/action-interfaces/action-interface-1' + action: CREATEREPORT + map: + mappings: + - format: + template: '{{$Request.format}}' + - inputfields: + expression: '$Request.fields ' + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: Request + $ref: '#/trigger/payload' + - variable: flowDetails + $ref: '#/flowDetails' + - for-each: + name: For each + assembly: + $ref: '#/integration/assemblies/assembly-2' + source: + expression: '$bambooHRRequestacustomreport.employees ' + input: + - variable: Request + $ref: '#/trigger/payload' + - variable: bambooHRRequestacustomreport + $ref: >- + #/node-output/bambooHR Request a custom + report/response/payload + - variable: flowDetails + $ref: '#/flowDetails' + mode: sequential + continue-on-error: true + map: + $map: http://ibm.com/appconnect/map/v1 + customSchemas: + properties.`output`: + type: object + properties: + firstName: + type: string + input: + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: Request + $ref: '#/trigger/payload' + - variable: bambooHRRequestacustomreport + $ref: >- + #/node-output/bambooHR Request a custom + report/response/payload + - variable: flowDetails + $ref: '#/flowDetails' + mappings: + - output: + mappings: + - firstName: + template: '{{$Foreachitem.firstName}}' + display-name: bambooHR employees + - response: + name: response-1 + reply-maps: + - title: EmployeeReports successfully created + status-code: 201 + map: + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: Request + $ref: '#/trigger/payload' + - variable: bambooHRRequestacustomreport + $ref: >- + #/node-output/bambooHR Request a custom + report/response/payload + - variable: Foreach + $ref: '#/node-output/For each/response/payload' + - variable: flowDetails + $ref: '#/flowDetails' + mappings: + - result: + template: '{{$Foreach.output}}' + input: [] + assembly-2: + assembly: + execute: + - create-action: + name: Wufoo Create form entry + target: + $ref: '#/integration/action-interfaces/action-interface-2' + map: + mappings: + - Field1: + template: '{{$Foreachitem.firstName}}' + - Field16: + template: '{{$Foreachitem.employeeNumber}}' + - Field17: + template: '{{$Foreachitem.middleName}}' + - Field18: + template: '{{$Foreachitem.maritalStatus}}' + - Field2: + template: '{{$Foreachitem.lastName}}' + - Field22: + template: '{{$Foreachitem.workPhone}}' + - Field24: + template: '{{$Foreachitem.gender}}' + - Field26: + template: '{{$Foreachitem.employmentHistoryStatus}}' + - Field27: + template: '{{$Foreachitem.workEmail}}' + - Field29: + template: '{{$Foreachitem.supervisorId}}' + - Hash: + template: q1h28nis04w3mqu + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: Request + $ref: '#/trigger/payload' + - variable: bambooHRRequestacustomreport + $ref: >- + #/node-output/bambooHR Request a custom + report/response/payload + - variable: flowDetails + $ref: '#/flowDetails' + name: Create a new form entry in Wufoo from BambooHR +models: + EmployeeReports: + name: EmployeeReports + properties: + result: + required: false + id: true + type: string + fields: + required: false + id: false + type: + - string + format: + required: false + id: false + type: string + plural: EmployeeReports + description: ' ' + operations: + create: '#/integration/assemblies/assembly-1' diff --git a/resources/Send an email notification on creating an employee in BambooHR.yaml b/resources/Send an email notification on creating an employee in BambooHR.yaml new file mode 100644 index 000000000..af5d6d4bc --- /dev/null +++ b/resources/Send an email notification on creating an employee in BambooHR.yaml @@ -0,0 +1,182 @@ +$integration: http://ibm.com/appconnect/integration/v2/integrationFile +integration: + type: trigger-action + trigger-interfaces: + trigger-interface-1: + connector-type: streaming-connector-scheduler + type: event-trigger + triggers: + SCHEDULE: + input-context: + data: scheduler + assembly: + $ref: '#/integration/assemblies/assembly-1' + options: + subscription: + scheduleConfiguration: + interval: + unit: minute + value: 1 + runOnceOncheck: false + days: + - MON + - TUE + - WED + - THU + - FRI + - SAT + - SUN + timeZone: UTC + action-interfaces: + action-interface-1: + type: api-action + business-object: employees + connector-type: bamboohr + actions: + RETRIEVEALL: {} + action-interface-2: + type: api-action + business-object: employees + connector-type: bamboohr + actions: + RETRIEVEALL: {} + action-interface-5: + type: api-action + business-object: mail + connector-type: gmail + actions: + CREATE: {} + assemblies: + assembly-1: + assembly: + execute: + - retrieve-action: + name: bambooHR Retrieve employees + target: + $ref: '#/integration/action-interfaces/action-interface-1' + filter: + where: + and: + - type: inserted + - since: '{{$Trigger.lastEventTime}}' + input: + - variable: Trigger + $ref: '#/trigger/payload' + - variable: flowDetails + $ref: '#/flowDetails' + limit: 10 + allow-truncation: true + allow-empty-output: true + - for-each: + name: For each + assembly: + $ref: '#/integration/assemblies/assembly-2' + source: + expression: '$bambooHRRetrieveemployees ' + input: + - variable: Trigger + $ref: '#/trigger/payload' + - variable: bambooHRRetrieveemployees + $ref: '#/node-output/bambooHR Retrieve employees/response/payload' + - variable: bambooHRRetrieveemployeesMetadata + $ref: '#/node-output/bambooHR Retrieve employees/response' + - variable: flowDetails + $ref: '#/flowDetails' + mode: sequential + continue-on-error: true + map: + $map: http://ibm.com/appconnect/map/v1 + customSchemas: + properties.`output`: + type: object + properties: + firstName: + type: string + lastName: + type: string + id: + type: string + input: + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: Trigger + $ref: '#/trigger/payload' + - variable: If + $ref: '#/block/For each/node-output/If/response/payload' + - variable: bambooHRRetrieveemployees + $ref: '#/node-output/bambooHR Retrieve employees/response/payload' + - variable: bambooHRRetrieveemployeesMetadata + $ref: '#/node-output/bambooHR Retrieve employees/response' + - variable: flowDetails + $ref: '#/flowDetails' + mappings: + - output: + mappings: + - id: + template: '{{$Foreachitem.id}}' + display-name: bambooHR employees + assembly-2: + assembly: + execute: + - retrieve-action: + name: bambooHR Retrieve employees 2 + target: + $ref: '#/integration/action-interfaces/action-interface-2' + filter: + where: + id: '{{$Foreachitem.id}}' + input: + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: Trigger + $ref: '#/trigger/payload' + - variable: bambooHRRetrieveemployees + $ref: '#/node-output/bambooHR Retrieve employees/response/payload' + - variable: bambooHRRetrieveemployeesMetadata + $ref: '#/node-output/bambooHR Retrieve employees/response' + - variable: flowDetails + $ref: '#/flowDetails' + limit: 10 + allow-truncation: true + allow-empty-output: true + - create-action: + name: Gmail Send email + target: + $ref: '#/integration/action-interfaces/action-interface-5' + map: + mappings: + - Body: + template: |- + Hi, + Please find the employee details created in BambooHR: + EmployeeID: {{$bambooHRRetrieveemployees2.id}} + FirstName : {{$bambooHRRetrieveemployees2.firstName}} + LastName : {{$bambooHRRetrieveemployees2.lastName}} + - CC: + template: test@email.com + - Subject: + template: '{{$Foreachitem.id}} - Created In BambooHR Portal' + - To: + template: test@email.com + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: Trigger + $ref: '#/trigger/payload' + - variable: bambooHRRetrieveemployees2 + $ref: >- + #/block/For each/node-output/bambooHR Retrieve employees + 2/response/payload + - variable: bambooHRRetrieveemployees2Metadata + $ref: >- + #/block/For each/node-output/bambooHR Retrieve employees + 2/response + - variable: bambooHRRetrieveemployees + $ref: '#/node-output/bambooHR Retrieve employees/response/payload' + - variable: bambooHRRetrieveemployeesMetadata + $ref: '#/node-output/bambooHR Retrieve employees/response' + - variable: flowDetails + $ref: '#/flowDetails' + name: Send an email notification on creating an employee in BambooHR +models: {} diff --git a/resources/markdown/Create a new form entry in Wufoo from BambooHR_instructions.md b/resources/markdown/Create a new form entry in Wufoo from BambooHR_instructions.md new file mode 100644 index 000000000..9b2bd6f9e --- /dev/null +++ b/resources/markdown/Create a new form entry in Wufoo from BambooHR_instructions.md @@ -0,0 +1,10 @@ +To refer to these instructions while editing the flow, open [the GitHub page](https://github.com/ot4i/app-connect-templates/blob/master/resources/markdown/Create%20a%20new%20form%20entry%20in%20Wufoo%20from%20BambooHR_instructions.md)(opens in a new window). + +1. Click **Create flow** to start using the template. +1. Click **Operations**, then click **Edit flow** to edit the operations. +1. Click the BambooHR node, and if you're not already connected, connect to your [BambooHR account](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-bamboohr). +1. Click the Wufoo node, and if you're not already connected, connect to your [Wufoo account](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-wufoo). +1. Click **Done**. +1. To start the flow, in the banner click **Start flow**. + +For more information about this 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). \ No newline at end of file diff --git a/resources/markdown/Send an email notification on creating an employee in BambooHR_instructions.md b/resources/markdown/Send an email notification on creating an employee in BambooHR_instructions.md new file mode 100644 index 000000000..955b7a66c --- /dev/null +++ b/resources/markdown/Send an email notification on creating an employee in BambooHR_instructions.md @@ -0,0 +1,8 @@ +To refer to these instructions while editing the flow, open [the GitHub page](https://github.com/ot4i/app-connect-templates/blob/master/resources/markdown/Send%20an%20email%20notification%20on%20creating%20an%20employee%20in%20BambooHR_instructions.md) (opens in a new window). + +1. Click **Create flow** to start using the template. +1. Connect to the following accounts by using your credentials: + - [BambooHR](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-bamboohr) + - [Gmail](https://www.ibm.com/docs/en/app-connect/containers_cd?topic=apps-gmail) +1. To start the flow, in the banner, click **Start flow**. + diff --git a/resources/template-metadata.json b/resources/template-metadata.json index bb4cdf754..71412f7c0 100644 --- a/resources/template-metadata.json +++ b/resources/template-metadata.json @@ -1979,7 +1979,7 @@ "tags": ["scheduler","bamboohr", "gmail"], "offerings": ["app connect professional"] }, - { + { "name": "Create a new form entry in Wufoo from BambooHR", "description": "Use this template to create a new employee entry in Wufoo from BambooHR", "summary": "1 flow using 2 applications",