mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
✨ Intercom node
This commit is contained in:
@@ -27,9 +27,6 @@ export async function intercomApiRequest(this: IHookFunctions | IExecuteFunction
|
||||
json: true
|
||||
};
|
||||
|
||||
console.log(options)
|
||||
|
||||
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
} catch (error) {
|
||||
@@ -43,3 +40,13 @@ export async function intercomApiRequest(this: IHookFunctions | IExecuteFunction
|
||||
throw error.response.body;
|
||||
}
|
||||
}
|
||||
|
||||
export function validateJSON(json: string | undefined): any { // tslint:disable-line:no-any
|
||||
let result;
|
||||
try {
|
||||
result = JSON.parse(json!);
|
||||
} catch (exception) {
|
||||
result = '';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user