Hi Jon,
This is what I'm currently running, utilizing your snipper, but with the flow type and language changed:
'use strict'
const architectScripting = require('purecloud-flow-scripting-api-sdk-javascript');
const clientId = 'CLIENTIDHERE';
const clientSecret = 'CLIENTSECRETHERE';
const clientIsClientCredentials = true; // set to false if using an OAuth client that has a code authorization grant instead of client credentials grant.
const archEnums = architectScripting.enums.archEnums;
const archSession = architectScripting.environment.archSession;
// --------------------------------------------------------------------------------
// This function will be what is called by Architect Scripting since it is
// specified in the start call at the bottom.
// --------------------------------------------------------------------------------
async function doWork(scriptSession) {
const scriptingFlowFactory = architectScripting.factories.archFactoryFlows; // Factory to create flows
// Import the flow
return scriptingFlowFactory.createFlowInboundCallAsync('AJCreateFlow3', 'Using forum method', architectScripting.languages.archLanguages.englishUnitedKingdom, (archInboundChat) => {
return archInboundChat.importFromFileAsync("d:\\temp\\flowout\\AJ Test_v1-0.i3InboundFlow", () => {
return archInboundChat.publishAsync();
});
});
}
// This will start off the Architect Scripting code and call the doWork function
archSession.startWithClientIdAndSecret(archEnums.LOCATIONS.prod_us_east_1, doWork, clientId, clientSecret, void 0, clientIsClientCredentials);
Thanks,
Austen