Skip to content

Commit

Permalink
Merge branch 'master' into shahminiaru-patch-11
Browse files Browse the repository at this point in the history
  • Loading branch information
shahminiaru authored Sep 14, 2023
2 parents 295faa3 + a86f15e commit ca786d6
Show file tree
Hide file tree
Showing 50 changed files with 3,072 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: trigger-action
trigger-interfaces:
trigger-interface-1:
connector-type: asana
type: event-trigger
triggers:
CREATED:
input-context:
data: Tasks
assembly:
$ref: '#/integration/assemblies/assembly-1'
options:
workspace-id: '1204205574829453'
team-id: '1204205586130693'
project: '1204205585687152'
parentFilter:
workspace-id: '1204205574829453'
team-id: '1204205586130693'
project: '1204205585687152'
action-interfaces:
action-interface-1:
type: api-action
business-object: Card
connector-type: trello
actions:
CREATE: {}
assemblies:
assembly-1:
assembly:
execute:
- create-action:
name: Trello Add card to list
target:
$ref: '#/integration/action-interfaces/action-interface-1'
map:
mappings:
- desc:
template: '{{$Trigger.notes}}'
- idBoard:
template: 629d96c76766c513b0e82f66
- idList:
template: 629d96c76766c513b0e82f6d
- idOrganization:
template: 6087b4630e5b124b38c75386
- name:
template: '{{$Trigger.name}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
name: Add a card to a list in Trello whenever a new task is created in Asana
models: {}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: api
trigger-interfaces:
trigger-interface-1:
triggers:
createCustomer:
assembly:
$ref: '#/integration/assemblies/assembly-1'
input-context:
data: Customer
output-context:
data: Customer
retrieveCustomer:
assembly:
$ref: '#/integration/assemblies/assembly-2'
input-context:
data: Customer
output-context:
data: Customer
options:
resources:
- business-object: Customer
model:
$ref: '#/models/Customer'
triggers:
create: createCustomer
retrieve: retrieveCustomer
type: api-trigger
action-interfaces:
action-interface-1:
type: api-action
business-object: customer
connector-type: shopify
actions:
CREATE: {}
action-interface-2:
type: api-action
business-object: customer
connector-type: shopify
actions:
RETRIEVEALL: {}
action-interface-3:
type: api-action
business-object: customers
connector-type: square
actions:
CREATE: {}
assemblies:
assembly-1:
assembly:
execute:
- create-action:
name: Shopify Create customer
target:
$ref: '#/integration/action-interfaces/action-interface-1'
map:
mappings:
- email:
template: '{{$Request.email}}'
- first_name:
template: '{{$Request.first_name}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Request
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
- response:
name: response-1
reply-maps:
- title: Customer successfully created
status-code: '200'
map:
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Request
$ref: '#/trigger/payload'
- variable: ShopifyCreatecustomer
$ref: '#/node-output/Shopify Create customer/response/payload'
- variable: flowDetails
$ref: '#/flowDetails'
mappings:
- id:
expression: '$ShopifyCreatecustomer.id '
input:
- variable: Request
$ref: '#/trigger/payload'
- variable: ShopifyCreatecustomer
$ref: '#/node-output/Shopify Create customer/response/payload'
- variable: flowDetails
$ref: '#/flowDetails'
assembly-2:
assembly:
execute:
- retrieve-action:
name: Shopify Retrieve customers
target:
$ref: '#/integration/action-interfaces/action-interface-2'
filter:
where:
id: '{{$api.id}}'
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: flowDetails
$ref: '#/flowDetails'
limit: 10
allow-truncation: true
pagination-type: TOKEN
allow-empty-output: false
- create-action:
name: Square Create customer
target:
$ref: '#/integration/action-interfaces/action-interface-3'
map:
mappings:
- email_address:
template: '{{$ShopifyRetrievecustomers.email}}'
- given_name:
template: '{{$ShopifyRetrievecustomers.first_name}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: ShopifyRetrievecustomers
$ref: '#/node-output/Shopify Retrieve customers/response/payload'
- variable: ShopifyRetrievecustomersMetadata
$ref: '#/node-output/Shopify Retrieve customers/response'
- variable: flowDetails
$ref: '#/flowDetails'
- response:
name: response-1
reply-maps:
- title: Customer successfully retrieved
status-code: '$ShopifyRetrievecustomersMetadata."status-code" '
map:
$map: http://ibm.com/appconnect/map/v1
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: ShopifyRetrievecustomers
$ref: >-
#/node-output/Shopify Retrieve
customers/response/payload
- variable: ShopifyRetrievecustomersMetadata
$ref: '#/node-output/Shopify Retrieve customers/response'
- variable: SquareCreatecustomer
$ref: '#/node-output/Square Create customer/response/payload'
- variable: flowDetails
$ref: '#/flowDetails'
mappings:
- id:
expression: '$SquareCreatecustomer.customer_id '
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: ShopifyRetrievecustomers
$ref: >-
#/node-output/Shopify Retrieve
customers/response/payload
- variable: ShopifyRetrievecustomersMetadata
$ref: '#/node-output/Shopify Retrieve customers/response'
- variable: flowDetails
$ref: '#/flowDetails'
name: Create a customer in Square when a customer is created in Shopify
models:
Customer:
name: Customer
properties:
first_name:
required: false
id: false
type: string
id:
required: false
id: true
type: number
email:
required: false
id: false
type: string
plural: Customer
description: ' '
operations:
create: '#/integration/assemblies/assembly-1'
retrieve: '#/integration/assemblies/assembly-2'
methods: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
$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: hour
value: 1
runOnceOncheck: true
days:
- MON
- TUE
- WED
- THU
- FRI
- SAT
- SUN
timeZone: UTC
action-interfaces:
action-interface-1:
type: api-action
business-object: Event
connector-type: eventbrite
actions:
RETRIEVEALL: {}
action-interface-2:
type: api-action
business-object: Folder
connector-type: box
actions:
CREATE: {}
assemblies:
assembly-1:
assembly:
execute:
- retrieve-action:
name: Eventbrite Retrieve events
target:
$ref: '#/integration/action-interfaces/action-interface-1'
filter:
where:
and:
- status: New
- organizationID: '344797520005'
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
limit: 10
allow-truncation: true
pagination-type: SKIP_LIMIT
allow-empty-output: true
- for-each:
name: For each
assembly:
$ref: '#/integration/assemblies/assembly-2'
source:
expression: '$EventbriteRetrieveevents '
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: EventbriteRetrieveevents
$ref: '#/node-output/Eventbrite Retrieve events/response/payload'
- variable: EventbriteRetrieveeventsMetadata
$ref: '#/node-output/Eventbrite Retrieve events/response'
- variable: flowDetails
$ref: '#/flowDetails'
mode: sequential
continue-on-error: true
map:
$map: http://ibm.com/appconnect/map/v1
mappings: []
display-name: Eventbrite Event
assembly-2:
assembly:
execute:
- create-action:
name: Box Create folder
target:
$ref: '#/integration/action-interfaces/action-interface-2'
map:
mappings:
- name:
template: '{{$Foreachitem.name.html}}'
- parent_id:
template: '0'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: Trigger
$ref: '#/trigger/payload'
- variable: EventbriteRetrieveevents
$ref: '#/node-output/Eventbrite Retrieve events/response/payload'
- variable: EventbriteRetrieveeventsMetadata
$ref: '#/node-output/Eventbrite Retrieve events/response'
- variable: flowDetails
$ref: '#/flowDetails'
name: Create a folder in Box for each event retrieved from Eventbrite
models: {}
Loading

0 comments on commit ca786d6

Please sign in to comment.