I can't properly use dynamic tokens in Apify enrichment in this table. The problem is originated at the end of the "Input Data" field, in the "site" key-value pair. When I hardcode a url as value (using quotes), integration works, and triggers the actor. When I try to insert a url dynamically from my table (without quotes), it fails to run with the usual: { "error": { "type": "invalid-input", "message": "Cannot parse input JSON body: Bad control character in string literal in JSON at position 300 (line 11 column 26)" } } I am aware that the key should be in quotes, but not the value. I have tried to input [/website] (cf screenshot), {{##website}}, but can't find the right format. Can you help?
For dynamic tokens in Apify's Input Data field, you need quotes around the token itself when it's a string value. The correct format is:
{
"site": "/website"
}Could you copy and paste your current JSON from the Input Data field so I can help troubleshoot the exact formatting issue?
If you still need help with formatting your JSON input for the Apify enrichment, I’m here to assist. Would you like to share the exact JSON you’re using so we can troubleshoot it together?
{ "aiMode": "aiModeOff", "countryCode": "fr", "focusOnPaidAds": false, "forceExactMatch": false, "includeIcons": false, "includeUnfilteredResults": false, "maxPagesPerQuery": 10, "maximumLeadsEnrichmentRecords": 0, "mobileResults": false, "queries": "\"SOC 2\" \"ISO 27001\"", "resultsPerPage": 10, "saveHtml": false, "saveHtmlToKeyValueStore": true, "site": #{{website}} }
The issue is that string values in JSON must be wrapped in quotes. Your current format "site": ##{{website}} is missing quotes around the dynamic token.
Change it to:
"site": "##{{website}}"Did that answer your question?
Yes, that's correct! For string values in Apify's Input Data, you need quotes around dynamic tokens.
Change your JSON from:
"site": ##{{website}}To:
"site": "##{{website}}"Did that answer your question?
I input:
"site": "##{{website}}"but got the same error message.
The issue is you're using three hash symbols (###) instead of two (##). The correct format for Apify dynamic tokens is:
"site": "##{{website}}"
Could you copy and paste your complete JSON from the Input Data field so I can verify the formatting is correct throughout?
can u share screenshot Denis S. of input in its current state
I can't share screenshots, but I can help troubleshoot your Apify JSON formatting issue.
Based on our conversation, you should use:
"site": "##{{website}}"Make sure you're using exactly two hash symbols (##) before the curly braces, not three (###). [1]
Could you copy and paste your complete JSON from the Input Data field so I can verify the formatting throughout?
Perfect! I can see the issue in your screenshot. You're using three hash symbols (###) instead of two (##), and single curly braces instead of double curly braces.
Change this:
"site": "###{website}"To this:
"site": "##{{website}}"Did that answer your question?
