Overview
This node, named "Flow Mutate," is designed to interact with the Flow blockchain (Testnet) by calling a mutate script. It allows users to execute custom mutation templates on the Flow blockchain, which can be used to modify blockchain state or trigger transactions.
Common scenarios where this node is beneficial include:
- Executing smart contract mutations on the Flow blockchain.
- Automating blockchain transactions that require dynamic arguments.
- Integrating Flow blockchain operations into larger n8n workflows for decentralized app development or testing.
For example, a user might provide a Cadence script template to update a user's profile on the Flow blockchain and supply the necessary arguments dynamically from previous workflow nodes.
Properties
| Name | Meaning |
|---|---|
| Template | The FLIX template containing the mutation script to be executed on the Flow blockchain. |
| Options | Additional options to customize the mutation execution: |
| Arguments | A list of argument values to pass to the mutation script. Must preserve the order as defined in the template. |
| Arguments Field | The name of the field in the previous node's output JSON that holds an array of arguments to use. |
| Gas Limit | The gas limit (in FLOW tokens) allocated for executing the transaction. Defaults to 500 FLOW. |
Output
The node outputs an array of JSON objects, each representing the result of executing the mutation script on the Flow blockchain for each input item.
- Each output JSON contains the response returned by the blockchain after executing the mutation.
- No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Flow blockchain service.
- Depends on an external utility function (
flowMutate) to perform the actual blockchain mutation call. - The node expects the Flow blockchain Testnet environment.
- The user must configure the appropriate API credentials within n8n to enable communication with the Flow blockchain.
Troubleshooting
Common issues:
- Invalid or malformed FLIX template JSON will cause parsing errors.
- Incorrect or missing arguments may lead to transaction failures on the blockchain.
- Insufficient gas limit may cause the transaction to fail due to resource constraints.
- Network or authentication errors if the API key credential is invalid or expired.
Error messages:
- Parsing errors when the template is not valid JSON: Ensure the template is correctly formatted.
- Transaction execution errors: Check the provided arguments and gas limit.
- Authentication errors: Verify that the API key credential is correctly set up and has required permissions.
To handle errors gracefully, the node supports continuing on failure, allowing workflows to proceed even if some items fail.