Scripting FileMaker Deployments and Migrations

by | Oct 1, 2024

OttoFMS and OttoDeploy make deploying and migrating your files easy. You don’t need to write any custom scripts or code; you can just use the OttoDeploy app to set everything up and initiate the deployments. But sometimes you need or want to do something different. That’s where scripting FileMaker deployments can come in handy.

Video Tutorial: Scripting FileMaker Deployments

Key Takeaways from the Video

  1. Utilizing the OttoFMS Developer API: We demonstrate how to access and use the API to trigger deployments via HTTP requests.
  2. Simplifying JSON Handling: Instead of manually constructing complex JSON, we show you how to copy deployment JSON directly from OttoDeploy. This step is crucial when you are scripting FileMaker deployments.
  3. Creating a FileMaker Script: We walk through the process of building a script in FileMaker that sends POST requests to the OttoFMS API.
  4. Flexible Deployment Conditions: This method allows you to set up custom conditions for deployments based on your specific needs.

Step-by-Step Guide

1. Accessing the Deployment JSON

One of the key steps in this process is obtaining the deployment JSON from OttoDeploy. Here’s how it looks in the interface:

OttoDeploy - How to copy deployment JSON

By using this feature, you can easily copy the necessary JSON without having to construct it manually.

2. Creating the FileMaker Script

Once you have the deployment JSON, the next step is to create a FileMaker script that will use this JSON to trigger deployments. Here’s a snapshot of the script we created in the video:

A FileMaker Script showing how to do Scripted FileMaker Deployments

This script handles everything from setting up the necessary variables to making the HTTP request and processing the response.

3. Putting It All Together

With these pieces in place, you now have a powerful tool for controlling your OttoFMS deployments. You can trigger deployments based on any conditions you can script in FileMaker—whether that’s specific days of the week, customer actions, or any other criteria relevant to your workflow.

Try scripting FileMaker deployments yourself.

Want to implement this in your own workflow? We’ve made it easy for you to get started. You can download the FileMaker file used in this demonstration here:

This file includes the basic structure and scripts to start scripting FileMaker deployments.

Coming from Otto3 and Migrator?

With OttoFMS’s predecessor, OttoV3, people often customized the Migrator.fmp12 file to construct deployments and send them with their own custom FileMaker Scripts. But since OttoDeploy is self updatable, people don’t want to do that anymore because all the changes would be lost on the next update. But if you follow the suggestions in this video, you can get that flexibility and power back.

Conclusion

By combining the power of the OttoFMS Developer API with FileMaker’s scripting capabilities, you can take complete control of your deployment process.

Happy scripting 🙂

On this page