Help

Re: JSON/Object Error Automation Between Airtable and Circle

26 0
cancel
Showing results for 
Search instead for 
Did you mean: 
sonialeu
4 - Data Explorer
4 - Data Explorer

Hello everyone,

Goal: When new or updated Record in Airtable --> Create Event in Circle

Airtable: https://airtable.com/app2Ndd4eV463aOsy/shrbaX4IOs9mGkQoP

Circle API: https://microconf-de57a9.circle.so/settings/api?page=1

 

There are 3 required fields to Map:

Name of Item --> Name of Event (Single Line field in Airtable)

Description --> Description of Event (Long Text field in Airtable)

Start Date Time --> I have tried both in Date Format and Also Single Line Field.

I have tried both Zapier and Integrately. In Zapier I get JSON error and in Integrately I get [object Object] error. I believe the Start Date Time is the error but I have tried multiple formats, ensuring it matches with Circle API and even tried converting to plain text and copied the exact same format as in Circle API (minus updating the year to the future). Not sure what I am missing. 

 

 

12 Replies 12
cathymueller777
4 - Data Explorer
4 - Data Explorer

It seems like the issue might be with the date format. Double-check that the Start Date Time matches Circle’s expected format (e.g., YYYY-MM-DDTHH:MM:SSZ) and ensure it's in the correct timezone. You could also try using Airtable’s DATETIME_FORMAT() function to format the date. If the error persists, test with a hardcoded date to isolate the issue. Let me know if this helps! Click Here for more 

cathymueller777
4 - Data Explorer
4 - Data Explorer

It seems like the issue might indeed stem from the Start Date Time format not aligning perfectly with what the Circle API expects. Circle likely requires the date-time in a specific ISO 8601 format (e.g., YYYY-MM-DDTHH:MM:SSZ), which can sometimes be tricky to match precisely.

Here are a few suggestions to troubleshoot and resolve this:

  1. Verify the Date-Time Format: Check Circle API documentation to confirm the exact date-time format required. If ISO 8601 is required, ensure Airtable's field or a calculated formula outputs in that format.

  2. Format Conversion in Zapier/Integrately: Use built-in tools to transform the date-time into the correct format. For example, in Zapier:

    • Add a Formatter step.
    • Choose "Date/Time" and convert the field into the expected ISO 8601 format.
  3. Test with a Static Example: Manually input a hardcoded date-time in the payload in Zapier or Integrately to confirm whether the issue is related to the formatting or the API itself.

  4. Inspect the Payload: Check the raw JSON payload sent to Circle to see how Zapier/Integrately is handling the date-time field. Look for formatting mismatches or unexpected objects being passed.

  5. Circle API Endpoint Testing: Use a tool like Postman to test the API manually with a sample payload. If it works there, the issue likely lies in how Zapier/Integrately is parsing the data.

  6. Fallback Options: If all else fails, consider using a custom script or webhook to handle the API integration, giving you full control over the payload and format.

david263
4 - Data Explorer
4 - Data Explorer

To automate the handling of JSON or object errors between Airtable and Circle (assuming CircleCI), you would generally want to set up proper error logging and automated actions when errors occur during   interactions. Here's how you can approach this:

Common Scenarios:

  • Airtable API: Sending requests to Airtable (for example, to update records) and receiving a JSON response that might contain errors.
  • CircleCI API: Interfacing with CircleCI's API to trigger jobs, fetch build statuses, etc., and receiving error responses when something goes wrong.

General Workflow for Handling JSON/Object Errors

  1. Send Data to Airtable or CircleCI: This could be through a custom script, API integration, or automation platform like Zapier/Integromat.
  2. Handle API Responses:
    • Both Airtable and CircleCI APIs typically return JSON responses, so check the status code and validate the response format.
    • Look for any error key or specific error codes in the JSON response.
  3. Log or Notify on Error:
    • When an error is detected in the JSON response, log it, send an alert, or trigger a retry.
    • You could send notifications (via Slack, email, or another service) in case of an error.
  4. Retry or Rollback: If it's an issue that can be retried, implement a retry mechanism with exponential backoff. If the error is non-recoverable, perform a rollback or alert the team.

Example Use Case: Automating Airtable and CircleCI with Error Handling

  1. Airtable Integration:

    • Make an API call to Airtable to update or add records.
    • Validate the JSON response to ensure no errors exist.
  2. CircleCI Integration:

    • Trigger a CircleCI job using their API (POST request).
    • Check the status of the job after the request to see if it succeeded or failed.