diff --git a/resources/Create a comment in Front for each updated deal in HubSpot CRM.yaml b/resources/Create a comment in Front for each updated deal in HubSpot CRM.yaml new file mode 100644 index 000000000..6f3cb7b35 --- /dev/null +++ b/resources/Create a comment in Front for each updated deal in HubSpot CRM.yaml @@ -0,0 +1,218 @@ +$integration: http://ibm.com/appconnect/integration/v2/integrationFile +integration: + type: api + trigger-interfaces: + trigger-interface-1: + triggers: + retrieveHubspot: + assembly: + $ref: '#/integration/assemblies/assembly-1' + input-context: + data: retrieveHubspot + output-context: + data: retrieveHubspot + options: + resources: + - business-object: hubspot + triggers: + retrieve: retrieveHubspot + model: + $ref: '#/models/hubspot' + type: api-trigger + action-interfaces: + action-interface-1: + type: api-action + business-object: getCrmV3ObjectsDeals_model + connector-type: hubspotcrm + actions: + RETRIEVEALL: {} + action-interface-3: + type: api-action + business-object: postConversationsByIdComments_model + connector-type: front + actions: + postConversationsByIdComments: {} + action-interface-2: + type: api-action + business-object: patchCrmV3ObjectsDealsByDealId_model + connector-type: hubspotcrm + actions: + patchCrmV3ObjectsDealsByDealId: {} + assemblies: + assembly-1: + assembly: + execute: + - retrieve-action: + allow-empty-output: true + allow-truncation: true + name: HubSpot CRM Retrieve all deals + target: + $ref: '#/integration/action-interfaces/action-interface-1' + filter: + limit: 10 + - for-each: + map: + $map: http://ibm.com/appconnect/map/v1 + customSchemas: + properties.`output`: + type: object + properties: + name: + type: string + input: + - variable: HubSpotCRMRetrievealldeals + $ref: >- + #/node-output/HubSpot CRM Retrieve all + deals/response/payload + - variable: HubSpotCRMRetrievealldealsMetadata + $ref: '#/node-output/HubSpot CRM Retrieve all deals/response' + - variable: HubSpotCRMRetrievedealsbyfilters + $ref: >- + #/block/For each/node-output/HubSpot CRM Retrieve deals by + filters/response/payload + - variable: HubSpotCRMRetrievedealsbyfiltersMetadata + $ref: >- + #/block/For each/node-output/HubSpot CRM Retrieve deals by + filters/response + - variable: FrontCreatecomment + $ref: >- + #/block/For each/node-output/Front Create + comment/response/payload + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: flowDetails + $ref: '#/flowDetails' + mappings: + - output: + mappings: + - name: + template: '{{$FrontCreatecomment.body}}' + source: + expression: '$HubSpotCRMRetrievealldeals ' + input: + - variable: HubSpotCRMRetrievealldeals + $ref: >- + #/node-output/HubSpot CRM Retrieve all + deals/response/payload + - variable: HubSpotCRMRetrievealldealsMetadata + $ref: '#/node-output/HubSpot CRM Retrieve all deals/response' + - variable: flowDetails + $ref: '#/flowDetails' + - variable: api + $ref: '#/trigger/api/parameters' + mode: sequential + continue-on-error: true + name: For each + assembly: + $ref: '#/integration/assemblies/assembly-2' + display-name: HubSpot CRM deal + - response: + name: response + reply-maps: + - title: hubspot successfully retrieved + status-code: 200 + map: + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: HubSpotCRMRetrievealldeals + $ref: >- + #/node-output/HubSpot CRM Retrieve all + deals/response/payload + - variable: HubSpotCRMRetrievealldealsMetadata + $ref: '#/node-output/HubSpot CRM Retrieve all deals/response' + - variable: Foreach + $ref: '#/node-output/For each/response/payload' + - variable: flowDetails + $ref: '#/flowDetails' + - variable: api + $ref: '#/trigger/api/parameters' + mappings: + - name: + template: '{{$Foreach.output.name}}' + assembly-2: + assembly: + execute: + - custom-action: + action: patchCrmV3ObjectsDealsByDealId + name: HubSpot CRM Update deal + target: + $ref: '#/integration/action-interfaces/action-interface-2' + map: + mappings: + - properties: + mappings: + - hs_analytics_source: + template: ORGANIC_SEARCH + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: HubSpotCRMRetrievealldeals + $ref: >- + #/node-output/HubSpot CRM Retrieve all + deals/response/payload + - variable: HubSpotCRMRetrievealldealsMetadata + $ref: '#/node-output/HubSpot CRM Retrieve all deals/response' + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: flowDetails + $ref: '#/flowDetails' + - variable: api + $ref: '#/trigger/api/parameters' + filter: + where: + id: '{{$HubSpotCRMRetrievealldeals.id}}' + input: + - variable: HubSpotCRMRetrievealldeals + $ref: >- + #/node-output/HubSpot CRM Retrieve all + deals/response/payload + - variable: HubSpotCRMRetrievealldealsMetadata + $ref: '#/node-output/HubSpot CRM Retrieve all deals/response' + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: flowDetails + $ref: '#/flowDetails' + - variable: api + $ref: '#/trigger/api/parameters' + allow-empty-output: true + - custom-action: + action: postConversationsByIdComments + name: Front Create comment + target: + $ref: '#/integration/action-interfaces/action-interface-3' + map: + mappings: + - body: + template: '{{$HubSpotCRMRetrievealldeals.id}}' + - id: + template: cnv_1b64fqos + $map: http://ibm.com/appconnect/map/v1 + input: + - variable: HubSpotCRMRetrievealldeals + $ref: >- + #/node-output/HubSpot CRM Retrieve all + deals/response/payload + - variable: HubSpotCRMRetrievealldealsMetadata + $ref: '#/node-output/HubSpot CRM Retrieve all deals/response' + - variable: HubSpotCRMUpdatedeal + $ref: >- + #/block/For each/node-output/HubSpot CRM Update + deal/response/payload + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: flowDetails + $ref: '#/flowDetails' + - variable: api + $ref: '#/trigger/api/parameters' + name: Create a comment in Front for each updated deal in HubSpot CRM +models: + hubspot: + name: hubspot + plural: hubspot + properties: + name: + required: false + id: true + type: string + operations: + retrieve: '#/integration/assemblies/assembly-1' + description: '' diff --git a/resources/Create a message in Front for each new contact added to Front from a sheet in Google Sheets.yaml b/resources/Create a message in Front for each new contact added to Front from a sheet in Google Sheets.yaml new file mode 100644 index 000000000..b90bbaa9a --- /dev/null +++ b/resources/Create a message in Front for each new contact added to Front from a sheet in Google Sheets.yaml @@ -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: Contact in Google Sheets rows + - 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: '["cct@gmail.com"]' + $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 a message in Front for each new contact added to Front from a sheet in Google Sheets +models: {} diff --git a/resources/Create a message in Front for each new contact added to a contact list in HubSpot Marketing.yaml b/resources/Create a message in Front for each new contact added to a contact list in HubSpot Marketing.yaml new file mode 100644 index 000000000..a77c8df6a --- /dev/null +++ b/resources/Create a message in Front for each new contact added to a contact list in HubSpot Marketing.yaml @@ -0,0 +1,124 @@ +$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: true + days: + - MON + - TUE + - WED + - THU + - FRI + - SAT + - SUN + timeZone: UTC + action-interfaces: + action-interface-3: + type: api-action + business-object: postChannelsByChannelIdMessages_model + connector-type: front + actions: + postChannelsByChannelIdMessages: {} + action-interface-1: + type: api-action + business-object: getContactsV1Lists_model + connector-type: hubspotmarketing + actions: + RETRIEVEALL: {} + assemblies: + assembly-1: + assembly: + execute: + - retrieve-action: + allow-empty-output: true + allow-truncation: true + name: HubSpot Marketing Retrieve contact lists + target: + $ref: '#/integration/action-interfaces/action-interface-1' + filter: + limit: 10 + - for-each: + map: + $map: http://ibm.com/appconnect/map/v1 + customSchemas: + properties.`output`: + type: object + properties: + email: + type: string + input: + - variable: GoogleGroupsRetrievegroups + $ref: >- + #/node-output/Google Groups Retrieve + groups/response/payload + - variable: GoogleGroupsRetrievegroupsMetadata + $ref: '#/node-output/Google Groups Retrieve groups/response' + - variable: GoogleGroupsRetrievemembers + $ref: >- + #/node-output/Google Groups Retrieve + members/response/payload + - variable: GoogleGroupsRetrievemembersMetadata + $ref: '#/node-output/Google Groups Retrieve members/response' + - variable: FrontCreateMessage + $ref: >- + #/block/For each/node-output/Front Create + Message/response/payload + - variable: Foreachitem + $ref: '#/block/For each/current-item' + - variable: flowDetails + $ref: '#/flowDetails' + mappings: [] + source: + expression: '$HubSpotMarketingRetrievecontactlists ' + 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: HubSpot Marketing contact list + assembly-2: + assembly: + execute: + - custom-action: + action: postChannelsByChannelIdMessages + name: Front Create Message + target: + $ref: '#/integration/action-interfaces/action-interface-3' + map: + mappings: + - body: + template: '{{$HubSpotMarketingRetrievecontactlists}}' + - channel_id: + template: cha_g4xwc + - to: + expression: '["cct@gmail.com"]' + $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: Create a message in Front for each new contact added to a contact list in HubSpot Marketing +models: {} diff --git a/resources/markdown/Create a comment in Front for each updated deal in HubSpot CRM_instructions.md b/resources/markdown/Create a comment in Front for each updated deal in HubSpot CRM_instructions.md new file mode 100644 index 000000000..65143f923 --- /dev/null +++ b/resources/markdown/Create a comment in Front for each updated deal in HubSpot CRM_instructions.md @@ -0,0 +1,10 @@ +To refer to these instructions while editing the flow, open [the GitHub page](Create%20a%20comment%20in%20Front%20for%20each%20updated%20deal%20in%20HubSpot%20CRM_instructions) (opens in a new window). + +1. Click **Use this template** to start using the template. +2. Connect to the following accounts by using your credentials: + - [HubSpot CRM](http://ibm.biz/achubspotcrm) + - [Front] (http://ibm.biz/acfront) +3. To start the flow, in the banner click **Start flow**. + +Use this flow to create a comment in Front for each updated deal in HubSpot CRM. +For more information about using an API 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). diff --git a/resources/markdown/Create a message in Front for each new contact added to Front from a sheet in Google Sheets_instructions.md b/resources/markdown/Create a message in Front for each new contact added to Front from a sheet in Google Sheets_instructions.md new file mode 100644 index 000000000..867e158af --- /dev/null +++ b/resources/markdown/Create a message in Front for each new contact added to Front from a sheet in Google Sheets_instructions.md @@ -0,0 +1,9 @@ +To refer to these instructions while editing the flow, open [the GitHub page](https://github.com/ot4i/app-connect-templates/blob/main/resources/markdown/Create%20a%20message%20in%20Front%20for%20each%20new%20contact%20added%20to%20Front%20from%20a%20sheet%20in%20Google%20Sheets_instructions) (opens in a new window). + +1. Click **Use this template** to start using the template. +2. Connect to the following accounts by using your credentials: + - [Google Sheets] (http://ibm.biz/acgsheets) + - [Front] (http://ibm.biz/acfront) +3. To start the flow, in the banner click **Start flow**. + +Use this flow to create a message in Front for each new contact added to Front from a sheet in Google Sheets. diff --git a/resources/markdown/Create a message in Front for each new contact added to a contact list in HubSpot Marketing_instructions.md b/resources/markdown/Create a message in Front for each new contact added to a contact list in HubSpot Marketing_instructions.md new file mode 100644 index 000000000..4f37d2357 --- /dev/null +++ b/resources/markdown/Create a message in Front for each new contact added to a contact list in HubSpot Marketing_instructions.md @@ -0,0 +1,9 @@ +To refer to these instructions while editing the flow, open [the GitHub page](https://github.com/ot4i/app-connect-templates/blob/main/resources/markdown/Create%20a%20message%20in%20Front%20for%20each%20new%20contact%20added%20to%20a%20contact%20list%20in%20HubSpot%20Marketing_instructions.md) (opens in a new window). + +1. Click **Use this template** to start using the template. +2. Connect to the following accounts by using your credentials: + - [HubSpot Marketing] (https://ibm.biz/achubspotmarketing) + - [Front] (https://ibm.biz/acfront) +3. To start the flow, in the banner click **Start flow**. + +Use this flow to create a message in Front for each new contact added to a contact list in HubSpot Marketing. diff --git a/resources/template-metadata.json b/resources/template-metadata.json index 161154753..c6f1a9894 100644 --- a/resources/template-metadata.json +++ b/resources/template-metadata.json @@ -3715,6 +3715,33 @@ "targetApps": ["shopify", "zohoinventory"], "tags": ["streaming-connector-scheduler", "shopify", "zohoinventory", "if", "foreach", "log", "setVariable"], "offerings": ["app connect professional"] +}, +{ + "name": "Create a message in Front for each new contact added to Front from a sheet in Google Sheets", + "description": "Use this template to create a message in Front for each new contact added to Front from a sheet in Google Sheets.", + "summary": "Scheduler to 2 applications", + "sourceApp": "streaming-connector-scheduler", + "targetApps": ["googlesheet", "front"], + "tags": ["streaming-connector-scheduler", "front", "googlesheet", "foreach"], + "offerings": ["app connect professional"] +}, +{ + "name": "Create a comment in Front for each updated deal in HubSpot CRM", + "description": "Use this template to create a comment in Front for each updated deal in HubSpot CRM.", + "summary": "1 flow using 2 applications", + "sourceApp": "api", + "targetApps": ["hubspotcrm", "front"], + "tags": ["api", "hubspotcrm", "front", "foreach"], + "offerings": ["app connect professional"] +}, +{ + "name": "Create a message in Front for each new contact added to a contact list in HubSpot Marketing", + "description": "Use this template to create a message in Front for each new contact added to a contact list in HubSpot Marketing.", + "summary": "Scheduler to 2 applications", + "sourceApp": "streaming-connector-scheduler", + "targetApps": ["hubspotmarketing", "front"], + "tags": ["streaming-connector-scheduler", "front", "hubspotmarketing", "foreach"], + "offerings": ["app connect professional"] } ] -} +} \ No newline at end of file