-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8960616
commit 1f79d4c
Showing
1 changed file
with
254 additions
and
0 deletions.
There are no files selected for viewing
254 changes: 254 additions & 0 deletions
254
resources/Create new contacts in front from google sheets.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
$integration: http://ibm.com/appconnect/integration/v2/integrationFile | ||
integration: | ||
type: trigger-action | ||
trigger-interfaces: | ||
trigger-interface-1: | ||
type: event-trigger | ||
connector-type: streaming-connector-scheduler | ||
triggers: | ||
SCHEDULE: | ||
assembly: | ||
$ref: '#/integration/assemblies/assembly-1' | ||
input-context: | ||
data: scheduler | ||
options: | ||
subscription: | ||
scheduleConfiguration: | ||
interval: | ||
unit: minute | ||
value: 1 | ||
runOnceOncheck: false | ||
days: | ||
- MON | ||
- TUE | ||
- WED | ||
- THU | ||
- FRI | ||
- SAT | ||
- SUN | ||
timeZone: UTC | ||
action-interfaces: | ||
action-interface-2: | ||
type: api-action | ||
business-object: worksheetRow | ||
connector-type: googlesheet | ||
actions: | ||
RETRIEVEALL: {} | ||
action-interface-3: | ||
type: api-action | ||
business-object: postContacts_model | ||
connector-type: front | ||
actions: | ||
postContacts: {} | ||
action-interface-1: | ||
type: api-action | ||
business-object: postAccountsByIdContacts_model | ||
connector-type: front | ||
actions: | ||
postAccountsByIdContacts: {} | ||
action-interface-4: | ||
type: api-action | ||
business-object: getAccountsByIdContacts_model | ||
connector-type: front | ||
actions: | ||
getAccountsByIdContacts: {} | ||
action-interface-5: | ||
type: api-action | ||
business-object: postChannelsByIdMessages_model | ||
connector-type: front | ||
actions: | ||
postChannelsByIdMessages: {} | ||
assemblies: | ||
assembly-1: | ||
assembly: | ||
execute: | ||
- retrieve-action: | ||
allow-empty-output: true | ||
allow-truncation: true | ||
name: Google Sheets Retrieve rows | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-2' | ||
filter: | ||
limit: 25 | ||
where: | ||
and: | ||
- spreadsheetID: 1_s_ojnWjQY7i6pcBDcyhN0tOYU85jKUXdBYgGp2HVQs | ||
- worksheetID: Sheet1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
pagination-type: SKIP_LIMIT | ||
- for-each: | ||
map: | ||
$map: http://ibm.com/appconnect/map/v1 | ||
customSchemas: | ||
properties.`output`: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: GoogleSheetsRetrieverows | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response/payload' | ||
- variable: GoogleSheetsRetrieverowsMetadata | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response' | ||
- variable: FrontCreatecontact | ||
$ref: >- | ||
#/block/For each/node-output/Front Create | ||
contact/response/payload | ||
- variable: FrontAddcontactstoaccount | ||
$ref: >- | ||
#/block/For each/node-output/Front Add contacts to | ||
account/response/payload | ||
- variable: Foreachitem | ||
$ref: '#/block/For each/current-item' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
mappings: [] | ||
source: | ||
expression: >- | ||
$GoogleSheetsRetrieverows[[1..$count($GoogleSheetsRetrieverows)-1]] | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: GoogleSheetsRetrieverows | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response/payload' | ||
- variable: GoogleSheetsRetrieverowsMetadata | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
mode: sequential | ||
continue-on-error: true | ||
name: For each | ||
assembly: | ||
$ref: '#/integration/assemblies/assembly-2' | ||
display-name: Google Sheets Title | ||
- custom-action: | ||
action: getAccountsByIdContacts | ||
name: Front Retrieve account contacts | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-4' | ||
map: | ||
mappings: | ||
- id: | ||
template: acc_e0vyak | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: GoogleSheetsRetrieverows | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response/payload' | ||
- variable: GoogleSheetsRetrieverowsMetadata | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response' | ||
- variable: Foreach | ||
$ref: '#/node-output/For each/response/payload' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
filter: | ||
where: | ||
id: acc_e0vyak | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: GoogleSheetsRetrieverows | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response/payload' | ||
- variable: GoogleSheetsRetrieverowsMetadata | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response' | ||
- variable: Foreach | ||
$ref: '#/node-output/For each/response/payload' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
allow-empty-output: true | ||
- custom-action: | ||
action: postChannelsByIdMessages | ||
name: Front Create message | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-5' | ||
map: | ||
mappings: | ||
- body: | ||
template: '{{$Foreach}}' | ||
- id: | ||
template: cha_g4xwc | ||
- to: | ||
expression: '["[email protected]"]' | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: GoogleSheetsRetrieverows | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response/payload' | ||
- variable: GoogleSheetsRetrieverowsMetadata | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response' | ||
- variable: Foreach | ||
$ref: '#/node-output/For each/response/payload' | ||
- variable: FrontRetrieveaccountcontacts | ||
$ref: >- | ||
#/node-output/Front Retrieve account | ||
contacts/response/payload | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
assembly-2: | ||
assembly: | ||
execute: | ||
- custom-action: | ||
action: postContacts | ||
name: Front Create contact | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-3' | ||
map: | ||
mappings: | ||
- handles: | ||
foreach: | ||
input: '{}' | ||
iterator: handlesItem | ||
mappings: | ||
- handle: | ||
template: '{{$GoogleSheetsRetrieverows.values[0]}}' | ||
- source: | ||
template: '{{$GoogleSheetsRetrieverows.values[1]}}' | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: GoogleSheetsRetrieverows | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response/payload' | ||
- variable: GoogleSheetsRetrieverowsMetadata | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response' | ||
- variable: Foreachitem | ||
$ref: '#/block/For each/current-item' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
- custom-action: | ||
action: postAccountsByIdContacts | ||
name: Front Add contacts to account | ||
target: | ||
$ref: '#/integration/action-interfaces/action-interface-1' | ||
map: | ||
mappings: | ||
- contact_ids: | ||
expression: '$FrontCreatecontact.id ' | ||
- id: | ||
template: acc_e0vyak | ||
$map: http://ibm.com/appconnect/map/v1 | ||
input: | ||
- variable: Trigger | ||
$ref: '#/trigger/payload' | ||
- variable: GoogleSheetsRetrieverows | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response/payload' | ||
- variable: GoogleSheetsRetrieverowsMetadata | ||
$ref: '#/node-output/Google Sheets Retrieve rows/response' | ||
- variable: FrontCreatecontact | ||
$ref: >- | ||
#/block/For each/node-output/Front Create | ||
contact/response/payload | ||
- variable: Foreachitem | ||
$ref: '#/block/For each/current-item' | ||
- variable: flowDetails | ||
$ref: '#/flowDetails' | ||
name: Create new contacts in front from google sheets | ||
models: {} |