Return last record when executing manually

This commit is contained in:
ricardo 2020-11-14 20:21:41 -05:00
parent fd1897a288
commit fe97bf6619

View file

@ -137,6 +137,11 @@ export class AirtableTrigger implements INodeType {
qs.filterByFormula = `AND(${qs.filterByFormula}, ${additionalFields.formula})`;
}
if (this.getMode() === 'manual') {
delete qs.filterByFormula;
qs.maxRecords = 1;
}
const { records } = await apiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
webhookData.lastTimeChecked = endDate;