Documill Dynamo

Flow Triggered Task API

  1. From the Salesforce Setup, go to Process Automation -> Flows.

    image-20261203-120317.png


  2. Click New Flow

    image-20261203-120446.png


  3. Select the needed flow type. In this example, Triggered Automations - Record Triggered Flow will be selected.

    image-20261203-120531.png


  4. Configure the Flow Start per your needs.

    image-20261203-120719.png

    In this example, we will trigger the flow when an Opportunity is set to Closed Won.

    image-20261203-121831.png



    Note: Enable “Add Asynchronous Path” when working with Triggered Flows.

    image-20261203-121030.png


  5. On the left-hand side of the screen, add a new Resource

    image-20261203-121124.png


  6. Configure new resource as so:

    image-20261203-121228.png


    Resource Type: Variable
    API Name: PostTaskBody
    Data Type: Apex-Defined
    Apex Class: ExternalService__TaskAPIExternalService_PostTaskRequest

  7. Click Done.

  8. Add an Assignment Action in the Run Asynchronously branch.

    image-20261203-121915.png


  9. Name the assignment AssignBody

    image-20261203-122028.png


  10. Assign the following variables:

    image-20261203-122145.png



Variable

Value

{!PostTaskBody.integration.z0type}

Salesforce

{!PostTaskBody.integration.serverURL}

{!$Api.Partner_Server_URL_570}

{!PostTaskBody.params.id}

{!$Record.Id}

{!PostTaskBody.params.apiAction}

<apiAction>

{!PostTaskBody.template}

<templateID>

apiAction: This can either be ‘share’ or ‘reminder’. Reminder is only used when automating an e-Signature reminder workflow, ‘share’ should be used in all other cases.

templateID: Content Document ID of the Documill template to be used.

  1. Add the Post Task action after the Assignment.

    image-20261203-122525.png


  2. Give it a name and set the PostTaskBody as it’s body.

    image-20261203-122641.png

    Body: {!PostTaskBody}

    Leave the rest as it.

  3. Next, Save the flow first and then click Debug.

    image-20261203-122747.png


  4. Set the Path, Test record and click Run.

    image-20261203-122825.png


  5. If the setup was done correctly, the flow should finish with no errors.

    image-20261203-122918.png


  6. The flow is now ready to be activated. Customize as needed before doing so.