> ## Documentation Index
> Fetch the complete documentation index at: https://help.nextmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send data to another workflow

> You might want to send data entered in one workflow to a step in another workflow.

Such data transfers are especially useful when one process triggers a follow-up workflow. Then the data from the first workflow can be used in the follow-up one.

To do this task, make sure you've completed [Start a follow-up workflow](/docs/start-a-follow-up-process).

## Before you begin

In this task, you'll need the ID of the step **you'll be sending the data to** (in the follow-up workflow) and the ID of the form field **to be filled by** the data from the previous step.

Where is the step ID

1. In your left-hand navigation, click the **Workflows** icon.
2. Hover over the follow-up workflow and click on the menu icon.
3. Click **Edit workflow**.
4. Click the step to which you'd like to send data.
5. Copy the step ID. It's the last number in the URL you see in your browser.

<Frame>
  <img src="https://mintcdn.com/nextmatter/SgcAiYe3VpK6bFPP/images/docs/bf12d2a-step_ID.png?fit=max&auto=format&n=SgcAiYe3VpK6bFPP&q=85&s=b13429607222f96fe79297d1787e8072" alt="Image of the step ID in Next Matter URL" width="1457" height="821" data-path="images/docs/bf12d2a-step_ID.png" />
</Frame>

<Accordion title="Where is the form field ID">
  1. In your left-hand navigation, click the **Workflows** icon.
  2. Hover over the follow-up workflow and click on the menu icon.
  3. Click **Edit workflow**.
  4. Click the step to which you'd like to send data.
  5. Click the ID icon for the field to which you want to copy data.
  6. Copy **Form field ID**.

  <Frame>
    <img src="https://mintcdn.com/nextmatter/2sBPfWILWLfMdiFz/images/docs/dd5fc94-form_id.png?fit=max&auto=format&n=2sBPfWILWLfMdiFz&q=85&s=0e605645d6882502261810b7033bd091" alt="Image of the form field ID on the step setup page" width="2940" height="1504" data-path="images/docs/dd5fc94-form_id.png" />
  </Frame>
</Accordion>

## Send the data

1. Click the first process that should trigger the follow-up workflow.

2. Click **...** and select **Edit workflow**.

3. Click the **Send Data** step that's been automatically added when you selected the **Launch workflow automatically** template. If you need information on selecting this template, see [Start a follow-up workflow](/docs/start-a-follow-up-process).

4. Click the **Settings** cog icon.

5. In the **Headers** section of **Settings**, enter your Api-Key. Note that you need the phrase **Api-Key** to go before the code in the field.

6. Select **Raw** as **Body** type.

7. Edit **Body** as follows: a) Delete the STEP\_ID and ACTION\_ID, and replace them with the numbers you copied from the URLs. b) Delete the ADD\_YOUR\_OWN\_DATA and click {}. c) Select the type of data to fill in in the follow-up workflow. You need to tell the system what type of data belongs to which field.

   <Info>
     **Note:** You need to select **ALL** the fields that have been marked as **Required** in the follow-up workflow. For example, if you decide to fill in the data only in one required field, the whole **Send Data** step will fail.
   </Info>

   <Accordion title="How do I know a step is required">
     1. In the left-hand navigation, click the **Workflows** icon.

     2. Hover over a process.

     3. Click **Edit workflow**.

     4. Click a step in the workflow.

     5. Click the **Settings** cog icon.

     6. Verify whether the **Optional** box has been selected. If not, the field is required.

     <Frame>
       <img src="https://mintcdn.com/nextmatter/bsmXZ466WcpOtxYo/images/docs/6e7bafa-Screenshot_2023-08-15_at_12.16.16.png?fit=max&auto=format&n=bsmXZ466WcpOtxYo&q=85&s=31f9f37f6201b99a2702059a3197f775" alt="Image of the Optional checkbox on the step configuration page" width="1820" height="854" data-path="images/docs/6e7bafa-Screenshot_2023-08-15_at_12.16.16.png" />
     </Frame>
   </Accordion>

   If you have two required fields in the follow-up workflow, this is what your **Body** might look like:

   <CodeGroup>
     ```json JSON theme={null}
     {
        "step_id":220135,
        "actions":[
           {
              "action_id":535159,
              "input_object":{
                 "inputValue":"{1. Provide details - Lead Name - Input (plain)}"
              }
           },
           {
              "action_id":535736,
              "input_object":{
                 "inputValue":"{1. Provide details - Lead Email - Input (plain)}"
              }
           }
        ]
     }
     ```
   </CodeGroup>

8. Decide what should happen if the step fails (**On Failure**).

9. Save your changes.

Now, when you start a process instance that will trigger another workflow instance, this follow-up workflow instance will have the data from the first workflow filled in in the appropriate fields.
