I’m trying to trigger mailchimp api through a serverless function & webhook from netlify forms. Cant seem to get the function to trigger. Very lost hoping i could get someone to take a look at my project. I’m new to these forms please be gentle. I can provide what ever is needed, here is my site https://recovery-roads.netlify.app
Howday @GittyHubDella, and welcome back to the community!
I reviewed your mailchimp function logs and noticed a few errors that might be contributing to the issue::
Nov 25, 11:19:20 AM: 96921e34 ERROR Invoke Error {"errorType":"SyntaxError","errorMessage":"Unexpected end of JSON input","stack":["SyntaxError: Unexpected end of JSON input"," at JSON.parse (<anonymous>)"," at exports.handler (/var/task/netlify/functions/mailchimp.js:4:27)"," at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1173:29)"]}
Nov 25, 05:05:00 PM: 52cda4e1 ERROR Error occurred: {Nov 25, 05:05:00 PM: 52cda4e1 ERROR type: 'https://mailchimp.com/developer/marketing/docs/errors/',Nov 25, 05:05:00 PM: 52cda4e1 ERROR title: 'Invalid Resource',Nov 25, 05:05:00 PM: 52cda4e1 ERROR status: 400,Nov 25, 05:05:00 PM: 52cda4e1 ERROR detail: "The resource submitted could not be validated. For field-specific details, see the 'errors' array.",Nov 25, 05:05:00 PM: 52cda4e1 ERROR instance: 'xxx',Nov 25, 05:05:00 PM: 52cda4e1 ERROR errors: [Nov 25, 05:05:00 PM: 52cda4e1 ERROR {Nov 25, 05:05:00 PM: 52cda4e1 ERROR field: 'email_address',Nov 25, 05:05:00 PM: 52cda4e1 ERROR message: 'This value should not be blank.'Nov 25, 05:05:00 PM: 52cda4e1 ERROR }Nov 25, 05:05:00 PM: 52cda4e1 ERROR ]Nov 25, 05:05:00 PM: 52cda4e1 ERROR }
Hoping that helps you narrow down the possible causes of your issue.