Getting Started

You'll be up and running with Fusebit in 5 minutes!

Welcome to Fusebit!

Our product enables developers like you to quickly add integrations to an application using powerful API building blocks. It takes away the pain of developing against many disparate APIs while maintaining the flexibility and familiarity of a code-first platform. Just like Stripe solves payments for application developers, Fusebit solves integrations.

Create an Integration

An IntegrationIntegration - An integration is the place the you write your code to get things done! Written in NodeJS, an integration runs in Fusebit's secure and scalable environment to translate between the needs of your backend application and the remote service or services you're connecting to. in Fusebit corresponds to a specific task (or set of tasks) you want your application's users to be able to perform against the third-party system. An example might be a chatbot that shares updates via Slack or a task synchronizer that reflects the status of tasks to Jira issues.

The integration may have already been created for you when you create your Fusebit account, but if not, let's get started:

  1. Go to Fusebit Management PortalFusebit Management Portal - The Fusebit Management Portal enables you to easily setup and manage all your integrations in one place. Link: https://manage.fusebit.io
  2. Select New Integration
  3. Pick Slack Bot from the list and override the Name property to specify your own name
  1. Select Create

Run the Integration

Once the Integration has been created, you can modify its business logic. Most Integrations are created with some simple "hello world" or test functionality, that you will want to override to fit your use case.

  1. Once you create an Integration or select an existing one, you will see its detail screen. Select Edit in the middle column
  1. This is the Fusebit Editor, which shows you the business logic running inside your Integration. Integration logic is written in JavaScript and runs within a Node.js environment. For more information, see Integration Programming Model.
  2. You can run the integration by pressing the Run button to see what it does.

You will be prompted to authorize Fusebit's testing application to a Slack workspace to use for demonstration purposes.

As the integration runs, you will see output in the Logs panel of the Editor, showing the success or failure of the operation.

  1. You should now see a simple test message in the Slack workspace you authorized. In the next section, you will learn how to customize your integration's logic and change that message.

Edit and Debug the Integration

Now let's modify the integration logic to tailor it to our needs:

  1. Back in the Fusebit Editor, inspect the file layout. The integration.js file contains the Integration logic that you most likely want to customize.
  2. Let's change the Integration to include a user name in the message it sends, so instead of "Hello world from Fusebit!" users will see something like "Hello world from Jenny!". Modify the following function as shown:
const result = await slackClient.chat.postMessage({
  text: 'Hello world from ' + ctx.request.query.name,
  // ...
});
  1. Hit Save to save and deploy your changes.
  2. Open the Runner Configuration screen by selecting the icon next to the Run button. This screen allows you to modify the test request being sent to your Integration. Add the name query string parameter and save.
  1. Run the Integration again and note how the Slack message has now changed to "Hello world from Jenny". As you make more changes to your Integration, keep an eye on the Logs panel in the editor, which can be helpful in debugging any issues. console.log output (among other things) is routed to the Logs panel.

Conclusion

You now have a simple integration running in the Fusebit cloud, executing your business logic. Experiment and explore to see what you can do!

So far we've been invoking the Integration using the test runner in the Fusebit Editor, but we really want to connect it to your application backend, so the Slack Bot we created can send messages in response to real events happening in your system. Read on to find out how to start invoking your newly-created Integration from your app