|
| 1 | +$integration: http://ibm.com/appconnect/integration/v2/integrationFile |
| 2 | +integration: |
| 3 | + type: trigger-action |
| 4 | + trigger-interfaces: |
| 5 | + trigger-interface-1: |
| 6 | + type: event-trigger |
| 7 | + connector-type: msexchange |
| 8 | + triggers: |
| 9 | + CREATED_POLLER: |
| 10 | + assembly: |
| 11 | + $ref: '#/integration/assemblies/assembly-1' |
| 12 | + input-context: |
| 13 | + data: Messages |
| 14 | + options: |
| 15 | + parentFolderId: >- |
| 16 | + AAMkADZmZTI0YzlkLTQ0NWEtNGEyYy04M2U4LTg5ODlmZDAzNTIzMwAuAAAAAACA6ugh45R4QKPbS5lwvph5AQD4gXnEhMN7Tr04V9vM_2_9AATiMD3jAAA= |
| 17 | + parentFilter: |
| 18 | + parentFolderId: >- |
| 19 | + AAMkADZmZTI0YzlkLTQ0NWEtNGEyYy04M2U4LTg5ODlmZDAzNTIzMwAuAAAAAACA6ugh45R4QKPbS5lwvph5AQD4gXnEhMN7Tr04V9vM_2_9AATiMD3jAAA= |
| 20 | + subscription: |
| 21 | + timeZone: UTC |
| 22 | + pollingInterval: 1 |
| 23 | + connectorServiceOptions: |
| 24 | + httpMethod: post |
| 25 | + path: >- |
| 26 | + resources/MailFolders/{parentFolderId}/Messages/operations/CREATED_POLLER/subscribe |
| 27 | + action: created_poller |
| 28 | + action-interfaces: |
| 29 | + action-interface-4: |
| 30 | + type: api-action |
| 31 | + business-object: mail |
| 32 | + connector-type: gmail |
| 33 | + actions: |
| 34 | + CREATE: {} |
| 35 | + options: |
| 36 | + connectorServiceOptions: |
| 37 | + httpMethod: post |
| 38 | + path: resources/mail |
| 39 | + action: create |
| 40 | + action-interface-1: |
| 41 | + type: api-action |
| 42 | + business-object: Transfers |
| 43 | + connector-type: ibmaspera |
| 44 | + actions: |
| 45 | + postOpsTransfers: {} |
| 46 | + options: |
| 47 | + connectorServiceOptions: |
| 48 | + httpMethod: post |
| 49 | + path: resources/Transfers/operations/postOpsTransfers |
| 50 | + action: create |
| 51 | + action-interface-2: |
| 52 | + type: api-action |
| 53 | + business-object: Transfers |
| 54 | + connector-type: ibmaspera |
| 55 | + actions: |
| 56 | + getOpsTransfersByTransferId: {} |
| 57 | + options: |
| 58 | + connectorServiceOptions: |
| 59 | + httpMethod: get |
| 60 | + path: resources/Transfers/operations/getOpsTransfersByTransferId |
| 61 | + action: retrieve |
| 62 | + assemblies: |
| 63 | + assembly-1: |
| 64 | + assembly: |
| 65 | + execute: |
| 66 | + - for-each: |
| 67 | + map: |
| 68 | + $map: http://ibm.com/appconnect/map/v1 |
| 69 | + mappings: [] |
| 70 | + source: |
| 71 | + expression: '[$Trigger.bodyPreview ]' |
| 72 | + input: |
| 73 | + - variable: Trigger |
| 74 | + $ref: '#/trigger/payload' |
| 75 | + - variable: flowDetails |
| 76 | + $ref: '#/flowDetails' |
| 77 | + mode: sequential |
| 78 | + continue-on-error: true |
| 79 | + name: For each |
| 80 | + assembly: |
| 81 | + $ref: '#/integration/assemblies/assembly-2' |
| 82 | + display-name: Microsoft Exchange email |
| 83 | + assembly-2: |
| 84 | + assembly: |
| 85 | + execute: |
| 86 | + - if: |
| 87 | + branch: |
| 88 | + - condition: |
| 89 | + '{{$Trigger.subject}}': IBM Aspera file transfer approved |
| 90 | + execute: |
| 91 | + - parse: |
| 92 | + parse-format: json |
| 93 | + source: |
| 94 | + template: '{{$Foreachitem}}' |
| 95 | + input: |
| 96 | + - variable: Trigger |
| 97 | + $ref: '#/trigger/payload' |
| 98 | + - variable: Foreachitem |
| 99 | + $ref: '#/block/For each/current-item' |
| 100 | + - variable: flowDetails |
| 101 | + $ref: '#/flowDetails' |
| 102 | + sample-data: |- |
| 103 | + { |
| 104 | + "source": "folder2/File_1234", |
| 105 | + "destination": "/folder1/usecase1.40", |
| 106 | + "remote_host": "ats-aws-us-east-1.aspera.io", |
| 107 | + "token": "Basic WjhBbU0wUWVhTVVPYkdHT0NFa3NwdXJoOmJDeWhWdGhoX2NfYjhWVnhiRkY=" |
| 108 | + } |
| 109 | + output-schema: |
| 110 | + $schema: http://json-schema.org/draft-04/schema# |
| 111 | + type: object |
| 112 | + properties: |
| 113 | + source: |
| 114 | + type: string |
| 115 | + destination: |
| 116 | + type: string |
| 117 | + remote_host: |
| 118 | + type: string |
| 119 | + token: |
| 120 | + type: string |
| 121 | + title: Parsed JSON |
| 122 | + name: JSON Parser Parse |
| 123 | + - custom-action: |
| 124 | + name: IBM Aspera Create transfer |
| 125 | + target: |
| 126 | + $ref: '#/integration/action-interfaces/action-interface-1' |
| 127 | + action: postOpsTransfers |
| 128 | + map: |
| 129 | + mappings: |
| 130 | + - direction: |
| 131 | + template: send |
| 132 | + - paths: |
| 133 | + foreach: |
| 134 | + input: '[{}]' |
| 135 | + iterator: pathsItem |
| 136 | + mappings: |
| 137 | + - destination: |
| 138 | + template: '{{$JSONParserParse.destination}}' |
| 139 | + - source: |
| 140 | + template: '{{$JSONParserParse.source}}' |
| 141 | + - remote_host: |
| 142 | + template: '{{$JSONParserParse.remote_host}}' |
| 143 | + - token: |
| 144 | + template: '{{$JSONParserParse.token}}' |
| 145 | + $map: http://ibm.com/appconnect/map/v1 |
| 146 | + input: |
| 147 | + - variable: Trigger |
| 148 | + $ref: '#/trigger/payload' |
| 149 | + - variable: JSONParserParse |
| 150 | + $ref: >- |
| 151 | + #/block/If/node-output/JSON Parser |
| 152 | + Parse/response/payload |
| 153 | + - variable: Foreachitem |
| 154 | + $ref: '#/block/For each/current-item' |
| 155 | + - variable: flowDetails |
| 156 | + $ref: '#/flowDetails' |
| 157 | + filter: {} |
| 158 | + - custom-action: |
| 159 | + name: IBM Aspera Retrieve transfer information by ID |
| 160 | + target: |
| 161 | + $ref: '#/integration/action-interfaces/action-interface-2' |
| 162 | + action: getOpsTransfersByTransferId |
| 163 | + map: |
| 164 | + $map: http://ibm.com/appconnect/map/v1 |
| 165 | + input: |
| 166 | + - variable: Trigger |
| 167 | + $ref: '#/trigger/payload' |
| 168 | + - variable: JSONParserParse |
| 169 | + $ref: >- |
| 170 | + #/block/If/node-output/JSON Parser |
| 171 | + Parse/response/payload |
| 172 | + - variable: IBMAsperaCreatetransfer |
| 173 | + $ref: >- |
| 174 | + #/block/If/node-output/IBM Aspera Create |
| 175 | + transfer/response/payload |
| 176 | + - variable: Foreachitem |
| 177 | + $ref: '#/block/For each/current-item' |
| 178 | + - variable: flowDetails |
| 179 | + $ref: '#/flowDetails' |
| 180 | + mappings: [] |
| 181 | + filter: |
| 182 | + where: |
| 183 | + id: '{{$IBMAsperaCreatetransfer.id}}' |
| 184 | + input: |
| 185 | + - variable: Trigger |
| 186 | + $ref: '#/trigger/payload' |
| 187 | + - variable: JSONParserParse |
| 188 | + $ref: >- |
| 189 | + #/block/If/node-output/JSON Parser |
| 190 | + Parse/response/payload |
| 191 | + - variable: IBMAsperaCreatetransfer |
| 192 | + $ref: >- |
| 193 | + #/block/If/node-output/IBM Aspera Create |
| 194 | + transfer/response/payload |
| 195 | + - variable: Foreachitem |
| 196 | + $ref: '#/block/For each/current-item' |
| 197 | + - variable: flowDetails |
| 198 | + $ref: '#/flowDetails' |
| 199 | + - create-action: |
| 200 | + name: Gmail Send email |
| 201 | + target: |
| 202 | + $ref: '#/integration/action-interfaces/action-interface-4' |
| 203 | + map: |
| 204 | + mappings: |
| 205 | + - CC: |
| 206 | + |
| 207 | + - Subject: |
| 208 | + template: IBM Aspera file transfer initiated! |
| 209 | + - To: |
| 210 | + |
| 211 | + - richTextBody: |
| 212 | + mappings: |
| 213 | + - content: |
| 214 | + template: >- |
| 215 | + Hello, you can check the status of the IBM Aspera file transfer here. The transfer status is: |
| 216 | + {{$IBMAsperaGetinformationaboutaspecifictransfer.status}} |
| 217 | + Transfer id -> |
| 218 | + {{$IBMAsperaStartanewtransfer.id}} |
| 219 | + - contentType: |
| 220 | + template: text/plain |
| 221 | + $map: http://ibm.com/appconnect/map/v1 |
| 222 | + input: |
| 223 | + - variable: Trigger |
| 224 | + $ref: '#/trigger/payload' |
| 225 | + - variable: JSONParserParse |
| 226 | + $ref: >- |
| 227 | + #/block/If/node-output/JSON Parser |
| 228 | + Parse/response/payload |
| 229 | + - variable: IBMAsperaCreatetransfer |
| 230 | + $ref: >- |
| 231 | + #/block/If/node-output/IBM Aspera Create |
| 232 | + transfer/response/payload |
| 233 | + - variable: IBMAsperaRetrievetransferinformationbyID |
| 234 | + $ref: >- |
| 235 | + #/block/If/node-output/IBM Aspera Retrieve |
| 236 | + transfer information by ID/response/payload |
| 237 | + - variable: Foreachitem |
| 238 | + $ref: '#/block/For each/current-item' |
| 239 | + - variable: flowDetails |
| 240 | + $ref: '#/flowDetails' |
| 241 | + else: |
| 242 | + execute: [] |
| 243 | + name: If |
| 244 | + input: |
| 245 | + - variable: Trigger |
| 246 | + $ref: '#/trigger/payload' |
| 247 | + - variable: Foreachitem |
| 248 | + $ref: '#/block/For each/current-item' |
| 249 | + - variable: flowDetails |
| 250 | + $ref: '#/flowDetails' |
| 251 | + name: Transfer a file through IBM Aspera and send the transfer status in Gmail upon approval received in Microsoft Exchange |
| 252 | +models: {} |
0 commit comments