Skip to content

Commit

Permalink
Usecase added for hunter (#440)
Browse files Browse the repository at this point in the history
* Added usecase templates for hunter

* Removed account names

* Removed account names

* Removed account names

* Added templates to template-metadata.json

* updated template-metdata

* updates template.json

* update changes

* Add files via upload

* removed wrong template

* Added template for usecase 2

* removed account name for usecase

* Instructions added for usecase1

* Added instructions for usecase2

* Instructions added for usecase3

* namespace for email domain updated

* Renamed file for usecase1

* Renamed instructions file for usecase1

* Updated template-metadata.json with new names

* Renamed Usecase 3

* Renamed instructions file for usecase3

* Renamed instructions file for usecase2

* Renamed file name for usecase2

* Update Create a payment reminder in Mailchimp for unpaid attendee emails found using Hunter_instructions.md

* Update Create a payment reminder in Mailchimp for unpaid attendee emails found using Hunter_instructions.md

* Removed unwanted file

* Added usecase 3 template after changes

* added changes after review

* Update Create a payment reminder in Mailchimp for unpaid attendee emails found using Hunter_instructions.md

* Update template-metadata.json

* Corrections

---------

Co-authored-by: Neena P K <[email protected]>
Co-authored-by: Neena P K <[email protected]>
Co-authored-by: ireneapeter <[email protected]>
Co-authored-by: Deepak Ayilliath <[email protected]>
  • Loading branch information
5 people authored Jun 19, 2024
1 parent 65f60aa commit f475643
Show file tree
Hide file tree
Showing 7 changed files with 497 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: trigger-action
trigger-interfaces:
trigger-interface-1:
type: event-trigger
connector-type: googlecalendar
triggers:
CREATED_POLLER:
assembly:
$ref: '#/integration/assemblies/assembly-1'
input-context:
data: events
options:
id: >-
1613fb94cacd7125e02bd8ab30e30758c1e09f668f071572ffe45ea8e7f5fe8e@group.calendar.google.com
parentFilter:
id: >-
1613fb94cacd7125e02bd8ab30e30758c1e09f668f071572ffe45ea8e7f5fe8e@group.calendar.google.com
subscription:
pollingInterval: 5
action-interfaces:
action-interface-1:
type: api-action
business-object: postV2CampaignsByIdRecipients_model
connector-type: hunter
actions:
postV2CampaignsByIdRecipients: {}
assemblies:
assembly-1:
assembly:
execute:
- for-each:
map:
$map: http://ibm.com/appconnect/map/v1
mappings: []
source:
expression: '$Trigger.attendees '
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: flowDetails
$ref: '#/flowDetails'
mode: sequential
continue-on-error: true
name: For each
assembly:
$ref: '#/integration/assemblies/assembly-2'
display-name: Google Calendar invitees
assembly-2:
assembly:
execute:
- if:
branch:
- condition:
or:
- '{{$Foreachitem.responseStatus}}': accepted
- '{{$Foreachitem.responseStatus}}': tentative
execute: []
else:
execute: []
completion-action:
terminate:
error:
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: flowDetails
$ref: '#/flowDetails'
message: The Lead is ineligible to be included in the campaign
status-code: 400
name: If
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: flowDetails
$ref: '#/flowDetails'
- custom-action:
action: postV2CampaignsByIdRecipients
name: Hunter Add recipient to a campaign
target:
$ref: '#/integration/action-interfaces/action-interface-1'
map:
mappings:
- emails:
expression: '[$Foreachitem.email]'
- id:
template: '513693'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: Trigger
$ref: '#/trigger/payload'
- variable: Foreachitem
$ref: '#/block/For each/current-item'
- variable: flowDetails
$ref: '#/flowDetails'
name: Add recipients to a campaign using Hunter when a Google Calendar event is scheduled
models: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: api
trigger-interfaces:
trigger-interface-1:
triggers:
retrieveallCustomer:
assembly:
$ref: '#/integration/assemblies/assembly-1'
input-context:
data: Customer
output-context:
data: Customer
options:
resources:
- business-object: Customer
model:
$ref: '#/models/Customer'
triggers:
retrieveall: retrieveallCustomer
type: api-trigger
action-interfaces:
action-interface-2:
type: api-action
business-object: Members
connector-type: mailchimp
actions:
CREATE: {}
action-interface-3:
type: api-action
business-object: Campaigns
connector-type: mailchimp
actions:
CREATE: {}
action-interface-1:
type: api-action
business-object: getV2EmailFinder_model
connector-type: hunter
actions:
getV2EmailFinder: {}
assemblies:
assembly-1:
assembly:
execute:
- custom-action:
action: getV2EmailFinder
name: Hunter Find email
target:
$ref: '#/integration/action-interfaces/action-interface-1'
map:
$map: http://ibm.com/appconnect/map/v1
mappings: []
input:
- variable: flowDetails
$ref: '#/flowDetails'
- variable: api
$ref: '#/trigger/api/parameters'
filter:
where:
and:
- domain: '{{$api.where.Domain}}'
- first_name: '{{$api.where.FirstName}}'
- last_name: '{{$api.where.LastName}}'
input:
- variable: flowDetails
$ref: '#/flowDetails'
- variable: api
$ref: '#/trigger/api/parameters'
- create-action:
name: MailChimp Add subscriber to a list
target:
$ref: '#/integration/action-interfaces/action-interface-2'
map:
mappings:
- email_address:
template: '{{$HunterFindemail.data.email}}'
- list_id:
template: b979eddef3
- merge_fields:
mappings:
- FNAME:
template: '{{$HunterFindemail.data.first_name}}'
- LNAME:
template: '{{$HunterFindemail.meta.params.last_name}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: HunterFindemail
$ref: '#/node-output/Hunter Find email/response/payload'
- variable: flowDetails
$ref: '#/flowDetails'
- variable: api
$ref: '#/trigger/api/parameters'
- create-action:
name: MailChimp Create campaign
target:
$ref: '#/integration/action-interfaces/action-interface-3'
map:
mappings:
- list_id:
template: b979eddef3
- settings:
mappings:
- from_name:
template: Event Coordinator
- subject_line:
template: Reminder for payment
- title:
template: Payment Due
- type:
template: regular
$map: http://ibm.com/appconnect/map/v1
input:
- variable: HunterFindemail
$ref: '#/node-output/Hunter Find email/response/payload'
- variable: MailChimpAddsubscribertoalist
$ref: >-
#/node-output/MailChimp Add subscriber to a
list/response/payload
- variable: flowDetails
$ref: '#/flowDetails'
- variable: api
$ref: '#/trigger/api/parameters'
- response:
name: response-1
reply-maps:
- title: Customer successfully retrieved
status-code: 200
map:
mappings:
- Customer:
foreach:
input: '[0]'
iterator: CustomerItem
mappings:
- Domain:
template: '{{$Hunter10EmailFinder.data.domain}}'
- Email:
template: '{{$Hunter10EmailFinder.data.email}}'
- FirstName:
template: '{{$Hunter10EmailFinder.data.first_name}}'
- LastName:
template: '{{$Hunter10EmailFinder.data.last_name}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: Hunter10EmailFinder
$ref: '#/node-output/Hunter1.0 Email Finder/response/payload'
- variable: Hunter10EmailFinderMetadata
$ref: '#/node-output/Hunter1.0 Email Finder/response'
- variable: flowDetails
$ref: '#/flowDetails'
input: []
name: Create a payment reminder in Mailchimp for unpaid attendee emails found using Hunter
models:
Customer:
name: Customer
properties:
Domain:
required: false
id: false
type: string
Email:
required: false
id: true
type: string
FirstName:
required: false
id: false
type: string
LastName:
required: false
id: false
type: string
plural: Customer
description: ' '
operations:
retrieveall: '#/integration/assemblies/assembly-1'
interactions:
retrieveall:
pagination-type: none
filterSupport:
queryablefields:
- Domain
- FirstName
- LastName
Loading

0 comments on commit f475643

Please sign in to comment.