Hi,
I’m experimenting with the Salesforce connector and have fallen at the first hurdle…
I have managed to connect up to Salesforce and can request a list of Accounts that come back from Salesforce (all good so far), but as soon as I specify a conditional field using the LastModifiedDate field, I get an odd error message back from Salesforce, which I can’t see how to overcome.
Here is a screenshot of the error:
The critical error message is
“description”: " LastModifiedDate FROM Account WHERE LastModifiedDate>=‘2021-12-13T00:00:00.000+0000’ ^ ERROR at Row:1:Column:44 value of filter criterion for field ‘LastModifiedDate’ must be of type dateTime and should not be enclosed in quotes"
I’m not enclosing the timestamp in quotes, so how do I overcome this? I’ve also followed the tooltip guidance to use an expression.
Flow is below.
Thanks
Scott
{
“name”: “TEST SALESFORCE”,
“nodes”: [
{
“parameters”: {},
“name”: “Start”,
“type”: “n8n-nodes-base.start”,
“typeVersion”: 1,
“position”: [
240,
300
]
},
{
“parameters”: {
“resource”: “account”,
“operation”: “getAll”,
“options”: {
“fields”: “LastModifiedDate”,
“conditionsUi”: {
“conditionValues”: [
{
“field”: “LastModifiedDate”,
“operation”: “>=”,
“value”: “={{$json["modifiedTimestamp"]}}”
}
]
}
}
},
“name”: “Salesforce”,
“type”: “n8n-nodes-base.salesforce”,
“typeVersion”: 1,
“position”: [
680,
300
],
“credentials”: {
“salesforceOAuth2Api”: {
“id”: “8”,
“name”: “Salesforce account 2”
}
}
},
{
“parameters”: {
“values”: {
“string”: [
{
“name”: “modifiedTimestamp”,
“value”: “2021-12-13T00:00:00.000Z”
}
]
},
“options”: {}
},
“name”: “Set”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 1,
“position”: [
460,
300
]
}
],
“connections”: {
“Start”: {
“main”: [
[
{
“node”: “Set”,
“type”: “main”,
“index”: 0
}
]
]
},
“Salesforce”: {
“main”: [
]
},
“Set”: {
“main”: [
[
{
“node”: “Salesforce”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: false,
“settings”: {},
“id”: 15
}